Skip to content

Agent matrix scores trajectory where it should score outcome — correct results fail, severity is flattened #2243

Closed

Description

@malibio

Summary

The agent matrix asserts on trajectory — which tool fired, how many times, in what order. The field standard for this problem shape is to assert on outcome — what the database looks like when the turn ends — and use the trajectory as a diagnostic rather than the score.

The current approach makes the scorer disagree with the product in ways that are now measured, not hypothetical.

Three live examples

A correct result scored as a failure. DeepSeek V4 Pro on scenario 6 called update_node and produced the right end state, but failed because it did not call resolve_query first. It reached the correct outcome by a shorter path and lost a point for it.

Self-correction scored as a failure. The fixture's own comment on 11a records create_node being rejected for a missing node_type, the model supplying it, and the second call persisting — then the scenario reds out on the exactly-once rule. That is the recovery behaviour we want, punished.

Severity is flattened. Every scenario is worth one point, so:

  • two search_nodes calls (wasted latency, no harm)
  • two create_schema calls (a spurious type in the user's graph, real cleanup)
  • zero search_nodes on a query (the user gets a wrong answer)

all score identically. The fixture already knows this is wrong — noRetry exists precisely because "an empty or narrowing result may legitimately prompt one follow-up search, so a hard count of 1 would red out correct behavior." That reasoning was applied to reads and never to writes.

Why outcome-based grading fixes all three at once

Assert on the graph's end state: node of type X exists with property Y=Z; edge of type mentions connects A and B; no unexpected nodes created.

  • Path-agnostic, so scenario 6's shorter route passes.
  • Self-correction passes, because the end state is what it should be.
  • Severity falls out for free: two search_nodes calls pass (nothing persisted), two create_schema calls fail the "no unexpected nodes" clause (a spurious type exists). Exactly the discrimination that is missing today, with no severity table to maintain.

This is τ-bench's design — agent operates on a database via an API, graded by diffing final DB state against a goal state — and it is the closest published analogue to what NodeSpace's agent actually does.

The harness already has the raw material

ToolCallRecord carries isError, fieldCount and contentOnly, and the fixture's schemaCallsAreSound / callPersistedProperties / targetToolWasNotRejected helpers already check results rather than tool names. The types.ts comment states the principle outright: asserting on arguments "would measure what the model asked for… the result is what the system actually persisted." Outcome-based assertions are the completion of a direction this fixture has already started, not a new philosophy.

Also in scope: cascading scenario groups

Scenarios share a chat node within a group, so an early failure craters the rest and the results are not independent observations. Both documented in the fixture's own comments: one ambiguous verb in 11a sent create_relationship out with to_id: null and left 11d with no edge to traverse — "All three of this group's failures traced back to this one word choice." The committed results note a run where "scenario 4 never creating the node scenario 6 needs" cascaded.

This inflates variance (see #2241) and makes per-scenario failure counts misleading. Setup turns that exist only to establish state (11a, 11b) should be fixture setup, asserted separately and not scored, rather than scored scenarios whose failure invalidates their successors.

Suggested sequencing

  1. Add graph end-state assertions alongside the existing ones; record both for a few runs to see where they disagree.
  2. Move group setup out of the scored set.
  3. Retire toolOnce/toolSequence as the primary score once the end-state assertions are trusted, keeping trajectory in the results file as a diagnostic.

Not a small change, which is why it is filed rather than done inline. But every finding in #2239 that turned out to be an instrument problem rather than a model problem points here.

Related: #2241 (repetition/pass^k), #2242 (winnability of 6/8e/11d), #2240 (Stage-2 withholding asserted tools).

Activity

  1. malibio commented on Aug 22, 2026

    @malibio
    CollaboratorAuthor

    Baseline (worktree issue-2243-outcome-grading): Frontend: 227 test files passed, 4794 tests passed, 0 failed.

  2. self-assigned this
    on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions