Skip to content

    AI Architect Case Files

    Case: Policy Q&A and Conflicting Documents

    An insurer's policy assistant cited a superseded wording and silently picked between two conflicting documents. Version metadata and conflict surfacing fix it.

    By Published 8 min read

    • ai-architect
    • case-file
    • industry-financial-services
    • pattern-rag
    • failure-stale-data
    • kind-composite
    Share

    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

    Policy document ingestion with metadataDocument store to Worker; Worker to Vector index (metadata complete); Worker to Review queue (missing version or date); Review queue to Worker (after fix); Vector index to RetrieverDocument store: documents, registry fieldsDocument storedocuments,registry fieldsWorker: chunk, add metadataWorkerchunk, addmetadataVector index: chunks with metadataVector indexchunks withmetadataRetriever: in-force filterRetrieverin-force filterReview queue: owner fixes metadataReview queueowner fixesmetadatametadata completemissing version or dateafter fix

    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

    sequenceDiagram accTitle: Runtime path for a policy question accDescr: The client app sends a question with the product and as-of date. The orchestrator asks the retriever for passages in force on that date. If nothing is found the answer is a no-answer message. Otherwise the model gateway checks the passages for disagreement. If they disagree the agent sees both with their versions, otherwise a cited answer. autonumber participant C as Client app participant O as Orchestrator participant R as Retriever participant V as Vector index participant M as Model gateway participant T as Trace store C->>O: Question, product, as-of date O->>R: Query and in-force filter R->>V: Search where product matches and date is in force V-->>R: Top 5 chunks with version and dates R-->>O: Passages alt No passages O-->>C: No answer found, offer the policy team else Passages found O->>M: Answer from passages and report any disagreement alt Passages from two documents disagree M-->>O: Conflict with both quotes O-->>C: Both passages, versions and dates, escalate else No disagreement M-->>O: Answer citing document and version O-->>C: Cited answer end end O-)T: Filter, passages, outcome

    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.

    One policy question, end to end (interactive when JavaScript is on)

    As designed

    1. Ask. An agent asks about a burst pipe and a house empty for 30 days. The client app sends the product code and the as-of date from the policy screen (the date of loss, for a claim).
    2. Build the filter. The Orchestrator passes the question and the filter to the Retriever. The filter is built from system data, not from the model's guess.
    3. Search in force. The Retriever searches only chunks of that product whose effective-from date is on or before the as-of date and whose effective-to date is empty or later.
    4. Superseded versions drop out. Superseded versions fall out of the result set. If two in-force documents remain (a wording and its endorsement), their authority level decides which is primary.
    5. Empty result. If no passages are left, the assistant says so and offers the policy team. No answer beats an old one.
    6. Check for disagreement. The model gateway gets the passages and returns a short answer plus a yes or no on whether they disagree, with the quotes if they do.
    7. Show the outcome. On a conflict the agent sees both passages with versions and dates, and a ticket goes to the policy team. Otherwise one answer with document, version and date.
    8. Trace. The Trace store records the filter, the passages and the outcome.

    Without the fix

    1. Search everything. The assistant searches all versions of all documents with no in-force filter.
    2. Three twins. A clause unchanged through three versions gives three near-identical chunks, and all three land in the top five.
    3. The model picks. The three look equally good, so the model picks one. At random, it is wrong in 2 of 3 cases when the question concerns the newest version.
    4. Audit result. 31 of 200 answers cite a superseded version and 9 hide a conflict between two in-force documents.

    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

    1. Version, effective dates and supersession belong on every chunk, and the filter runs before generation.
    2. Never delete old versions that older cases still need; select by the as-of date.
    3. When two sources of equal authority disagree, show both with their dates; do not choose silently.
    4. Documents without trustworthy metadata wait in a queue, not in the index.
    5. 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

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments