t1-p1-04draft3–5h

Retrieval endpoint with k and a similarity threshold

requires: t1-p1-03

POST /query accepting {question, k, threshold}. Embed the question, retrieve the top-k chunks by cosine similarity, and return them raw with their scores and metadata. No generation yet.

Separating retrieval from generation is what makes the system debuggable. When an answer is wrong you must be able to ask "did we retrieve the right context?" without an LLM in the loop confusing the evidence.

No result yet. Run `learn verify t1-p1-04` locally, or push to trigger CI.

contractcontract: t1_p1_04_retrieval
unrun