All questions
What prompts work best with retrieval-augmented generation (RAG)?
In RAG, the prompt should: instruct the model to answer only from supplied passages, request citations, and specify what to do when information is missing (say ‘not found’). Keep passages clean and relevant—more isn’t better. Add a re-ranking step if possible. Ask for a short reasoning trace that references the exact snippet used. This reduces hallucinations and improves trust.
In practice
Use a separate ‘question rewriting’ prompt to make queries retrieval-friendly before fetching docs.
Where to start
- 1Write a ‘use only these sources’ instruction block.
- 2Add ‘no answer’ behavior to avoid speculation.
- 3Implement re-ranking to keep context tight.
- 4Measure citation coverage and factual accuracy.
RAG promptsretrieval promptinggrounded generation