Skip to content

Routing eval harness: repeatable fixtures for skill-discovery accuracy (indirect phrasing, clarification, mis-route) #1357

Closed

Description

@malibio

Overview

The skill-mediated routing design (ADR-036) rests on the model reliably (a) forming a good search query from indirect phrasing and (b) judging whether a retrieved skill fits the intent. The supporting evidence so far is ad-hoc and n=1 — sufficient to justify the direction (which rests primarily on the scaling argument), but not sufficient to claim routing is reliable at production rates.

This issue builds a repeatable eval harness that turns those ad-hoc observations into CI regression fixtures, so routing accuracy is measured and guarded rather than assumed. It is the mechanism that earns the reliability claim ADR-036 explicitly defers.

Problem Statement

  • Routing accuracy was observed once, by hand, against llama-server build 8660 — not reproducible, not in CI.
  • ADR-036's load-bearing assumption is the Stage-2 judgment (is this the right skill?) under indirect/adversarial phrasing. That is exactly what is unproven.

Proposed Solution

A harness that runs a fixture set of (user_message [+ prior context], expected_skill | expect_clarify) cases through the routing pipeline and reports per-case outcomes (matched skill, score, clarify-or-act, latency). Runnable locally and in CI against the upgraded engine.

Fixture coverage (minimum)

  • Direct intent → correct skill ("Create an invoice tracking database" → Schema Creation).
  • Indirect phrasing → correct skill ("keep tabs on who owes me money" → Schema Creation; "start tracking my freelance projects" → Schema Creation). This is the Set up Tauri + Svelte project structure #1 case — the load-bearing assumption.
  • Ambiguous → expect clarification, not a guess ("organize my client contacts" — schema vs collection).
  • Existing-type instance vs new-type ("add an invoice for $500" → Node Creation, not Schema Creation).
  • General/search → general semantic_search skill (a normal outcome, not a failure).
  • No-match / out-of-scope → clarify, bounded to one clarification then fall through.
  • Mutating-skill gate: a borderline schema-creation case is gated harder than a borderline read-only case (per ADR-036's blast-radius bar).

Acceptance Criteria

  • Fixture set encoding the cases above, with expected outcomes (skill / clarify).
  • Harness runs them through the routing pipeline and reports per-case pass/fail, matched skill, score, turn count, latency.
  • Runs against the upgraded engine (gated on the llama.cpp upgrade issue); runnable in CI.
  • Baseline numbers recorded; regressions fail the run.
  • The indirect-phrasing and ambiguous-clarify cases are explicitly asserted (the thin-evidence areas).
  • Code passes bun run quality:fix.

Technical Specifications

Reference Files

  • scripts/aichat-matrix.ts / scripts/aichat.ts — existing headless harness to extend.
  • packages/core/src/ops/skill_ops.rs — find_skills (the routing/match under test).
  • NODESPACE_PROMPT_DUMP — capture the assembled prompt/decision per case.

Dependencies

Related Issues

Non-Goals

  • Building the routing pipeline itself (separate issue).

Activity

  1. malibio commented on Jun 6, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 134 test files, 3844 tests passed

  2. self-assigned this
    on Jun 6, 2026
  3. added a commit that references this issue on Jun 22, 2026
    d668a01
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