> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-devupd-1765394015-eccef47.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to compare experiment results

When you are iterating on your LLM application (such as changing the model or the prompt), you will want to compare the results of different [*experiments*](/langsmith/evaluation-concepts#experiment).

LangSmith supports a comparison view that lets you hone in on key differences, regressions, and improvements between different experiments.

## Open the comparison view

1. To access the experiment comaprison view, navigate to the **Datasets & Experiments** page.
2. Select a dataset, which will open the **Experiments** tab.
3. Select two or more experiments abd then click **Compare**.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/pC7uS4KE47pwF6As/langsmith/images/compare-select.png?fit=max&auto=format&n=pC7uS4KE47pwF6As&q=85&s=5c2257a30644ad7042ca80a74cb54393" alt="The Experiments view in the UI with 3 experiments selected and the Compare button highlighted." width="1626" height="966" data-path="langsmith/images/compare-select.png" />

## Adjust the table display

You can toggle between different views by clicking **Full** or **Compact** at the top of the **Comparing Experiments** page.

Toggling **Full** will show the full text of the input, output, and reference output for each run. If the reference output is too long to display in the table, you can click on **Expand detailed view** to view the full content.

You can also select and hide individual feedback keys or individual metrics in the **Display** settings dropdown to isolate the information you need in the comparison view.

## View regressions and improvements

In the comparison view, runs that *regressed* on your specified feedback key against your baseline experiment will be highlighted in red, while runs that *improved* will be highlighted in green. At the top of each column, you can find how many runs in that experiment did better and how many did worse than your baseline experiment.

Click on the regressions or improvements buttons on the top of each column to filter to the runs that regressed or improved in that specific experiment.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/NrriGHochpjpI5PZ/langsmith/images/regression-view.png?fit=max&auto=format&n=NrriGHochpjpI5PZ&q=85&s=d22b00fec4a2ca9b10236c12c1727a81" alt="The comparison view comparing 2 experiments with the regressions and improvements highlighted in red and green respectively." width="1632" height="739" data-path="langsmith/images/regression-view.png" />

## Update baseline experiment and metric

In order to track regressions, you need to:

1. In the **Baseline** dropdown at the top of the comparison view, select a **Baseline experiment** against which to compare. By default, the newest experiment is selected as the baseline.
2. Select a  **Feedback key** (evaluation metric) you want to focus compare against. One will be assigned by default, but you can adjust as needed.
3. Configure whether a higher score is better for the selected feedback key. This preference will be stored.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/FNADNW8xifwNBmxK/langsmith/images/select-baseline.png?fit=max&auto=format&n=FNADNW8xifwNBmxK&q=85&s=5f4930cb7c239644e7f96bf67886e945" alt="The Baseline dropdown highlighted with a selected experiment and feedback key of &#x22;hallucination&#x22;." width="1627" height="898" data-path="langsmith/images/select-baseline.png" />

## Open a trace

If the example you're evaluating is from an ingested [run](/langsmith/observability-concepts#runs), you can hover over the output cell and click on the trace icon to open the trace view for that run. This will open up a trace in the side panel.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/EMkNhAapAzVJOXkG/langsmith/images/open-source-trace.png?fit=max&auto=format&n=EMkNhAapAzVJOXkG&q=85&s=80f16e1f71d2601d758226db6cdf9966" alt="The View trace icon highlighted from an ingested run." width="1632" height="662" data-path="langsmith/images/open-source-trace.png" />

## Expand detailed view

From any cell, you can click on the expand icon in the hover state to open up a detailed view of all experiment results on that particular example input, along with feedback keys and scores.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/PGZDvYAdq8T-Gs5W/langsmith/images/expanded-view.png?fit=max&auto=format&n=PGZDvYAdq8T-Gs5W&q=85&s=5ab3bb1610f06a7b019137aff4acb9f2" alt="An example in the Comparing Experiments view of a expanded view of the repetitions." width="1643" height="926" data-path="langsmith/images/expanded-view.png" />

## View summary charts

View summary charts by clicking on the **Charts** tab at the top of the page.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/mRRichw5tQRUNZ9w/langsmith/images/charts-tab.png?fit=max&auto=format&n=mRRichw5tQRUNZ9w&q=85&s=1908c98ed2c9a4a1c4f90c06ccea5c72" alt="The Charts summary page with 8 summary charts for the comparison." width="1639" height="1147" data-path="langsmith/images/charts-tab.png" />

## Use experiment metadata as chart labels

You can configure the x-axis labels for the charts based on [experiment metadata](/langsmith/filter-experiments-ui#background-add-metadata-to-your-experiments).

Select a metadata key in the **x-axis** dropdown to change the chart labels.

<img src="https://mintcdn.com/langchain-5e9cc07a-preview-devupd-1765394015-eccef47/_qwCqdAxeLRQD3t1/langsmith/images/metadata-in-charts.png?fit=max&auto=format&n=_qwCqdAxeLRQD3t1&q=85&s=6ef12a7027293c494ba3bcc3bde11bfb" alt="x-axis dropdown highlighted with a list of the metadata attached to the experiment." width="1637" height="1141" data-path="langsmith/images/metadata-in-charts.png" />

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit the source of this page on GitHub.](https://github.com/langchain-ai/docs/edit/main/src/langsmith/compare-experiment-results.mdx)
</Callout>

<Tip icon="terminal" iconType="regular">
  [Connect these docs programmatically](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
</Tip>
