Knowledge that cites its sources - and admits when it has none

Retrieval that always returns something is retrieval that will eventually invent something. Here is how we made an agent's knowledge answer with a page number, or not at all.

Knowledge

Every retrieval system has a default failure mode: asked something its corpus does not cover, it returns the closest thing it has. Nearest-neighbour search always has a nearest neighbour. The model then writes a confident paragraph on top of five irrelevant chunks, and the answer is wrong in the most expensive way - fluently, and with the house style of a correct one.

Two ways to miss a document

A pure vector search misses the query that shares no vocabulary with the answer's phrasing. A pure keyword search misses the paraphrase. Both failures are common enough that picking one is picking which half of your questions go unanswered.

So the search runs both arms and fuses them, rather than choosing. A document that is a strong lexical match and a document that is a strong semantic match both surface; a document that is both surfaces higher. An organisation with no embeddings configured degrades to the lexical arm alone - which is a state, not an error, and the surfaces say so rather than pretending the results are complete.

The abstention floor

Fusing two arms improves the ranking. It does nothing about the case where the corpus simply does not contain the answer, because a ranking is relative and the top of a list of bad matches is still the top of the list.

That needs an absolute threshold. Below it, the agent is told the library has nothing on this, and answers accordingly - which reads as a worse demo and is a far better product. "I don't have anything on that in your knowledge base" is a sentence a person can act on. A confident paragraph assembled from unrelated chunks is not.

The measure of a retrieval system is not what it returns when it knows. It is what it does when it doesn't.

Citations land in the original file

  • A citation that names a document is a starting point for a search. A citation that opens the document at the page the sentence came from is a verification. The difference matters most for exactly the readers you most need to convince - the ones who will check. The uploaded file is what gets served and rendered, not a reconstruction of it.
  • Chunks carry their page and section, so a citation resolves to a location rather than to a filename.
  • Citations are derived on the server from what the turn actually retrieved, so prose naming a file the agent never opened does not become a link.

That last one is a real class of bug. The displayed citations were never forgeable - but the sentence around them was, and a model that mentions a policy document it did not read produces a paragraph that looks sourced. Catching that is a check on the answer, not on the retrieval.

Start with the job

See how Yekar.AI would run one of your real processes.

Bring the job, the systems it touches, and the decisions that need a person.