Skip to main content
A dataset is a named set of test cases plus scoring configuration. Every evaluation run locks a snapshot of the dataset at creation time, so editing a dataset later never changes the scoring of past runs. There are two ways to build one: the fluent builder, or importing from a CSV.

Programmatic builder

builder() parameters

add_case() parameters

publish() sends the dataset to AgentX and returns a Dataset object with .id, which you pass as dataset_id to client.evaluations.run().

Expected trajectories

Agentic cases can pin down how the answer should be produced, not just what it should say. Declare the expected tool calls; when a result links its trace (return {"output": ..., "trace_id": span.trace_id} from your agent function), the engine compares the trace’s actual tool-call sequence deterministically:
The verdict lands on each result as a named scorer row alongside the judge rating - and the LLM judge itself also sees the full trajectory in its prompt, so written criteria about tool behavior are scoreable too.

Expected retrieval context

RAG cases can pin what a correct retriever should have fetched. At scoring time the engine compares it against the actually retrieved context - the retrieval_context your agent function returned, else the linked trace’s retrieval spans - using token-level Jaccard similarity, and reports a Context match (jaccard) scorer row (0-1) on each result. It’s deterministic and costs no judge call, so it’s safe to run on every retriever, chunking, or embedding change:
The same field is editable in the dashboard (open a dataset case, Expected retrieval context, blank line between chunks). Jaccard measures token overlap, not meaning - pair it with the RAG judge metrics for semantic verdicts.

Smoke testing

Every variant of a smoke-tested case is graded against the same expected_results as the original question. Both the paraphrase text and the count are generated entirely server-side, .execute() asks the extra variants and submits them automatically:
Your agent function can check case.is_smoke_test_variant if it wants to handle variants differently, but this isn’t required, case.query already holds the text to ask either way. Smoke-test results are scored normally but reported as a separate robustness signal, excluded from report.average_rating so one hard phrasing doesn’t skew your headline score. Only a case’s opening question can be smoke-tested, smoke_test_count/smoke_test_guidance are ignored on follow-up questions.

CSV import

The CSV must have query and expected_results columns. An optional case_id column lets you re-run the same file idempotently: matching rows update existing cases instead of creating duplicates.

Next steps

Quick Start

Run an evaluation against your new dataset

Evaluation Settings

Reuse one grading config across multiple datasets

EvaluationSubject Fields

Describe the agent under test