Prompt patterns that make RAG answers more reliable
RAG systems work better when search and answering are handled as separate steps instead of one large prompt doing everything. The first step should rewrite the user’s question into better by expanding names, dates, s, product names, and . The answer step should use only the retrieved material and attach citations to the exact document and section that support each sentence.
For high-risk answers, the system can first create an evidence table with each claim, its supporting source, confidence level, and any conflict before writing the final answer. If the needed information is missing, the answer should say what is missing instead of guessing, especially for pricing, , versions, dates, regions, or plans. Multi-step retrieval should have fixed stages, such as identifying intent, finding overview documents, extracting needed entities, searching specific documents, and then answering.
Style instructions should stay separate from strict grounding rules, such as no unsupported claims and no uncited numbers. Prompts should be tested with hard cases, including absent information, outdated policies, mixed-up products, false , and missing numbers.
Key points
- Split the search prompt from the answer prompt.
- Require citations tied to the exact document and section behind each sentence.
- Make the system say what is missing instead of guessing.
- Keep multi-step retrieval bounded so it does not run endlessly.
- Version prompts and retrieval settings together so changes can be debugged later.