> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seekr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Source tracing

> Trace retrieved chunks to their exact location in the original source document.

export const SupportedOn = ({ui = false, api = true, sdk = true}) => <div className="inline-flex flex-wrap items-center gap-x-5 gap-y-2 px-4 py-2.5 rounded-lg border border-[#00dad3] bg-[#00dad3]/10 text-sm not-prose">
    <span className="font-bold text-black dark:text-white whitespace-nowrap">
      Supported on
    </span>
    <div className="flex items-center gap-5">
      <span className="inline-flex items-center gap-1.5 font-semibold text-black dark:text-white">
        <Icon icon={ui ? "circle-check" : "circle-xmark"} color={ui ? "#00dad3" : "#9ca3af"} size={16} />
        UI
      </span>
      <span className="inline-flex items-center gap-1.5 font-semibold text-black dark:text-white">
        <Icon icon={api ? "circle-check" : "circle-xmark"} color={api ? "#00dad3" : "#9ca3af"} size={16} />
        API
      </span>
      <span className="inline-flex items-center gap-1.5 font-semibold text-black dark:text-white">
        <Icon icon={sdk ? "circle-check" : "circle-xmark"} color={sdk ? "#00dad3" : "#9ca3af"} size={16} />
        SDK
      </span>
    </div>
  </div>;

<SupportedOn ui={false} api={true} sdk={false} />

<CardGroup>
  <Card title="Source tracing" icon="code" href="/flow/sdk/explainability/source-tracing">
    Trace retrieved chunks to their source document programmatically.
  </Card>
</CardGroup>

## 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.
