8.7 Established

Grounding patterns and source attribution in AI outputs

An answer surface with mandatory inline per-claim citations and an expandable source panel showing the authoritative source, its date, and institutional provenance, with machine-readable provenance metadata for downstream agents.

01 Emerging Challenges

When an AI agent retrieves information from a public-data tool and presents it to a citizen, the citizen needs to be able to trace where each claim came from and check it against the source.

The grounding problem is to anchor what the agent generates to retrievable records and surface those records in the interface. It is narrower than certifying the tool as a whole: the question is whether this specific output is traceable to a specific source.

02 Assurance

Government needs every substantive claim an agent presents to be traceable to an authoritative source a citizen or agent can check, so a figure or a rule the agent states can be confirmed against the record it came from rather than taken on the model's word. For high-consequence answers it needs assurance that the content was retrieved from that record at all, not produced by the model.

03 Access

A mandatory per-claim citation and typed-function grounding bar shuts out the small builder, the long tail with no budget to build bespoke retrieval infrastructure, whose tool then cannot be published even when its answers are sound. Keep the path open with shared, reusable grounding and citation components a small builder can adopt, so meeting the attribution bar does not require building the retrieval layer from scratch.

04 Response surface
Interaction design Considered
The response this pattern proposes

Each factual claim in the answer carries an inline citation backed by a typed read-only function call, so a substantive answer about government data is retrieved from the source rather than generated.

No surface has been built yet; the approach above is the brief for one.

05 Maturity
  1. Established Headline

    For retrieval-augmented generation architecture.

  2. Emerging

    For citation interface design.

  3. Frontier

    For typed-function grounding in government services, which has no working precedent.

06 Precedents

Retrieval-Augmented Generation (RAG) with source attribution (2020–present). RAG systems retrieve documents from a corpus, inject them into context, and generate answers grounded in retrieved content; RAG-based grounding substantially reduces hallucinations versus ungrounded generation (reported reductions vary by study and setting). The TREC 2025 RAG Track formalizes evaluation across relevance, completeness, attribution verification, and agreement analysis.

Citation UX across AI assistants (2024–2026). Patterns vary substantially: Perplexity gives inline per-claim attribution with a persistent source panel (~22 citations/response); ChatGPT gives inline numbered references with expandable source cards; Google AI Overviews shows a source list without guaranteed inline numbers (~8 citations/response). Cross-platform divergence is high: only 11% of domains are cited by both ChatGPT and Perplexity for the same query.

Typed, read-only functions (design pattern). The strongest grounding pattern constrains the agent to call typed, read-only functions against authoritative data sources rather than generating from parametric memory. A query about, say, a zoning classification triggers a function call to the planning authority's API, which returns a structured result the agent can present but not modify. Source provenance is inherent in the architecture: the answer came from the API, not the model's training data, which eliminates the class of errors where document retrieval invites invented figures.

07 Transferability

Source attribution transfers directly and is a requirement for government AI services. The pattern library can specify a set of components.

Inline citation is mandatory for any claim derived from a specific source, attributed per claim as in the Perplexity model rather than gathered into an end-of-response list. A source panel shows the authoritative source, its date, and institutional provenance. Typed function grounding is the preferred architecture for factual questions about government data: it is stronger than retrieval-augmented generation (RAG) alone because it removes the generation step for substantive content. Machine-readable provenance metadata lets downstream agents verify source chains programmatically.

08 Where things go wrong

The failure mode is a system generating a figure from inference rather than reading the authoritative record. Typed, read-only grounding against that record means it reports the actual value rather than an invented one, eliminating the class of fabricated numbers that drive wrongful determinations.

09 Sources
5 references International