Give the model a source. Still check the answer.

Home Learn Give the model a source. Still check the answer.

In short

Retrieval finds relevant material, and generation writes an answer using that material. Retrieval-augmented generation, or RAG, combines those steps in a system. It can connect a response to a reference collection, while the sources and the answer still need review.

Why it matters

A model’s training may not contain your current handbook or a newly published document. Retrieval can supply the relevant passages when you ask a question. That helps with specific and changing knowledge. It also introduces another failure point: the system may find the wrong passage before the model writes an otherwise convincing explanation.

How it works

A useful distinction

A retrieval system searches a collection for candidate evidence. It can use exact terms, embeddings, or a combination. Embeddings are numerical representations used to compare related information. A generation model then receives selected material as context: the information available for its response.

The original RAG research combined a pretrained language model with a searchable external collection. The researchers measured answers to questions requiring outside knowledge with the models and source collections in their experiments. The Dense Passage Retrieval research examines another part of the process: finding passages using learned representations. Finding useful evidence and writing a supported answer are related but distinct jobs.

Where it can go wrong

The source can be stale, the search can miss the best passage, or a chunk can separate a rule from its exception. A chunk is a smaller part of a document prepared for search. If the answer gets only the rule, it may sound complete while omitting a condition.

Generation can stretch beyond what the retrieved material supports. Citations help a reader inspect evidence, but the cited passage has to support the specific claim. A retrieved source can also contain misleading instructions. Treat its content as material to analyze, while the application’s authorized instructions govern the task.

Access controls belong throughout the path. A system shouldn’t retrieve a restricted snippet and then rely on the model to hide it. The collection, search, context, and displayed references need to respect the requesting person’s access.

Make the evidence inspectable

Keep document titles, versions, and passage locations with the answer. Separate a retrieval failure from an answer-writing failure: did the right passage arrive, and did the answer use it faithfully? Include questions that the collection can’t answer. I’d prefer a clear gap over a confident response filled from unrelated material.

Example

Illustrative example: this scenario is invented.

Nora is a nurse educator preparing an orientation guide. The source collection contains an older room notice that says “Room A, Tuesday” and its replacement that says “Room B, Thursday.”

A useful retrieval process supplies the current notice with its day and room intact. Nora checks both the selected source and the draft answer. If the current notice was retrieved but the answer said Tuesday, the writing step needs attention. If the old notice was retrieved, the collection or search needs attention first.

What it doesn’t mean

  • RAG doesn’t eliminate hallucination. An answer can still go beyond its evidence.
  • Connecting documents doesn’t fine-tune the model by itself. Retrieval supplies information at response time.
  • A citation doesn’t resolve a conflict between sources. Someone needs to decide which source applies.

Try it

Use about ten minutes with two sample notes. Label one “retired”: orientation meets in Room A on Tuesday. Label the other “current”: orientation meets in Room B on Thursday.

Ask an assistant to answer a room-and-day question using only the current note and to provide the supporting phrase. Then ask a question neither note answers. Check whether it identifies the gap. Pasting notes explores evidence use; it doesn’t reproduce a complete retrieval system. Keep the exercise focused on source selection and faithful interpretation.

Keep going

Sources

Share this page