Composite scenario, not a real company. Assembled from common industry patterns; every number is illustrative and its assumptions are listed at the end.
This case belongs to Data and Retrieval Architecture for AI Systems.
Context
- A home and motor insurer has 140 customer-service agents who answer questions such as "Is a burst pipe covered if the house was empty for 30 days?" while a customer waits on the phone.
- The answers live in about 2,000 documents: policy wordings, endorsements that amend them, internal circulars and an agent FAQ.
- Many documents exist in several versions. A customer is bound by the wording in force on their policy's start or renewal date; a claim is judged by the wording in force on the date of loss.
- A policy assistant retrieves passages and has a model write a short cited answer. It went live after a pilot on the newest documents only.
Problem statement
A specialist audit of 200 sampled answers found two kinds of error.
| Error | Answers | Share |
|---|---|---|
| Cited passage from a superseded version | 31 | 15.5% |
| Two in-force documents disagreed and the assistant quietly picked one | 9 | 4.5% |
| Total affected | 40 | 20% |
The cause is in the data. A clause unchanged through three versions gives three near-identical chunks, all in the top five. A random pick is wrong in 2 of 3 cases (66.7%) when the question concerns the newest version.
Goal: at most 2 wrong-version answers in a fresh sample of 200 (1%), and every genuine conflict shown to the agent instead of resolved silently.
Constraints
- Fixed: old versions must stay answerable, because claims on old losses need the wording of that date.
- Fixed: an agent must see which document, version and effective date backs each answer.
- Fixed: the assistant gives guidance to agents; it does not make coverage decisions.
- Negotiable: which documents are indexed first, and the escalation route for conflicts.
- Limit: the policy team can fix metadata for about 50 documents a week.
Why the traditional approach fell short
| Approach | Why it fell short |
|---|---|
| Keyword search over the document system | Returns every version of a clause, ranked by term frequency, with no notion of which one applies |
| The agent FAQ | Written once and drifts: it still quoted a 60-day unoccupancy limit after a wording cut it to 30 days |
| Plain retrieval-augmented generation | Embeddings measure similarity of text, and two versions of a clause are, by design, similar |
Options considered
| Option | Why accepted or rejected |
|---|---|
| A. Controlled lookup, no AI: a structured page keyed by product and date, with key clauses written once by the policy team | Kept as the fallback for the 20 most asked topics; accurate, but covers only what the team has written |
| B. Delete old versions from the index | Rejected: claims on older losses need the older wording |
| C. Version metadata, in-force filter, conflict surfacing | Accepted: the failure is a data-model problem, and filtering fixes it before the model sees anything |
Solution architecture
Figure 1. Ingestion with metadata and a quarantine path
How to read this: nothing reaches the index without version and date fields, and incomplete documents wait in a queue instead of being searched.
Figure 2. One question with the conflict path
How to read this: the filter runs inside the search, before the model; the nested alternatives show the empty, the conflicting and the clean outcome.
How AI solved it, step by step
Step through one question, then switch to "Without the fix" to see the audit failure.
Under the hood
The key step is what each chunk knows about itself. Anthropic's post on contextual retrieval states the problem generally: "traditional RAG solutions remove context when encoding information", with an example chunk about revenue growth that "on its own doesn't specify which company it's referring to or the relevant time period." Here the missing context is version and date. The fix has two parts.
| Part | What it is | Why |
|---|---|---|
| Structured fields on every chunk | Document id, version, effective-from, effective-to, supersedes, authority level, section path | The filter acts on them without the model |
| A context line in front of the chunk text | For example "Home wording v3, effective 2024-01-01, section 7.2 Unoccupancy", added before embedding and before lexical indexing | The chunk's own text reflects where it came from |
Chunk boundaries matter too: a definition split from its clause misleads. See Under the hood: Chunking and its failure modes.
What went wrong / failure modes
| Failure | Mitigation |
|---|---|
| Wrong as-of date: filters correctly on today instead of the date of loss | Show the as-of date in every answer and make it an explicit field the agent can change |
| Missing metadata on legacy documents (scanned or old files, no effective dates) | They go to the review queue, not the index; the queue is worked at 50 documents a week and the backlog is reported |
| Broken supersedes chain: a new version is published without closing the old one, so both look in force | Publishing a version sets the previous version's effective-to date in the same step; a nightly check lists products with two in-force versions of one document |
| Conflict check misses a disagreement: the yes or no is a model judgement | Sample 20 answers a week against a specialist and treat the check as a safety net, not the control |
Results
These are illustrative targets, not measurements.
| Measure | Audit | Target |
|---|---|---|
| Wrong-version answers in 200 | 31 (15.5%) | at most 2 (1%) |
| Silent conflicts | 9 of 200 (4.5%) | all 9 audited conflicts shown to the agent |
| Questions a day (140 agents x 30) | 4,200 | same |
| Extra model calls a day (25% need the conflict check) | none | 1,050; the filter adds no model call |
| Conflict displays a day (4.5% of questions) | none | 189, ticketed once per distinct pair, so the policy team sees pairs, not 189 tickets |
Tradeoffs and when NOT to use this approach
- Metadata work is real work. If the corpus is 30 documents that change twice a year, option A (a controlled page) is cheaper and safer.
- Filtering assumes the as-of date is known. If agents cannot tell which date applies, the tool moves the error into a field.
- Do not use this where a wrong answer causes a regulated outcome without a human check.
Design rules extracted
- Version, effective dates and supersession belong on every chunk, and the filter runs before generation.
- Never delete old versions that older cases still need; select by the as-of date.
- When two sources of equal authority disagree, show both with their dates; do not choose silently.
- Documents without trustworthy metadata wait in a queue, not in the index.
- Make the as-of date visible and editable in the answer.
Assumptions
All numbers are illustrative.
- 2,000 documents; about 600 are superseded versions and 1,400 are current. Chunking is not specified.
- Audit: 200 sampled answers; 31 superseded (31 / 200 = 15.5%), 9 silent conflicts (9 / 200 = 4.5%); 31 + 9 = 40 (20%).
- Three near-identical chunks and a random pick gives 2 / 3 = 66.7% wrong. This assumes the model has no reason to prefer the newer text.
- 140 agents x 30 questions = 4,200 a day; 25% needing the check = 1,050 calls; 4.5% x 4,200 = 189 conflict displays.
- Policy team capacity (50 documents a week), the 20 controlled topics and the 20-answer weekly sample are chosen for illustration.
- Anthropic's contextual retrieval post (https://www.anthropic.com/news/contextual-retrieval, read 2026-10-21) is used only for the quoted statement and example; the insurer, the documents and the clauses are invented.
- Not legal or regulatory advice.
Last verified: 2026-10-22