> For the complete documentation index, see [llms.txt](https://docs.raga.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.ai/ragaai-catalyst/concepts/uploading-data/correlating-traces-with-external-ids.md).

# Correlating Traces with External IDs

Enterprises usually maintain comprehensive logs in multiple places. For instance, workflow APIs could log the same LLM traces on an internal cloud service as well as on RagaAI Catalyst (if enabled) for observability. Using trace correlation as outlined below, users can now assign an external ID for each trace uploaded to Catalyst, for better maintainability and direct URL access.

```python
query_list = [
    "Summarize the document in 10 words",
    "Summarize the document in 20 words",
    "Summarize the document in 30 words",
]
for i, external_id in enumerate(['exid_1', 'exid_2', 'exid_3']):
    tracer.set_external_id(external_id)
    main(query_list[i])
```

As shown, the `set_external_id` method can help assign new alphanumeric IDs programatically before calling your main function (assumed as a proxy for your LLM call). This will assign the last passed ID to the next trace that is uploaded.

Note that the ID should be updated before each call to avoid ambiguity. In the above example, the mapping would be something like:

| External ID | Prompt                               |
| ----------- | ------------------------------------ |
| 'exid\_1'   | "Summarize the document in 10 words" |
| 'exid\_2'   | "Summarize the document in 20 words" |
| 'exid\_3'   | "Summarize the document in 30 words" |

Eventually, users can access the specific trace on RagaAI Catalyst directly from their central logs using a URL that would be something like:

`https://catalyst.raga.ai/<project-name>/<dataset-name>/<external-id>/`&#x20;


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.raga.ai/ragaai-catalyst/concepts/uploading-data/correlating-traces-with-external-ids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
