# 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="https://1811327582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYbIiNdp1QbG4avl7VShw%2Fuploads%2FDq8PmM9UCFUQY4Tz81VD%2FUntitled%20design%20(1).gif?alt=media&#x26;token=df93a9c2-1e9b-4af2-9f00-f25c2909ed8e" 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.

***
