A language model is a reasoning engine with a blind spot. It knows what it was trained on, in the broad and imprecise sense that training gives a system statistical familiarity with language. It does not know your current pricing policy, the exception agreed with a supplier last week, or which of six project documents is authoritative.

Retrieval is how we close that gap. It is also where many AI products quietly fail. Teams spend weeks comparing model outputs, then attach a default vector store to a corpus that was never designed for retrieval. The demo works because the question is easy. Production exposes the rest.

The answer is only as good as the evidence

Consider a support assistant answering a question about a refund. The model needs the current policy, the customer’s order state, and possibly a note about a regional exception. If the policy chunk retrieved is outdated, the answer may be fluent, confident, and wrong. No amount of prompt engineering fixes missing or stale evidence.

This is why retrieval should be treated as a product surface, not plumbing. It has content decisions, ranking decisions, permission decisions, and maintenance decisions. It has failure states that users can see. It has a lifecycle.

  • What is indexed, and what is deliberately excluded.
  • How documents are chunked, and whether a chunk preserves enough context to be useful.
  • Which metadata is reliable enough to filter on.
  • How access control is applied before evidence reaches the model.
  • How evidence is ranked when several sources disagree.
  • How citations are presented, and what happens when no source is strong enough.

Separate availability, selection, and use

When a RAG system produces a bad answer, the temptation is to blame the model. A more useful diagnosis separates three questions. Was the correct evidence available in the index? Was it retrieved and ranked high enough to enter the context? Did the model use it correctly and cite it honestly?

These are different engineering problems. The first is a content and ingestion problem. The second is ranking and query understanding. The third is generation, instruction following, and evaluation. Without separating them, every failure becomes a prompt change, which is rarely the right fix.

The model writes the answer. The retrieval layer decides what is true.

Five questions before choosing a database

  1. What does a unit of evidence look like for this question? A paragraph, a section, a table row, or a whole record?
  2. How will the index know that a source is current, authoritative, or superseded?
  3. What must be filtered before a candidate can be shown to this user, on this request?
  4. How will we know the retrieval changed for the better after a configuration change?
  5. Who owns the corpus when the project team moves on?

The database choice matters, but it is downstream of those questions. A vector index is not a content strategy. Hybrid retrieval, reranking, and metadata filters are useful only when the evidence model is coherent.

The evidence loopFour stages: availability in the corpus, selection by retrieval, use by the model, and review as an ongoing evaluation loop.EVIDENCE LOOP / RETRIEVALRAG / 01AVAILABLEcorpus / freshnessSELECTEDranking / filtersUSEDcontext / citationREVIEWEDtraces / regressionsIF A CHANGE DOES NOT IMPROVE THE LOOP, IT IS NOT AN IMPROVEMENT.MEASURE SEPARATELY
The evidence loop: availability, selection, use, and review.

Build the loop before scaling the corpus

A practical sequence is to build a small, representative corpus and a set of queries whose answers you can verify. Record the retrieved evidence for each query. Classify the failures. Then change one thing at a time and compare the trace, not just the final answer.

This is slower than adding another thousand documents. It is also the only way to know whether the additional documents helped. Retrieval quality is not a property of the index size. It is a property of the relationship between the corpus, the questions, and the decisions the system is allowed to make.

The teams that get this right tend to treat their corpus and evaluation set as product artefacts: versioned, reviewed, and maintained. The model may change. The evidence layer is where the institutional knowledge accumulates.