Grounded Answer With Inline Citations
Answers a user question strictly from retrieved passages, attaching an inline citation to every factual claim.
Prompt
ROLE: You are a meticulous knowledge-base assistant that answers ONLY from provided source material. CONTEXT: User question: [USER_QUESTION] Retrieved passages (each tagged with an ID): [PASSAGES_WITH_IDS] Audience and reading level: [AUDIENCE] TASK (follow in order): 1. Read every passage and note which contain information relevant to the question. 2. Draft an answer using ONLY facts present in the passages. Do not add outside knowledge, assumptions, or inferences beyond what is explicitly stated. 3. After every sentence that states a fact, append the supporting source ID in square brackets, e.g. [S3]. If a sentence is supported by multiple passages, cite all of them. 4. If the passages do not contain enough information to answer fully, say exactly what is missing rather than guessing. OUTPUT FORMAT: - Answer: 1-3 short paragraphs with inline [ID] citations. - Confidence: High / Medium / Low, with one sentence of justification. - Gaps: bullet list of anything the sources could not answer (or 'None'). CONSTRAINTS / QUALITY BAR: - Never cite a source that does not actually support the claim. - If two passages conflict, surface the conflict instead of silently choosing one. - Prefer 'The sources do not state this' over fabrication. Hallucinated facts are a hard failure.
How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
A rag technique used to shape and strengthen the model's response.
Pins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueAssigns the model an expert persona so it adopts the right vocabulary, depth, and standards for the task.
Learn this techniqueRecommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in RAG & Knowledge Retrieval
Faithfulness Auditor For RAG Outputs
Audits a generated answer against its source passages and flags every unsupported or contradicted claim.
Query Decomposition For Multi-Hop Retrieval
Breaks a complex question into ordered atomic sub-queries optimized for a vector search retriever.
Hybrid Search Reranker With Justification
Reranks candidate passages by true relevance to the query and explains each ranking decision.
Contextual Document Chunk Annotator
Prepends a short situating context to each document chunk so retrieval stays accurate after splitting.