Back to all updates

Turn traces into test cases

Build versioned datasets from production spans, evaluation runs or your SDK.

A support agent's span is added to the Support tickets dataset, then opened as a test case with the span's input and its output as the expected result.

Datasets hold the cases your evaluations run against. Every change publishes a new version, so each run points at the exact cases it was scored on.

Add cases from wherever you find them:

  • From a trace. Open a span and choose Add to datasets to save its input and output as a test case.
  • From a run. Use Save as test case on a case in an evaluation run to save it back to its dataset.
  • From code. Build a Dataset in Python or TypeScript and push it, or let evaluate publish it for you.
python
from traceroot import Dataset
from traceroot.eval import PlatformDatasetSync

ds = Dataset("Capitals QA", key="capitals-qa")
ds.add({"country": "France"}, expected="Paris")
ds.push(PlatformDatasetSync())

Open Datasets to browse versions.

A dataset's version picker with version 2 selected and version 1 still available.

Open a case to see its input, its expected output and the runs that used it.

A dataset case with a customer support message as its input and the expected category and facts, next to a tab listing the six evaluation runs that used it.

See datasets for saving, publishing and pulling them in code.

Trust
SecurityTrust Center PrivacyTermsCookie settings

Essential storage keeps the site working. You can choose whether to allow product analytics.