Understand
Retrieved Source Attribution
What sources did the system draw from?
Exposes the documents a response was actually built from, so users can verify claims against the originals.
- Evidence: research-based (Lewis et al. 2020, Es et al. 2023)
- Tested: concept only, mock data
Overview
Why it matters
The sources exist. The interface just doesn't show them.
A knowledge assistant gives a convincing answer, someone acts on it, and later nobody can say where it came from. Systems that look things up before answering do have sources. Without attribution design, people can't check them.
This is about what the system looked up for this answer. For the data a model was trained on, see Data Provenance & Lineage.
What does it look like?
Verify a specific claim
Verify a specific claim
- User receives a response with inline citation markers.
- User clicks [2] on a specific sentence.
- Passage panel expands showing the retrieved excerpt, source title, and relevance score.
- User clicks through to the full original document.
Assess overall grounding
Assess overall grounding
- User sees "Based on 3 sources" in the response header.
- User opens the source panel.
- User sees one source is highly relevant, two are marginal.
- User decides to re-prompt or seek additional verification.
No source found
No source found
- User asks a question outside the document corpus.
- System responds but shows "No sources retrieved: response based on model knowledge."
- User is prompted to verify independently or provide a document.
When does it fit?
Use it when
- The system looks up documents before answering
- People need to check claims or cite sources
- Accuracy matters, as in legal, medical or policy work
Skip it when
- There is no lookup step
- The sources are confidential or legally restricted
- The task is casual and sources would only add noise
Design
How do I apply it?
-
Layer the sources.
A source count first, titles on request, full passages after that.
-
Tie citations to claims.
A list at the bottom is weak. Markers next to sentences are honest.
-
Show how strong the match was.
A close match and a loose one should look different.
-
Show the "no source" state.
If an answer came from the model alone, say so.
-
Sources aren't proof.
A real source can still be misquoted. Pair with Grounding & Hallucination Indicators.
For your technical team
In retrieval-augmented generation, retrieval relevance (for example similarity scores) and answer faithfulness are separate measures. Surface relevance per source, and evaluate faithfulness separately before claiming an answer is supported.
How can I show it?
Source count summary
"Based on 4 sources" at a glance.
A compact indicator in the interface showing "Based on 4 sources": gives a quick sense of whether the answer is well-grounded or based on a single retrieved document.
No source found state
Says plainly when no source was used.
An explicit design state for when the system generated an answer without retrieving supporting material. This is not a failure state: it's a transparency signal that the response came from model knowledge, not a document.
Inline citation markers
Markers next to the sentences they support.
Superscript numbers or footnote markers anchored to specific claims in the output, not just a list at the bottom. Users can see exactly which sentence came from which source.
Relevance indicator
How closely each source matched the question.
A visual signal (bar, dot, percentage) showing how closely a retrieved source matched the query. Helps users assess whether the retrieval was a strong match or a loose approximation.
Passage highlight
The exact passage, shown in context.
When a user clicks or hovers a citation marker, the retrieved passage is highlighted or shown in context, not just the document title.
Further left for everyday answers, further right for research and compliance work.
What does it cost?
Transparency vs. overload
All passages by default overwhelm. Summary first, detail on demand.
Attribution vs. false confidence
A tidy source list can make an answer look more solid than it is.
Disclosure vs. security
Showing documents can expose internal stores. Show types or categories where needed.
Connections
Which patterns work with it?
Data Provenance & Lineage
Where does this data come from?
Provenance concerns training data; this pattern concerns runtime retrieval. They address different moments in the AI pipeline.
Grounding & Hallucination Indicators
Can I trust what the system generated?
Attribution shows what was retrieved; Grounding signals whether the output faithfully reflects it. Use together in high-stakes contexts.
Confidence & Uncertainty
How certain is the system?
Retrieval relevance scores complement output confidence signals.
Inspection Dialogue
Can I ask the system follow-up questions?
A user asking "where did you get that?" is a natural continuation of this pattern.
Sources (3)
Sources (3)
Lewis et al. (2020) — Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
foundational paper establishing RAG as an architecture. Introduces the retrieval-generation split that makes source attribution both possible and necessary
Es et al. (2023) — RAGAS: Automated Evaluation of Retrieval Augmented Generation
introduces faithfulness and context relevance as measurable properties of RAG outputs. Provides the evaluative framing this pattern operationalizes for users
Gebru et al. (2018) — Datasheets for Datasets
while focused on training data, its framework for documenting data sources, collection methods, and intended use informs how retrieved sources should be disclosed
Your knowledge assistant answers, and nobody can say where the answer came from.
Internal search, policy assistants, support chatbots. That's where this pattern starts. Let's look at your interface together.
Work with me