RAG & Retrieval · Ground answers in evidence

How do you prompt for grounded, cited answers?

MediumpromptinggroundingcitationsUpdated Oct 2026
Quiz this track

Short answer

Instruct the model to use only the supplied evidence, cite source IDs for each claim, and say when the evidence is insufficient. Then verify the citations rather than trusting them.

Grounding is a contract: the answer must be supported by the provided passages, and unsupported claims must be omitted or flagged. The prompt should make that contract explicit, but the enforcement happens in evaluation and output checks.

  • Tell the model what to do when evidence is missing, not just what to do when it is present.
  • Require inline citations keyed to passage IDs.
  • Separate instructions from the passages with clear delimiters.
  • Reject or repair answers whose citations do not resolve to a supplied passage.
A model can invent a citation. Validate that every cited ID exists and that the cited passage actually supports the sentence.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What should the model say when the evidence is partial?
  2. 2How would you validate that a citation supports its claim?
  3. 3Why is 'answer only from context' not enough on its own?

Say it in the interview

I make the contract explicit: use only the supplied passages, cite the passage ID for every factual claim, and say when the evidence is insufficient. I keep instructions and evidence clearly separated. But I do not trust the prompt alone, because the model can invent a citation or attach a real one to the wrong claim. I validate that cited IDs exist and that the passage actually supports the sentence.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live RAG & Retrieval mock interview and get scored feedback on depth, clarity and confidence.