Lesson 4.1
The Grounded Answer
The model writes the answer using only the passages you gave it, and points back to the one it used.
An open-book answer that shows its working.
Picture a student in an open-book exam. The good answer is not the one that sounds most confident. It is the one that says "page 14 says this, so the answer is that." You can flip to page 14 and check. The work is visible, so you can trust it.
That is the whole job of the generation step in RAG. By now the search has already found the right passages and the prompt has been assembled (Units 2 and 3). The model's task is narrow: read those passages and write an answer from them, then point back to the passage it used. We call answering only from the provided text grounding, and the pointer back to the source a citation.
Grounding is a rule you give the model in plain words: answer from the passages I gave you, not from your own memory. The citation is the receipt that lets the reader verify it.
The instruction does the steering.
A model left to its own devices will happily blend what it read with what it half-remembers from training. Grounding closes that door with an instruction at the top of the prompt. The wording is short and blunt, and it carries three asks at once: use only the context, name the source, and say "I do not know" when the context does not cover the question.
a grounding instruction, in spirit
Answer the question using only the passages below.
After each claim, cite the passage it came from.
If the passages do not contain the answer, say you do not know.
That last line matters more than it looks. Without it, a model treats a silent context as a cue to fall back on memory. With it, "the passages do not say" becomes an allowed answer. We come back to what happens when the model ignores this instruction in lesson 4.3.
Two ways to write the answer: lift it or rephrase it.
There are two honest styles for a grounded answer. The first copies the words straight out of the passage, like quoting a line from the book (the precise term is extractive). It is the safest, because the answer is literally the source text, but it can read stiff and it struggles when the answer is spread across two passages.
The second reads the passages and writes the answer in fresh words, the way you would explain a page to a friend (the precise term is abstractive). It reads better and can stitch facts together, but it has more room to drift away from what the source actually said. Most RAG systems lean abstractive and lean on the citation to keep them honest.
Extractive (lift it)
Pulls the answer verbatim from a passage. Hard to get wrong, but rigid and bad at combining sources.
Abstractive (rephrase it)
Reads the passages and writes in its own words. Reads well and merges facts, but can drift, so the citation is what keeps it tied to the source.
A worked example: the Q3 launch.
Say the question is "What shipped in the Q3 launch?" Two passages made it into the prompt. One is the real launch note; the other is a near-miss the search pulled in by accident.
the context handed to the model
[1] launch-notes.md: "The Q3 launch shipped the billing API and SSO."
[2] roadmap-draft.md: "The mobile app is planned for Q4."
Q What shipped in the Q3 launch?
A The billing API and SSO. [source: 1, launch-notes.md]
The model read passage 1, ignored the Q4 roadmap line as off-topic, and tagged where the answer came from. A reader who doubts it can open launch-notes.md and check in seconds.
That tag, [source: 1], is the trust mechanism. It turns an answer you have to take on faith into one you can audit. If the citation points at a passage that does not actually back the claim, you have caught a bad answer before it reached anyone. That check is the backbone of evaluating a RAG system, and the heart of lesson 4.3.
A grounded answer is two things bolted together: a claim, and a pointer to the passage that supports it. Drop the pointer and you are back to taking the model's word for it.
Key takeaways
Grounding is a plain instruction: answer from the passages I gave you, not from memory, and say so when they do not cover the question.
An answer can lift the source text word for word (extractive) or rephrase it (abstractive); most systems rephrase and rely on the citation to stay honest.
The citation is the trust mechanism: it lets the reader open the source and check, so an answer becomes something you can audit instead of believe.