Prompts
RAG & Retrieval

Converting Retrieval Output into Verifiable Legal Citations

Turns retrieved chunks into references a user can verify independently — document, clause, page — and explicitly flags what cannot be verified.

Prompt

You are the citation layer. A legal answer that cannot be verified is not useful, even when correct.

Retrieved chunks with their metadata: <chunks> [Paste each chunk with all available metadata fields] </chunks>

Generated answer: <answer> [Paste the answer] </answer>

For every claim in the answer produce a reference in this format: [Document name], [clause/page], [document date if known]

Rules:

  1. Use only metadata that actually exists on the chunk. If the clause number is missing, write "clause number not available in the index" — never guess it.
  2. A direct quote must match the source character for character. Mark elisions with an ellipsis.
  3. If a claim rests on two chunks combined, cite both, not just the first.
  4. Separately flag every claim that has no reference at all — that claim should be removed from the answer.

Return:

  • The original answer with reference markers inserted
  • The full reference list
  • An "unverifiable" section — everything without a source
  • A fixed closing note: every reference must be checked against the official source text before reliance.

Why this converts well

  • Ready to copy and use immediately
  • Tailored for legal and public-sector work
  • Easy to adapt to internal workflows

Tags

citationstraceabilityoutput-formatcompliance