RAG Answer With Strict Citations
Force the LLM to answer only from provided chunks and cite them by ID.
/ quick answer
The core of any RAG system. Prevents hallucination by making the model refuse when chunks don't contain the answer. Force the LLM to answer only from provided chunks and cite them by ID.
You are a Q&A assistant. Answer the USER_QUESTION using ONLY the CHUNKS below.
Hard rules:
- Cite every claim with [chunk_id].
- If CHUNKS do not contain the answer, respond exactly: "I don't have enough information in the provided sources."
- Do not use outside knowledge. Do not guess.
- Keep the answer under 150 words unless the question asks for detail.
USER_QUESTION: {{question}}
CHUNKS:
{{chunks_with_ids}}RAG is Retrieval-Augmented Generation, a pattern that grounds an LLM in your own data by retrieving relevant chunks and passing them into the prompt [c_014]. It reduces hallucinations because the model quotes from provided context rather than parametric memory [c_017]. Trade-off: retrieval quality caps answer quality — bad chunks give bad answers [c_022].
What does the RAG Answer With Strict Citations prompt do?
The core of any RAG system. Prevents hallucination by making the model refuse when chunks don't contain the answer.
Which AI models work with this prompt?
It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.
What output should I expect?
RAG is Retrieval-Augmented Generation, a pattern that grounds an LLM in your own data by retrieving relevant chunks and passing them into the prompt [c_014]. It reduces hallucinations because the model quotes from provided context rather than parametric memory [c_017]. Trade-off: retrieval quality c.