The Hardest Parts of Production RAG: Evidence Alignment, Chunk Locatability, and Coverage Gaps

    Many teams treat Retrieval-Augmented Generation (RAG) as a tuning problem: pick a vector store, adjust the embedding model, polish the prompt. This article argues that the real blockers are three more fundamental issues on the retrieve-select-verify chain: whether retrieved evidence matches the question's scope (same market, same unit, same instrument), whether chunking preserves the locators users will later ask by (title, column, item number, date), and whether the system knows the coverage boundary of its local knowledge base and can report gaps instead of assembling an approximate answer. It shows how to turn scope into hard pre-filters, how to index structural locators alongside text, how to handle date coverage holes, and why evaluation must record correct-evidence rank, actual citation, and citation support together. A closing checklist helps you audit a deployment.

    Start with the conclusion: the hard part of RAG is not retrieval, it is proving the answer is right

    Most teams working on Retrieval-Augmented Generation (RAG) put their effort into vector store selection, embedding model tuning, and prompt polishing. What actually moves a system from demo to usable is usually three more basic things:

    1. Whether the retrieved evidence matches the scope of the user’s question (same market, same unit; one difference in metric or instrument and the whole answer drifts).
    2. Whether the chunking strategy preserves the locators that future questions will depend on (title, column, item number, date).
    3. Whether the system knows the coverage boundary of the local knowledge base, and can state the gap honestly when data is missing instead of assembling an approximate answer.

    These three share one property: none of them is a single-point algorithm problem. They are joint problems across the “retrieve - select evidence - verify answer” chain. Measuring with one metric alone (for example, “is there a correct passage in the top three”) will score errors as hits.

    Difficulty 1: aligning the scope of evidence with the question

    1.1 Pseudo-relevant evidence under the same topic

    Financial news feeds are a typical case. Two items may discuss the same market, use the same unit, and even be published on the same day, yet point to different instruments or metric definitions. Vector similarity is often high here, because the semantics really are close. But once the wrong one is selected, the citation also looks plausible, and the error is endorsed by that citation, which makes it harder to notice.

    1.2 Split “relevance” into decidable layers

    A practical approach is to judge the match between evidence and question in three separate layers:

    • Topic relevance: is it the same market or sector;
    • Entity and scope consistency: instrument, contract, metric definition, statistical range, and unit;
    • Time consistency: does the date of the data match the date specified in the question.

    Only when all three layers pass does evidence count as usable. In engineering terms, keep structured fields explicitly in the index so that filtering happens before ranking:

    1. # Illustrative: filter on structured conditions first, then rank semantically
    2. def retrieve(query, top_k=20):
    3. filters = {}
    4. if query.instrument: filters["instrument"] = query.instrument # instrument / underlying
    5. if query.metric: filters["metric"] = query.metric # metric definition
    6. if query.date: filters["date"] = query.date # date the data refers to
    7. candidates = index.search(
    8. query.text,
    9. top_k=top_k,
    10. filter=filters, # hard constraints first; avoid semantically close but out-of-scope hits
    11. )
    12. return rerank(query, candidates)

    The key point: scope constraints should be hard filters wherever possible, rather than hoping the ranking model learns to tell them apart.

    Difficulty 2: chunking is about locatability, not length

    2.1 The hidden loss of fixed-length chunking

    Splitting by fixed length cuts otherwise coherent content apart, which is well understood in the field. The more hidden loss is that chunking throws away locators such as the title, the column, and the item number.

    Take a concrete shape: a news item titled “Key Economic Data at a Glance” lists several entries in the body as 1, 2, 3. A user asks “what is item 2 in that roundup.” Here the title, the column name, and the item number together are the conditions for locating the original text. If the chunk keeps only the body, the semantics may be complete, but this “ask by number” pattern can no longer be retrieved at all.

    2.2 Chunk along the original structure and write locators into the index

    The principle: decide what a chunk keeps by first thinking about how users will ask about this material later.

    1. chunk = {
    2. "text": segment_body, # body segment
    3. "title": doc.title, # title
    4. "column": doc.column, # column
    5. "item_no": segment_no, # item number
    6. "date": doc.data_date, # date the data refers to
    7. "source_id": doc.id,
    8. }

    In practice, this has played out as follows: for a number-based question, none of the top semantic search results contained the target, while the question entry point located the original text directly using the numbering rule. This shows that structured rules and semantic retrieval are complementary, not substitutes. For strongly structured material, keep a “direct rule lookup” path.

    Difficulty 3: knowledge base coverage boundaries and date checks

    3.1 “Does the base actually have this day”

    Data backfills often hit pagination limits. Suppose you want the last 7 days of news items, and page one hundred triggers the pagination limit for this run, so the range has to shrink to the last 3 days to finish. Engineering limits like this create time holes in the knowledge base directly.

    The danger of a hole is that content on adjacent dates is highly similar. Ask for the closing level of the market on a given day, and the next day’s market wrap is almost identical semantically, but each level belongs to its own date. Without a date check, the system will answer a question about a specified date with data from a nearby date.

    3.2 Say what is missing when data is missing

    For a query about a specified date, the standard sequence is two steps:

    1. First check whether the local base covers that date;
    2. If not, output the gap range and the most recent sync date explicitly, instead of forcing an answer.

    For a decomposable question like “how have a class of assets performed recently,” use per-item answers plus gap annotation: items with material get a normal answer, items without evidence are listed explicitly.

    1. Q: How are precious metals doing lately?
    2. A: Gold, silver, and platinum have corresponding material, conclusions as follows...;
    3. Palladium currently lacks evidence, no judgment made.
    4. Gap note: data is most recently synced to Month X, Day X.

    This “nullable return” design is more reliable than chasing a 100% answer rate, and it builds user trust more easily.

    Change the evaluation: look at three results together

    Traditional evaluation only asks “did the correct evidence make the top three,” which scores a wrong-topic answer as a hit. A more executable approach records three things at the same time:

    Record Meaning Where to investigate
    Rank of correct evidence Which position the correct passage landed in Low rank -> check retrieval and ranking
    Citation actually used Which item the final answer cited Wrong item cited -> check evidence selection and filtering
    Whether the citation supports the conclusion Can the cited content produce that conclusion Not supported -> check answer verification and constraints

    A real-shaped error case: the base held two crude oil closing items, one for a benchmark at USD 69.43 per barrel and another for a different benchmark at USD 74.22 per barrel. The system answered 74.22 and attached a citation. Only after checking the retrieval log did it turn out that the correct item ranked second, while the answer cited the other one. Judged only by “is there correct evidence in the top three,” this question would be scored a hit; checking the citation against the question is what reveals the error was in the instrument.

    So the evaluation set should contain three kinds of questions: scope-confusion questions, number-locating questions, and specified-date questions. These three cover the three difficulties above, and each can be traced to a specific stage through the three records in the table.

    Deployment checklist

    • Does the index contain locators such as title, column, item number, date, and source identifier;
    • Are scope conditions placed in front as hard filters rather than left to ranking;
    • Is a direct rule lookup path preserved for strongly structured material;
    • Is knowledge base date coverage checked before retrieval, with the gap and most recent sync date output when uncovered;
    • Is the answer forced to bind a verifiable citation, with refusal or degradation when the citation does not support the conclusion;
    • Does evaluation record all three of correct-evidence rank, actual citation, and citation support.

    Getting through these three hard parts usually improves the reliability of a RAG system more visibly than swapping the embedding model or adjusting the prompt. If you have hit other pitfalls in similar settings, add your decision rules and evaluation dimensions in the comments.