Eurekly.

02 / Grounded answers

Find the evidence. Then explain it.

Retrieval-augmented generation (RAG) combines finding relevant material with generating a response. It gives a model selected evidence to use while answering.

Two jobs, one answer

A retriever selects useful passages from a collection. A generator receives those passages with the question and produces an answer. The original RAG research by Lewis and colleagues studied a language generator combined with a retrieved document index. Today, the term also describes broader retrieve-then-generate workflows.

  1. Question
  2. Retrieve passages
  3. Question + evidence
  4. Answer with sources
A simple RAG flow. Retrieval supplies evidence, not a guarantee of correctness.

A small example: course notes

Imagine a set of workshop notes. One passage says: “The calibration exercise starts after the safety briefing. Participants need the blue worksheet.” A learner asks, “What should I bring to calibration?”

A useful retrieval result includes that passage. The answer can now say “Bring the blue worksheet,” with a link to the relevant notes. Without the passage, a model might guess that a laptop or calculator is required. The question alone does not justify either guess.

Now change the notes: there are two editions and the newer one requires a green worksheet. Finding a related passage is insufficient; the system must also choose the right edition. This is why document metadata, freshness and source inspection matter.

Where it can fail

A retriever can miss evidence, rank an irrelevant passage highly, or return contradictory material. The model can misread the evidence or add unsupported details. A source link proves where text came from, not that the whole answer follows from it. When the source does not answer the question, “not enough information” is often the useful outcome.

Put it to work

Start with a question whose answer you can locate in your own notes. Compare the retrieved passage, answer and citation. Try a second question whose answer is absent. A trustworthy workflow should make the missing evidence clear. Use documents you have permission to process and avoid uploading sensitive information.

Next, explore embeddings for retrieval or return to language-model fundamentals. RAG can use keyword, vector or hybrid retrieval; it does not require every system to use the same search method.

← All topics