Skip to main content
An experiment runs your prompt or agent against a dataset. An offline eval scores the outputs, so you can compare versions against the same test cases and criteria. The example below uses a travel support agent that gives incorrect answers about an airline’s fare policy.
1

Create a dataset

  1. Download travel-support.csv: three Basic fare questions, each with its correct answer.
  2. Go to Datasets → New Dataset → Upload CSV, name it travel-support, add the file, and click Create Dataset.
The airline has its own fare policy. Without that policy in the prompt, the model gives plausible answers based on what it already knows, and those answers are wrong for this airline.
With your own agent, build a golden dataset from the failing traces you found, so every experiment runs against real cases.
2

Load the dataset in the Playground

  1. Go to Playgrounds and choose travel-support from Select a Dataset. Its columns become variables like {question}.
  2. Use this as the user prompt:

Selecting a dataset in the Prompt Playground.

3

Add an evaluator

  1. Click Add Evaluator → New Evaluator and pick the Q&A template, which labels each answer correct or incorrect against reference data.
  2. Under Map Variable to Data:
  3. Save the evaluator.
Define the criteria once and the same evaluator scores every experiment, so results stay comparable across prompt versions.
4

Run the first experiment

  1. Click Run. The Playground runs the prompt over every row and saves the results as an experiment.
  2. Click View Experiment and hover each label to read the judge’s explanation.
Expect incorrect labels, since the prompt doesn’t know the policy. This first experiment records how your prompt performs today. It is the baseline you measure every later change against.
5

Change the prompt and rerun

  1. Click Add → Duplicate and replace the copy’s user prompt with:
  2. Click Run All.
Both prompts use the same dataset, evaluator, and model settings, which makes the effect of the prompt change easier to measure. LLM outputs vary from run to run, so a small difference in scores can be noise.
6

Compare experiments

  1. Open the dataset’s Experiments tab, select both runs, and click Compare.
The comparison answers three questions before you deploy:
  • Did quality improve? Rows labeled incorrect in the baseline are now correct.
  • Did anything get worse? Rows labeled correct in the baseline are still correct.
  • What does the gain cost? Latency and token usage show the speed and cost of the new prompt.
Compare Experiments view showing two experiments side by side

Two experiments compared side by side on the same evaluator.

7

Save the prompt

  1. If the new prompt wins, click Save Prompt to version it in Prompt Hub.
  2. Add new failing traces from production to the dataset as you find them, so each experiment tests against more real-world cases.
Offline evals tell you whether a change is ready to deploy. Online evals tell you whether it performs as expected in production. Next, evaluate production traffic.

Other ways to run experiments

This guide uses the Prompt Playground. Choose a method based on what you’re changing and where you work. On your full agent, in the Agent Playground. Register your agent’s endpoint, then click New Experiment → Run in Agent Playground. The same dataset runs through your entire agent system, so a change to a tool, retrieval, or routing is scored the same way as a prompt change. Compare outputs, traces, and evaluation scores across runs. With your coding agent, using Arize Skills (arize-dataset, arize-experiment, arize-evaluator, and arize-prompt-optimization). See coding agent setup for authentication.
With Alyx:
In code, from the Python SDK, TypeScript SDK, or ax CLI:

Next steps

Previous: Signal to find issues

Next: Evaluate production traffic

Last modified on December 2, 2026