---
title: "Datasets"
url: "/docs/proxy/lens/datasets"
canonical_url: "https://docs.litellm.ai/docs/proxy/lens/datasets"
type: "docs"
last_updated: "2026-11-29"
summary: "Save captured conversations as versioned test cases, add expected results, and reuse them in evals or model comparisons."
related:
  - "/docs/proxy/lens/profiles"
  - "/docs/proxy/lens/evals"
---
# Datasets

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


A dataset is a collection of examples you can test your agent against. Save useful successes and failures from traces, add the response you expect, and reuse the same cases when you change prompts, tools, or models

![A support dataset with captured inputs, recorded replies, expected responses, and export controls](/img/lens/datasets-demo.png)

*Demo data from the Lens UI preview*

## Save your first case

You need access to a [recorded trace](./first-trace.md) and permission to edit datasets. No analysis model is required to save cases

Open **Traces**, select a run, and choose **Add to dataset**. Choose an existing dataset or create one with a descriptive name. Review the captured conversation before saving

Open **Datasets** and select the dataset. Each row is a case. Open a row to review its conversation and expected response. Use the **Source** tab or **Open source trace** to return to the recorded run

Write an expected response that captures the behavior you want to preserve. For a failed order lookup, that might be: “Explain that the order service is unavailable and offer a handoff.” The captured reply is what the agent actually said; the expected response is your reference for future tests

## Reuse the cases

Dataset edits create revisions. [Evals](./evals.md) pin a revision so a comparison uses a fixed set of cases. Choose **Export JSONL** to download the cases for your own tooling, or use **Model optimizations > New optimization > Offline** to compare models on the saved data

If the list is empty, choose **Choose a trace** to save a case. The list includes every dataset you can access. If a case lacks captured input or output, inspect its source trace and fix [content capture](./first-trace.md) before relying on it as a test

## Related pages

- [Profiles](https://docs.litellm.ai/docs/proxy/lens/profiles.md)
- [Evals](https://docs.litellm.ai/docs/proxy/lens/evals.md)
