> 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/agentic-testing/compare-traces.md).

# Compare Traces

The **Compare Traces** feature in RagaAI Catalyst allows users to analyze differences between multiple traces (up to 3) within an experiment. This enables users to:

* Understand how changes in code or parameters affect application behavior and performance.
* Identify improvements, regressions, or anomalies across traces.
* Debug issues and refine workflows with precision.

***

**Steps to Compare Traces**

1. **Initiate Comparison**
   * Navigate to the dataset and click the **Compare** button in the toolbar.
2. **Select Traces**
   * Multi-select up to 3 datapoints (traces) from the dataset that you want to compare.
3. **Open the Diff View**

   * Click the **Compare** button again to open the **Diff View**.
   * The Diff View will display two primary sections:
     * **Attribute Diff**: Highlights differences in attributes such as inputs, outputs, metadata, or evaluation scores.
     * **Code Diff**: Shows line-by-line differences in the code or configurations used to generate the traces.

   <figure><img src="/files/qkcAM2gFSBuy6YwSVyOf" alt=""><figcaption></figcaption></figure>

***

**Key Features of the Diff View**

1. **Attribute Diff**
   * Compares the metadata, parameters, and outputs between traces.
   * Displays differences in metric scores, token usage, and other contextual data.
2. **Code Diff**
   * Provides a visual comparison of the code changes or configurations associated with each trace.
   * Highlights additions, deletions, and modifications line-by-line.
3. **Side-by-Side Comparison**
   * Traces are displayed side-by-side, making it easy to spot discrepancies and analyze changes.

***


---

# 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/agentic-testing/compare-traces.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.
