Skip to content

feat(appkit): managed eval datasets + turn semantics (stack 3/5)#479

Open
MarioCadenas wants to merge 3 commits into
pr/agent-evals-2-frameworkfrom
pr/agent-evals-3-datasets
Open

feat(appkit): managed eval datasets + turn semantics (stack 3/5)#479
MarioCadenas wants to merge 3 commits into
pr/agent-evals-2-frameworkfrom
pr/agent-evals-3-datasets

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Stack 3/5 · targets pr/agent-evals-2-framework (review after #2).

Managed datasets and explicit conversation semantics.

  • Managed datasets: dataset: { table } sweeps a Databricks managed evaluation dataset (a Unity Catalog catalog.schema.table read via the SQL Statement Execution API — the Python datasets API needs Spark). One run per row; t.input/t.expected bind each row. --warehouse + auth required.
  • Turn semantics: one-shot (single send), multi-turn (consecutive sends share a thread), and t.reset() for an independent turn in one test. Each dataset row gets a fresh driver so rows don't bleed.
  • Judges gate by default: a judge miss now fails the eval (was soft); .atLeast(n) sets the threshold, .soft() opts out.

Let an agent eval sweep a Databricks managed evaluation dataset instead of a
single hardcoded turn, and make one-shot vs multi-turn conversations explicit:

- defineEval gains `dataset: { table, limit? }`. The runner reads the UC table
  (via SQLWarehouseConnector over the SQL Statement Execution API — the Python
  datasets API needs Spark), then runs the test once per row with the row bound
  to `t.input`/`t.expected`.
- readEvalDataset reuses the SQL connector's result transform, which already
  JSON-parses `inputs`/`expectations` columns whether stored as JSON or structs.
- resolveWorkspaceClient builds the WorkspaceClient the connector needs, from
  the same profile/host/token as resolveDatabricksAuth. CLI: `--warehouse`.
- Each dataset row gets a fresh driver so rows are independent conversations
  (no thread/context bleed between rows).
- Turn semantics: consecutive `t.send`s share one thread (multi-turn); new
  `t.reset()` starts a fresh conversation for independent one-shot checks in a
  single test.
- Example dataset.eval.ts + unit tests for the reader and reset.

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
…al_dataset

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
LLM-judge assertions (`t.judge.*`) now fail the eval on a miss, like the
deterministic assertions — previously they were soft-by-default and a failing
guideline left the run green. `.atLeast(n)` sets the pass threshold without
demoting; chain `.soft()` to keep a judge as a tracked-only metric.

Surfaces real signal: e.g. a dataset row whose guidelines the agent can't
satisfy now fails the run (non-zero exit) instead of passing silently.

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
@MarioCadenas
MarioCadenas requested a review from a team as a code owner July 16, 2026 14:26
@MarioCadenas
MarioCadenas requested review from atilafassina and removed request for a team July 16, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant