Prompt
Grounded Answer Prompt
Force the model to answer only from provided sources, with citations.
1 min read
/ quick answer
Use as the final step of a RAG pipeline to prevent hallucination. Force the model to answer only from provided sources, with citations.
Force the model to answer only from provided sources, with citations. Use as the final step of a RAG pipeline to prevent hallucination. Copy the prompt below, swap the bracketed variables for your own context, and run it in any capable model. This prompt node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Context
Use as the final step of a RAG pipeline to prevent hallucination.
Prompt
Answer the question using ONLY the sources provided. If the sources do not contain the answer, say "I don't know based on the provided sources."
Sources:
{{sources}}
Question: {{question}}
Cite each claim as [source_id].Example Output
Our refund policy allows returns within 30 days of purchase [doc_12]. Items must be unused and in original packaging [doc_12].
Related Workflow
Related Tool Stacks
/ frequently asked
What does the Grounded Answer Prompt prompt do?
Use as the final step of a RAG pipeline to prevent hallucination.
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?
Our refund policy allows returns within 30 days of purchase [doc_12]. Items must be unused and in original packaging [doc_12].
↳ connected nodes
Workflow↳ linked
Build an Internal Knowledge Bot
Ship a Slack bot that answers questions from your company docs.
Tool Stack↳ linked
RAG Starter Stack
Minimum viable stack to ship a production RAG chatbot.
Dictionary↳ linked
RAG (Retrieval-Augmented Generation)
Inject external knowledge into an LLM at query time.
Dictionary↳ linked
Vector Database
A database optimized for similarity search over embeddings.
Workflow↳ linked
AI Customer Onboarding Flow
Walk every new user through activation with an AI guide.
Dictionary↳ linked
Semantic Search
Finding information by meaning rather than exact keyword match.
Workflow↳ linked
RAG Content Ingestion Pipeline
Convert messy docs into searchable, cited knowledge chunks for AI systems.
Dictionary↳ linked
Agentic RAG
RAG where an agent decides what to retrieve, when, and from which source — instead of a single static query.
Workflow↳ linked
Personal Research Assistant Workflow
A repeatable system to research any topic deeply in under 30 minutes.
Dictionary↳ linked
Hallucination
When an LLM confidently generates false or fabricated information.
Dictionary↳ linked
Temperature
The randomness knob on an LLM's output distribution.
Workflow↳ linked
Build a Tier-1 Customer Support Agent
An agent that handles common tickets end-to-end and hands off the rest.