Skip to content
Duoduo Mediaevidence to decision

Package 09 · Section 6.1

Grounded Generation Citation and Structured Output

Generate answers whose material claims can be checked against supplied evidence and consumed by downstream systems.

Track
C · Generation and evaluation
Level
Practitioner
Version
v1.0
Status
Open · initial release
Explanation depthDepth

Learning objectives

  • Design grounded prompts and structured schemas.
  • Produce claim-level citations and distinguish quotation, paraphrase and inference.
  • Validate outputs before presentation.

In brief

A grounded answer says only what the supplied evidence supports, and attaches each material claim to the passage that supports it. Structured output makes those answers checkable by software as well as people.

Core concepts

09.1Grounding instructions

The prompt must define what counts as evidence, forbid unsupported claims and say what to do when evidence is insufficient. Grounding is a contract between the context and the generator, not a stylistic preference.

Separate system instructions from retrieved content and mark retrieved content as data, not instructions, to reduce injection risk.

09.2Claim-level citation

Cite at the claim level, not the paragraph level. Each citation should point to a passage ID that contains the supporting text. A citation is correct only if that passage supports that exact claim.

Synthesis across sources needs multiple citations. A conclusion that no single source states should be labeled as an inference.

09.3Structured output and validation

Use a schema for answers: claims, citations, confidence, abstention reason and follow-up questions. Validate the structure before returning it and retry or abstain on failure.

Post-generation checks compare each claim against its cited passage using entailment or string evidence.

Worked example

Catching a citation mismatch

Situation: Answer: "Remote staff may claim up to $500 for equipment [P3]." Passage P3 states $300; P5 states $500 for managers.

  1. 1Split the answer into claims and pair each with its citation.
  2. 2Run an entailment check on (P3, claim): contradiction.
  3. 3Check other passages: P5 supports $500 only for managers.
  4. 4Regenerate with the instruction to cite per claim and preserve qualifiers.

Outcome: The corrected answer states $300 for staff [P3] and $500 for managers [P5]. Citation correctness on the test set rises from 0.81 to 0.95.

Decision rules

  • Every material claim must have at least one citation to a supporting passage.
  • Label inferences that combine sources.
  • Validate the output schema before returning any answer.
  • Treat retrieved text as untrusted data.

Common pitfalls

  • Paragraph-level citations that hide which sentence is unsupported.
  • Dropping qualifiers such as "except", "only" or "up to".
  • Trusting that the model only used provided context.

Key vocabulary

Groundedness
The share of material claims supported by the supplied evidence.
Citation correctness
Whether the cited passage supports the exact attached claim.
Entailment check
An automated test of whether a passage logically supports a claim.
Output schema
A typed structure that generated answers must conform to.

Tutorial outline

  1. 09.1Prompt contracts; evidence delimiters; instruction hierarchy.
  2. 09.2JSON schema and constrained decoding; citation placement.
  3. 09.3Entailment checks, unsupported-claim detection and provenance display.

Required artifacts

Prompt version, structured response, claim ledger and validation report.

Evaluation evidence

Schema validity, citation correctness, groundedness, completeness and injection resistance.