Last updated
Augmenting the Prompt
Definition: Augmentation is the "A" in RAG — inserting the retrieved chunks into the prompt, alongside the question, before sending it to the model.
The classic RAG prompt template
You wrap the retrieved context and the question in clear instructions that tell the model to answer only from the provided context. The runnable demo builds exactly this prompt.
Why the instruction matters
Telling the model "use only the context below" is what grounds it. It strongly reduces hallucination, because the model is steered to quote the facts you gave it rather than invent its own.
A good RAG prompt also tells the model what to do when the answer is not in the context — for example, "If the answer is not in the context, say you do not know."
💡 Tip: this is where prompt engineering meets RAG — the clarity of this instruction directly affects answer quality.