- Day 25: Production knowledge lives in systems of record, not only in PDFs
- Day 26: When the evidence is a table, a chart or a recording
- Day 27: A stale answer is a wrong answer
- Day 28: Weak evidence should trigger recovery, not a confident answer
- Day 29: Reflection helps only when it checks against evidence
- Day 30: Evaluate RAG in parts: retrieval, grounding, generation, citations
Asking a document index "how many open tickets do we have right now?" is like asking a library for the current time. Wrong building, and it will helpfully give you an answer anyway, probably from a status report written in April.
Live facts do not live in PDFs. Inventory, order status, account balances, ticket counts and entitlements live in databases and business systems, and they change faster than a document pipeline refreshes. A change feed narrows the gap, but the index is still a copy that lags the source.
Two retrieval modes share one chat box
Document retrieval answers what does the policy say. Structured retrieval answers what is currently true.
Production assistants need both, and the moment you add the second one, three problems appear that document-only RAG never had.
The first is routing. A router (a classifier, or the model's own tool choice) must decide per question whether the answer lives in prose or in a table. Get it wrong and the system quotes a stale PDF about a number the database knows exactly. This routing decision deserves to be explicit and logged, because when answers are wrong, "it asked the wrong system" and "it asked the right system badly" need different fixes.
The second is query safety. Model-generated SQL running against production with write access is an incident generator with a natural-language interface. The floor is read-only credentials, parameterised templates or narrow typed tools rather than free-form SQL, allowlisted views instead of raw table access, row limits, and query timeouts. Prefer exposing five specific tools (get_order_status, get_open_ticket_count) over one general run_query tool. Narrow tools are easier to validate, easier to log, and dramatically harder to misuse. Narrow tools cost coverage, since every new question shape needs a new tool, and until someone builds it the answer should be a refusal. Scope each call to the user as well, passing their identity through an on-behalf-of token exchange, so get_order_status can only return orders the caller is entitled to see.
The third is freshness versus cost. Live calls are current but slower, rate-limited, and occasionally down. Decide per question class whether staleness or latency is the greater sin, and design the fallback for when the system of record is unavailable. "The database timed out" should not silently become "answered from a cached document."
Evidence has provenance here too
An API result is evidence like any other, and it needs the same treatment: what was queried, against which system, at what time, returning what.
Without that, a wrong answer is unfalsifiable after the fact. You cannot tell whether the query was wrong, the data was wrong, or the data was right at the time and has since changed. All three happen; only logging distinguishes them.
The demo question is "what is our refund policy?" The production question is "where is my refund?"
They arrive in the same chat box, phrased almost identically. They are answered by completely different infrastructure, and a system that only built one of them will answer the other confidently and wrongly.
Find the misrouted questions in your own logs. Sample the ones that ask for a count, a status or a balance, or that say "my", and check which of them the document index answered. Each is a candidate for a typed tool.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Jun 15, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Decision note · · 2 min read
We chose Azure AI Search for retrieval because ingestion and filtering stay simple
Why our retrieval runs on Azure AI Search: our Databricks ingestion pipelines feed it directly, filtering is simple, and several semantic configurations share one index.
Checklist · · 12 checks
RAG production-readiness checklist
Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.
Failure story · · 1 min read
The retrieval cache that served stale policies
A well-meaning cache in front of retrieval kept answering from last quarter's HR policy for eleven days.
Discussion