Source tracing
Supported on
Platform
API
SDK
How source tracing works
When a file is ingested into a vector database, the system records the exact location of every chunk within the source document, including its position within the heading structure and, for page-based formats, its source page. When an agent retrieves a chunk using file search, this location information travels with the result, giving you a direct path from the agent's response back to the original file.
When to use source tracing
- Auditability – Verify that agent responses came directly from your uploaded documents
- Compliance – Produce document-level proof of origin for regulated environments
- Chain of custody – Follow a response from model output to the exact location in the source file
Relationship to context attribution
Context attribution measures the degree of influence each source had on a response. Source tracing identifies where in the source document a retrieved chunk came from. They are complementary: attribution tells you what shaped the response, source tracing proves exactly where in the document it came from.
