Glossary
Source attribution
The practice of tying each claim in an AI answer to the document, page, passage or timestamp it came from, so that a reader can check it.
Source attribution is the practice of linking each claim in an AI-generated answer to the specific source it came from: a document, a page, a paragraph or a moment in a recording. In retrieval augmented generation it usually takes the form of citations attached to the answer, each pointing at a passage the model was given. Attribution lets a reader check the answer, and it lets a developer tell whether a wrong answer came from poor retrieval or from the model misreading good context.
How source attribution works
Attribution depends on keeping location data with every piece of text from the moment it is indexed. When a document loader reads a PDF, it records the file and page for each block of text. Audio transcription attaches start and end times to each segment, sometimes down to word-level timestamps, and a web page keeps its URL. After chunking, each chunk carries that location as part of its file metadata.
At question time the retriever returns chunks together with their locations. The prompt labels each chunk with an identifier, and the model is told to cite identifiers next to the claims they support. The application then turns those identifiers back into links, page references or timestamps that the reader can follow.
The granularity of the location decides how useful a citation is. A citation to a 200-page manual is barely better than none. A page number, a paragraph or a time range such as 14:32 to 15:10 lets the reader confirm the claim in seconds. This is why sub-document retrieval, which returns the passage rather than the whole file, matters for attribution as much as for accuracy.
Granularity | What it points to | Typical sources | How easy it is to check |
|---|---|---|---|
Document | A file or URL | Any | Slow for long files |
Page | A page number | PDFs and scanned documents | Good |
Passage | A paragraph or chunk of text | Documents, notes, web pages | Quick |
Time range | Start and end timestamps | Audio and video | Quick |
Scene or region | A video scene or part of an image | Video and images | Quick for visual content |
Attribution and grounding
Attribution and grounding are related checks with different questions. Grounding asks whether the answer is supported by the retrieved context at all. Attribution asks which passage supports each claim. An answer can be grounded with poor attribution, where the facts are in the context but the citations point at the wrong chunk. A model can also attach a plausible citation to a claim the source never makes. That second failure is a form of hallucination, and it is harder to spot because the citation looks authoritative.
Evaluation frameworks measure both. Faithfulness scores whether each claim is supported by the context, and citation precision checks whether the cited passage is the one that supports it. Both are usually scored with an LLM as a judge against a golden dataset of questions with known answers, and RAGAS includes faithfulness among its standard metrics. In regulated work, citations also become part of the audit trail for how an answer was produced.
Where attribution goes wrong
Most failures start upstream of the model. If the loader drops page numbers, or a PDF parsing step merges pages, no prompt can produce an accurate page citation. Large chunks make citations vague. Small chunks without their surrounding context lead the model to cite a fragment that only half supports the claim, which techniques such as parent document retrieval address. Several copies of one document produce citations to different versions, covered under deduplication, and outdated copies produce citations to text that is no longer true, covered under stale knowledge.
There is also the question of display. Readers need to see the cited text, or reach it in one click, rather than a number in brackets. The post on citation design looks at the formats people check and the ones they ignore.
Source attribution on Exabase
Exabase keeps location references with content from ingestion onwards. Files saved as Resources are extracted and indexed on arrival, and Deep Search returns matched chunks with a relevance score and their location: a page number for documents, a timeStart and timeEnd range for audio and video, and the matching scene for video. Your application passes those chunks to the model with their references and renders the citations. The searching resources guide shows the response shape.
For files that should not be stored, Extract returns text chunks with a sequence number and a pageNumber or timestamp range, using one endpoint for every format, and the chunks endpoint pages through them. Exabase supplies the passages and their locations; the citation format, the prompt and any citation checking stay in your application. The RAG accuracy solution describes the wider setup, contract analysis is a case where page-level citations are a requirement, and Exabase vs Vectara compares this approach with a managed RAG platform.
FAQs
What is source attribution in AI?
Source attribution is linking each claim in an AI answer to the source it came from, such as a document, page or timestamp. In RAG systems it usually appears as citations to the retrieved passages.
Why does source attribution matter?
It lets readers verify answers and lets developers debug them. When an answer is wrong, the citation shows whether retrieval returned the wrong passage or the model misread the right one.
Can a model cite sources it was not given?
Yes, if nothing constrains it. A model can produce references that look real. Restricting citations to the identifiers of passages in the prompt, and checking them afterwards, prevents most of this.
How is source attribution different from grounding?
Grounding asks whether the answer is supported by the context; attribution asks which passage supports each claim. Answers people can check need both.
How do I add page numbers to RAG citations?
Keep the page number in each chunk’s metadata from extraction onwards, include it in the prompt label for that chunk, and render it with the citation. Deep Search returns page numbers with each matched chunk.
Can audio and video be cited?
Yes, with timestamps. A transcript chunk carries its start and end time, so a citation can link to the exact moment in the recording, and video results can point to the scene where something was shown.
Related pages: Grounding, Faithfulness, Sub-document retrieval, Hallucination, Retriever, RAG pipeline, Deduplication, RAG accuracy, RAG pipelines use case, Best RAG as a service, Deep research