> 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/guides-and-quickstarts/evaluations-and-observability/run-and-inspect-an-experiment.md).

# Run and inspect an experiment

An experiment runs a workflow against a dataset and scores the responses. Use it to compare workflow behavior across versions or find inputs that need attention.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FbXmKuo9wkUBUzHpTjgEu%2FG083.mp4?alt=media&token=81c67471-e568-4d60-b6fc-18de09e33814>" %}

## Before you start

Prepare a reviewed [evaluation dataset](https://docs.stackai.com/guides-and-quickstarts/evaluations-and-observability/create-an-evaluation-dataset.md) and a tested [evaluator](https://docs.stackai.com/guides-and-quickstarts/evaluations-and-observability/configure-an-evaluator.md). Record the workflow version and the quality requirement before starting. To compare a change, run the same cases with the same evaluators against the versions you intend to compare, then inspect changed failures as well as the aggregate.

Create a dataset and the evaluators you want to use.

## Configure and run an experiment

Open Evals → Experiments → New experiment and select the dataset, evaluators, and workflow version.

![Experiment dataset, evaluators, and version selection](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/O0OpQ1yparQY7beu3dBt/assets/g083-g083-01-setup.png)

Review the execution count before starting the experiment.

Select Run and wait for execution and scoring to finish.

![Experiment execution and scoring progress](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/wXMuCwYXi24uxWoCQK7u/assets/g083-g083-02-run.png)

In-progress rows and placeholder scores are not final results.

## Inspect passing and failing results

Open a passing row and compare the input, expected output, actual output, and score.

![Passing evaluation row](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/KzeThXxdsX0oYucRP8AC/assets/g083-g083-03-pass.png)

Confirm why the evaluator accepted the result.

Open a failing row and compare the same fields.

![Failing evaluation row](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/Mkm44B9FRAozMguSVTZl/assets/g083-g083-04-fail.png)

Determine whether the output is wrong, the reference is wrong, or the evaluator does not fit the task.

## Separate execution errors from low scores

Use Open trace to inspect the underlying workflow execution.

![Open trace for the underlying execution](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/ybwKMdRHgXANxfxvMWKL/assets/g083-g083-05-trace.png)

A workflow can execute successfully while its output fails a quality comparison.

## Review the experiment summary

Return to the experiment summary after all rows are scored.

![Completed experiment summary](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/31ujikGOeEF7pu9Rwz0f/assets/g083-g083-06-summary.png)

Interpret the aggregate together with the individual failures rather than relying only on the overall percentage.

## Important behavior

A successful execution can still receive a low evaluation score. Inspect the response, expected answer, and evaluator before deciding what to change.


---

# 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/guides-and-quickstarts/evaluations-and-observability/run-and-inspect-an-experiment.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.
