> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/citations-source-locations-and-download-links.md).

# Citations, Source Locations, and Download Links

Citations connect a response to the source material used to support it. Preserve source identifiers and locations so a reader can inspect the evidence.

{% embed url="<https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FEQpbhkve7GuXbzMCspZX%2Fcitations-source-locations-and-download-links.mp4?alt=media&token=009f2f8c-7152-40ca-8d18-4873ddbc16e2>" %}
A short walkthrough of citations, source locations, and download links.
{% endembed %}

## Before you begin

A retrieval or document-processing path that returns source information.

## Key concepts

| Term           | Definition                                                                                                                                              |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Citation       | A reference linking a response to supporting source material. Preserve the source identifier and available location so readers can inspect evidence.    |
| Source locator | A supported position within a document, such as a page or passage reference. Do not invent a locator when parsing did not return one.                   |
| File reference | An identifier or URL used to pass a file to a supported operation. It must be accessible and use the format expected by that operation.                 |
| Signed URL     | A temporary link authorizing access under its issuance conditions. It can expire and may remain usable until expiration after other permissions change. |

## Enable and inspect citations

1. Inspect the retrieved result for its document ID, title, location, and link fields.
2. Keep those fields attached when passing evidence to the model or interface.
3. Open the displayed citation with an authorized account and check the relevant passage.

The reader can trace the answer to the correct source.

## Behavior and limitations

Do not invent a page number when the source has no page locator. A returned file or provider action result is not automatically a formatted citation. Download URLs can expire. Store durable resource IDs rather than treating a signed URL as a permanent identifier.

## Related resources

[File Inputs, Supported Formats, and Size Limits](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/file-inputs-supported-formats-and-size-limits.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/citations-source-locations-and-download-links.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
