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].
/ frequently asked
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.
How do I use this prompt?
1) Copy the prompt with the copy button. 2) Replace every bracketed variable with your real details. 3) Paste it into your AI assistant. 4) Compare the answer with the example output and ask for changes if needed.
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.
/ continue exploring
Related concepts
The vocabulary this page depends on.
- →Few-Shot Prompting
Showing the model 2–5 examples of the task inside the prompt so it mirrors the pattern.
- →Chain-of-Thought Prompting
Instructing a model to think step by step before answering.
- →Iterative Prompting (for Vibe Coding)
Building an app in small, testable prompt steps instead of one giant request.
- →Zero-Shot Prompting
Asking a model to do a task with no examples in the prompt.
Related workflows
Turn this into a repeatable process.
- →Build an Internal Knowledge Bot
Ship a Slack bot that answers questions from your company docs.
Related tool stacks
The tools that run it in production.
- →RAG Starter Stack
Minimum viable stack to ship a production RAG chatbot.
- →AI Support Agent Stack
Tier-1 support handled by an AI agent grounded on your docs, with human handoff.
- →RAG Context Enrichment Stack
A technical stack designed to enrich the contextual data provided to a Retrieval Augmented Generation (RAG) system, improving the quality and depth of LLM responses.
- →Low-Cost RAG Stack
This stack combines open-source and cost-efficient components to build a Retrieval-Augmented Generation (RAG) system with minimized operational expenses.
Related prompts
Reusable prompts for this job.
- →Article Writer with Citations
Draft an article where every non-obvious claim carries a source.
- →SEO Title + Meta Description Generator
Generate 5 title/meta pairs optimized for click-through and keyword coverage.
- →FAQ Block Generator (AEO-Optimized)
Turn any article into 5 crisp FAQ Q&A pairs, formatted for FAQPage schema.
- →Personalized Cold Outbound Email
Write a 4-sentence cold email that opens with a real hook, not a fake compliment.
Comparisons & alternatives
Pick between the options.
- →RAG vs Long Context Windows
Is RAG obsolete now that context windows are 1M+ tokens? Not quite — here's when each wins.