Skip to content

Where should multi-turn routing benchmark lanes live, and what belongs in them? #353

Closed

Description

@gburachas

Opening this for discussion before sending a PR, because the placement question is worth settling first and the answer changes the shape of the change.

What this is about

We have a set of multi-turn, tool-using benchmark lanes (tau2, tau3) plus a routing-accuracy scorer, built to answer a question the existing benchmark/ harness does not: when the router sends a turn to the weak tier, was that the right call?

benchmark/ today measures whether Terminal-Bench tasks pass through a routed server. These lanes measure routing decisions against per-task ground truth derived from floor and anchor arms. Complementary, but different enough that they may not want to be neighbours.

Question 1 — where in the tree?

Candidates we considered:

  1. benchmark/benches/<lane>/ — what we prototyped. Reuses the existing benchmark/ conventions, and benchmark/*.md is already whitelisted in the CI paths filter. Downside: benchmark/benches/ reads oddly, and it puts two different evaluation philosophies under one root.
  2. benchmark/<lane>/ — flat, as siblings of closed_book_proxy/ and server-configs/. Simpler, but the lane runners are a different kind of artifact from the Harbor tooling already there.
  3. examples/experimental/<name>/ — the litellm precedent, with its own pyproject.toml/uv.lock. Best if the harness should carry dependencies that must stay out of the root lockfile.
  4. A separate repo — these drive third-party harnesses that must be checked out separately anyway.

Note .gitignore already reserves benchmark/perf/results/ for a perf sub-harness that does not exist yet, which suggests some intent about how benchmark/ subdivides — worth knowing what that was.

Question 2 — what belongs in-tree?

Our current answer, for discussion:

In: lane runners, route profiles (native TOML), the routing-log-to-predictions joiner, the scorer, per-domain task-id lists.

Out: all run artifacts (logs, routing logs, transcripts), and all ground truth. Every GT path in the scorer is a required argument with no default — some source datasets are gated or do-not-redistribute, and GT derived from one pair of tiers says nothing about another deployment's, so shipping it would be actively misleading.

Uncertain: the profiles. Eight operating points across two traffic domains, each with an inline classifier rubric. They are genuinely useful as worked examples of mode = "custom" routing, but they encode one deployment's judgement about what "aggressive" means. Do those belong in the repo, in docs, or nowhere?

Question 3 — dependencies

The scorer's optional dashboard needs matplotlib. We deliberately did not add it to pyproject.toml (the slim-install smoke test, and lockfile churn) and instead documented uv run --with matplotlib. Is that the preferred pattern for benchmark-only tooling, or should such deps go in the dev group?

Status

Implemented and working against the native server: the lanes drive switchyard-server --config <profile> --routing-log-file <path>, and the joiner attributes turns to tasks via the task field the routing log already records from x-switchyard-intake-task (falling back to session_id). All profiles are validated with --dry-run in CI-able form.

Happy to send it wherever it should go, or to drop parts that are not wanted in-tree.

Activity

  1. marko-builds commented on Aug 15, 2026

    @marko-builds
    Contributor

    Two of these have answers sitting in the repo already, so I will start there.

    On the benchmark/perf/results/ reservation

    There is a live perf lane: .github/workflows/perf.yml runs aiperf on every PR and on push to main. It writes to perf-results/ at the repo root and uploads that as a build artifact (perf-results-${{ github.sha }}).

    No commit has ever touched benchmark/perf/, so that reservation was never taken up and the ignore rules around it do not describe where perf output goes. I sent the small piece of that separately in #434 so it stays out of this thread. The part relevant here: the precedent that actually runs is that perf output is uploaded, not committed.

    Question 1: placement

    Option 2, flat under benchmark/. The tree already answers it: the runners sit at the top level (prepare_harbor_dataset.py, run_manifest.py, codex_model_catalog.py, run-baseline.sh) and the subdirectories hold things that are not runners (closed_book_proxy/, server-configs/, patches/). There is no existing "a kind of benchmark" nesting level, so benches/ would create
    one for a single occupant.

    One cost of option 1 that is easy to miss. The CI filter is not a whitelist. It is predicate-quantifier: every over "**" plus a list of negations, and !benchmark/*.md matches one level only. benchmark/PROFILES.md skips the full run. benchmark/benches/tau2/PROFILES.md does not, because !**/README.md is the only recursive markdown exclusion. Nesting turns docs changes into full CI runs unless every file in those changes is named README.md.

    Question 2: what belongs in tree

    Your split matches the existing convention, which I think is the strongest argument for it: .gitignore already covers benchmark/tb_runs/, benchmark/datasets/, and **/results/*. Code in, run artifacts and datasets out, is not a new policy here.

    On the profiles, the one you flagged as uncertain. I would keep them, but I do not think "encodes one deployment's judgement" is the test that separates them from ground truth, because both do that. The test that splits them is what a bad reuse looks like. Ground truth from the wrong tier pair yields a visibly incorrect score. Profile thresholds from the wrong deployment produce routing that looks fine and is not.

    So they are safe to ship as worked examples if each one records what it was calibrated against: tier pair and traffic domain. A profile named "aggressive" with no record of aggressive relative to what is the version that misleads.

    One thing worth building into the scorer from the start

    I ported the RESCUE/LOSS quadrant method out of docs/routing_algorithms/stage_router_routing.md for an unrelated keep or cut decision, then built the gating half separately. Three things that came out of that:

    • Gate the worst single item, not only the aggregate. The worked case that convinced me is from the tool I ported the gates from (firecrawl/pdf-inspector): a candidate +0.006 overall with one document down from 0.84 to 0.62. An aggregate-only gate passes that and ships it.
    • Treat a task that produced no output as its own outcome, not as a zero. A missing result otherwise stops being a regression candidate quietly, which is the failure you cannot see in the report.
    • If the two arms agree on every overlapping task, report that as a failed experiment rather than as a rate. A comparison that could not have detected a difference is not evidence that there was none.

    Question 3: dependencies

    No strong view, but uv run --with matplotlib reads right to me for something CI never runs, and it keeps the slim install smoke test meaningful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions