456
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].