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

Repetition statistics

With number_of_requests above 1, the run reports caseStatistics: per case, the averageRating, minRating, maxRating, and ratingVariance across the repetitions (cases need at least two rated repetitions; smoke-test variants are excluded). A case swinging between 3 and 9 is a different problem from a case stuck at 6, and only the variance tells them apart. Connector-driven runs - the dashboard invoking your connected agent endpoint - honor the dataset’s numberOfRequests too, clamped to 1-10.

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.

Splits

One golden dataset usually serves two budgets: a handful of cases on every PR, everything on a schedule. Tag cases into named subsets and pick the subset at run time instead of maintaining two datasets:
A run with split="smoke" executes only the tagged cases; omit split to run everything. The dashboard’s Run dialog and connector-driven runs take the same split. Case indexes are preserved across split and full runs, so per-case history lines up whichever subset ran.

CSV import

from_csv() returns the same builder as above with one case per row, so you can keep chaining (.add_case(...)) and must finish with .publish():
The only required column is query. Optional columns: expected_results, plus expected_capabilities, expected_knowledge_base, and expected_delegations (semicolon-separated lists). Rows with an empty query are skipped with a logged warning. Any extra keyword arguments (criteria, similarity metrics, judge_model, …) are passed through to builder().
client.evaluations.datasets.from_dataframe(df, name=...) does the same from a pandas DataFrame with the same column contract.

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