Retrieval · citations · evaluation
Document chat that cites its sources and refuses to guess
A FastAPI service over Postgres and pgvector. It answers only from the passages it retrieved, names the file and the chunk, and says the documents don't cover the question instead of inventing an answer. A Flutter client streams the reply over SSE. Retrieval is scoped per owner, so one person's documents never turn up in another person's answer.
Hard partCompound questions. Two of the 53 failed, and the chunks they needed were already in what the model was given. The instruction said to refuse unless a single excerpt answered the question, and no single excerpt did. The fix was in the instruction, not the retrieval: facts may be combined across excerpts, each cited, and the refusal still applies unless the excerpts together cover every part. Three runs after the change scored 52, 53 and 53. A wider retrieval net was tried in the same run, made it worse, and was reverted.