Skip to content
Published on
2 min read

Find where a grounded answer went wrong

Authors
  • Ritenta
    Name
    Ritenta

A learner asks whether the autumn accessibility policy applies to a winter cohort. The assistant quotes a real paragraph but gives the wrong answer. The fix depends on which version was indexed, which passage was selected, and which part of the selected evidence supports the claim.

Inspect the retrieval boundary

Keep a reviewed set of queries and passage IDs, with document version and effective date. Evaluate retrieval by itself. Recall at a cutoff measures how many judged relevant passages make the candidate list. For a query with three judged relevant passages, finding two in the top five gives recall@5 of two thirds. The same query has precision@5 of two fifths if the other three returned passages are irrelevant. A query with absent or incomplete judgments needs separate treatment.

Run both lexical and dense queries when exact policy identifiers and paraphrased questions matter. Keep scores and ranks distinct. Reciprocal rank fusion combines ranks from individual lists when their raw scores are on incompatible scales. It can rank retrieved candidates. It cannot introduce a document that neither retriever found. Reciprocal Rank Fusion paper · Retrieval-Augmented Generation paper

Compare with trusted evidence

Run the same answer prompt against the original retrieved passages and then against a reviewed evidence bundle. Keep prompt, model, and scoring rubric fixed. An improvement with reviewed evidence points toward retrieval or context assembly. Errors in both runs warrant a check of prompt, claim extraction and model behavior. One result is a diagnosis lead. Repeat across a held-out set before changing policy.

Score each important claim against the cited span. A correct URL shows where the text came from. It does not establish that a rule covers the requested cohort. If the text describes autumn only, the answer should either find specific winter evidence or say that its evidence is insufficient. Include unanswerable questions alongside clear cases. Automatic evaluation of LLM citations

Treat freshness as part of the answer

Track document revision through indexing and retrieval. When a new policy replaces an old one, remove or deactivate superseded passages under the application’s effective-date rules, then test both current and historical questions. Keep the passage ID in the evaluation report so reranking and answer changes can be compared with the same evidence.

This worked case follows the LLM engineering phase of AI Engineering from Scratch.

Practise what you read

Answer questions based on this article in Ritenta.

Open practice