How They Use AI  |  Newest

<< Home  |  Prompting craft

Model restricts answers strictly to provided context

AreaPrompting craft
AI usedAny
SourceReddit thread
Posted2024-05-23

The move

Instruct the model to answer only using the provided context and cite sources.

Steps

  1. Set the model temperature to 0.
  2. Add a system instruction to only answer using the provided context.
  3. Explicitly forbid the model from making up answers.
  4. Require the model to show the source for its claims.

Prompt for your AI

Answer only using the context given and do not make up answers. Return/show the source(s) along with the answer.

What happened

Users struggling with RAG hallucinations found that the model often invents information outside of the provided documents. By setting the system prompt to restrict the model to the context and requiring source citations, accuracy improved. Commenters confirmed that combining these instructions with a temperature of 0 significantly reduces randomness and fabrication.

Who confirmed it

Temp 0 and explicit instructions in the system prompt.

Watch out

None stated.

Give it to your agent

Read https://howtheyuse.ai/p/model-restricts-answers-strictly-to-provided-context.md and help me do this.

Sources



Last updated November 26, 2026.