Skip to content
Retrieval was 78% accurate, but the answer citations were still wrong

Retrieval 78%, citation 61%: don't rush to switch vector models

A client sent twelve thousand PDFs in one go. Product manuals, historical contracts, and ticket records were mixed in one repository, with many tables and even more versions. One month after launch, I spot-checked 300 real questions: 78% had the correct document enter the candidate pool, only 61% of answers cited passages that actually matched, and another 9% were cases where the repository had no answer at all but the system fabricated specific content.

“Recall is 78%, so just raise it to 90% and you’re done.” That is the most common first reaction, and also the most expensive one. The two numbers, 61% and 9%, do not point to the recall layer at all.

Post 3/10 of this series · Previous: The user changed the budget—should the Agent rerun the whole flow? · Next: Who exactly does “what about that one” refer to?

First break it down into layers you can locate, then decide what to change

I split the pipeline into six layers, each with a signal you can check:

Layer Typical failure Locating signal
Parsing and metadata Tables flattened, version numbers not extracted, obsolete documents not tagged Original text vs. chunk comparison, version field coverage
Chunking A clause split in half, headers and footers mixed in Chunk boundary sampling
Recall The correct document never enters the candidate pool Recall@50
Reranking and recency The correct version enters the pool but ranks 9th, while the old version ranks 1st nDCG@5, position distribution of valid versions in top-K
Context construction Old and new version fragments stuffed in together, the model stitches them itself List of fragments fed into context and conflict markers
Generation and refusal Citations attached to the wrong passage, forced answers when there is no answer Citation validation, false-answer rate on the no-answer group

Complaints like “cited the wrong version” usually land in parsing metadata, reranking recency, and context conflict—not in recall. There is only one diagnostic action: pull the wrongly cited samples separately and check whether the correct version entered the candidate pool. If it entered the pool but was not cited, it is a ranking or context construction problem; only if it never entered the pool is it time to touch recall.

Skipping this step and switching to a more expensive vector model is gambling on the most expensive layer. Changing embeddings means rebuilding the index, rerunning the full evaluation, and realigning expectations with the client—a cycle measured in weeks; the attribution above takes one person half a day to reach a conclusion.

That 9% deserves separate mention. It and wrong citation are two different failures: wrong citation is “answered, but pointed to the wrong place,” and the user can still discover it by clicking one layer down; a forced answer with no answer is “fabricated, and quite convincingly,” and the user has no original text to compare against, so it often only surfaces when they use that answer to make a decision. The damage the latter does to trust is several times that of the former, so later I set a harder threshold for it.

A 200-item evaluation set, all sampled from online logs

I do not write questions myself. All come from real question logs, around 200 items, a run takes a few minutes, and the product side can maintain it. As long as the evaluation set is heavy enough that nobody wants to maintain it, it will rot within three months—this matters more than sample size.

The composition is stratified by frequency: 100 high-frequency, 60 medium-frequency, 40 long-tail; plus two separate groups of 20 each, one with multiple versions coexisting and one with no answer in the corpus. The latter two groups are the key to this problem. Without them, the system will be optimized all the way into “dare to answer anything,” and the total score will still look good.

Annotation fields must at least include: query, expected doc_id + version + effective_date, gold chunk_id, answerable boolean, expected cited passage, version-sensitivity flag, and group. Note that what is recorded is the chunk, not the answer text; the retrieval layer judges “which fragments should appear in the top K positions,” and whether the answer is well written is the generation layer’s business—mix them together and you cannot attribute.

Version the evaluation set, only add, never modify. Delete one item or change one item and historical scores lose comparability, and the team can no longer tell whether the system got better this time or the ruler changed. Split into three: development set, validation set, holdout set; the holdout set is opened only at quarterly reviews.

The most argument-prone part is how to define “relevant.” My formulation is crude but effective: background only does not count as relevant, mentioning keywords but not supporting the conclusion does not count as relevant, and anything with an obsolete version never counts as relevant. Two people each annotate a batch, disagreements are adjudicated on the spot, and the reasons are written into the spec. This spec will end up ugly, full of special cases, but it is the team’s definition of “correct.”

Two metrics, numerator and denominator both fixed

Citation version accuracy: the number of answers whose citations point to a valid version and whose passage actually supports the corresponding conclusion, divided by all answers with citations. The numerator requires both conditions to hold at the same time; “the link opens” does not count. Currently 61%; I set the launch threshold at ≥95%, with the multi-version group separately no lower than 90%.

No-answer false-answer rate: the number of cases where the corpus has no answer but a specific factual answer is given, divided by the number of no-answer samples. Currently 9%, threshold ≤2%. I give this group higher priority than the total score: the cost of fabricating one contract clause far exceeds that of ten answers that are not complete enough.

Also record a guardrail: the refusal rate must not rise monotonically. Set refusal extremely strict and the false-answer rate will certainly look good, and the product becomes useless. The three numbers must be looked at together to tell whether the system has been tuned accurately or tuned “safe.”

Preventing overfitting, and two changes that do not touch the model

An evaluation set is most easily optimized into cheating: tune parameters against it, then declare the system improved. The three-way split is the first line of defense; the second is periodically adding samples from new logs—after the client uploads new documents, old annotations expire wholesale; the third is that the holdout set participates in no model-selection discussion.

Under the premise that the model cannot be changed—the client’s private environment, where changing models requires procurement and filing—I do only two things.

The first is to put version metadata into the index and let it participate in ranking. Extract version, effective_date, and status during parsing, downweight or exclude obsolete versions by default, and treat recency as an explicit feature during reranking. Expected citation version accuracy rises from 61% to 80%–88%, the single largest gain, and the model is not touched at all.

The second is mandatory citation binding plus refusal without evidence. Every factual statement in the answer must carry a chunk_id; if generation-side validation fails, that sentence is not output; if candidate evidence is empty or all expired, use a fixed refusal template. Expected no-answer false-answer rate drops from 9% to 1%–3%, at the cost of a 5–8 percentage point rise in refusal rate. This part must be aligned with the client in advance and cannot be rolled out quietly—suddenly there is an extra chunk of “not found,” and the business side’s first reaction is that the system is broken.

I also considered chunking more finely to improve localization precision, and ultimately did not do it. Finer chunking splits a complete clause apart, and when the model uses half a sentence to support a conclusion, the numerator of citation accuracy becomes harder to judge. This is a trade-off, not a right or wrong.

Both changes are validated group by group on the 200 items above, with the multi-version group and the no-answer group reported separately. If the overall score rises 10 points and the multi-version group drops 5 points, it still cannot go live.

The client says “it must be 100% correct”

You cannot accept this statement head-on, nor can you directly push back. I usually translate it into a sentence that can be written into the acceptance document: answers must be verifiable, refusable, and traceable, and factual errors are held accountable item by item.

In delivery terms, this comes down to three things: every factual conclusion carries a clickable citation to the source text; when there is no basis, say clearly that you don’t know and provide a human escalation path; and acceptance is measured against tiered criteria (citation-version accuracy rate, no-answer false-response rate) rather than a single claim of “100% accuracy.” Pair this with a bad-case retrospective SLA and rollback clauses, so that when problems arise everyone follows the process instead of renegotiating every time.

Then proactively state the boundaries clearly. PDF parsing itself loses table structure; something was verbally agreed by someone on the client side but never written into any document; two documents conflict with each other on the same matter. These three categories are not something the model can guarantee, and they require the client to cooperate in governing the documents. A vendor willing to write “what we cannot guarantee” into the acceptance document is actually more credible than one that confidently claims 100%.

How I would assess this question in an interview

Pass: knows that an evaluation set needs to be built, and that retrieval and generation must be assessed separately.

Good: can break it down by layer, can write out the metric definitions, and knows to keep a set of “no-answer” samples.

Excellent: can use the discriminator “did the correct version make it into the candidate pool” to narrow attribution down to a specific layer; can identify changes that do not touch the model and the order of magnitude of their benefit; and can renegotiate “100% correct” into an acceptable delivery standard.

The most common failure is reporting only a single end-to-end accuracy rate. It can neither locate the problem nor support acceptance, and it cannot explain to the client “what was not done well”—what they hear is just “you’re not doing a good job,” not “we know where to fix it next.”

Citations are not decoration; they are the only interface through which the product hands verification responsibility back to the user.

Once the material-layer issues are narrowed down, switch to a more personal scenario: by the fourteenth turn of the conversation, the user asks, “What about it?”—who exactly does “it” refer to?

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#AI Products #Evaluation #RAG

Comments