design draft

16. Measure the front

Status: unimplemented — design draft. This chapter is a plan for the owner to edit. It ships no code yet, and paths marked planned do not exist.

Premise

The front now makes a decision on every message. This chapter measures it like any classifier, so a threshold means something and adding a route is a small, tested change.

Draft

Every member inherits the front's mistakes, so the front gets measured first.

The method is ordinary. You keep a set of messages labeled with the right route. You hold some of them out. You run the front on the held-out set and count. You calibrate, so that when the front says 0.9 it is right about nine times in ten. Then you set thresholds on the calibrated numbers. A prepared answer, for example, is served only when the front is very sure.

In the old tree the router read 0.907 route accuracy on held-out conversations, and prepared answers were served only above a precision threshold. Those numbers belong to that system, that model and that label set. This chapter does not carry them forward. It rebuilds the measurement, and the new numbers go in the chapter when they exist.

The measurement is what makes the front extensible. A new route is a new option in a typed question plus labeled rows. You add them, recalibrate, check the held-out set and release. No model is retrained. Episode 289's "show the deck" and "do it with Codex" were each added to the old router this way in a day.

The essay records one failure to keep in mind. The night before a launch, the decision provider's account ran out of credits, and every turn fell back to plain conversation. A composition should not have a single point of judgment.

What we build

A plan for what this chapter ships once the draft is approved:

  • A labeled message set with a held-out split, and a tool that reports route accuracy and calibration.
  • A release gate: a new question set ships only if the held-out numbers do not get worse.
  • The steps for adding a route, written as a recipe a contributor can follow.

It builds on what exists today:

On the protocol (chapter 65):

RecordSchemaCarriageToday
Labeled messages and calibrationopenagents.decision.v1 CalibrationSet, CalibrationRecord (spec 16.1)Files; not sentSpec sketch; no .proto file

The chapter's check

  • Source: the eval tool in openagents/agent/front/eval/, run over a labeled message set with a held-out split. The front's answers come from recorded decisions, so the run needs no network.
  • Trace: the tool prints route accuracy, counts per route and the calibration bins for the held-out split. With recorded decisions the output is the same bytes on every run.
  • Refusal: a new question set whose held-out accuracy is lower than the current one fails the release gate. The tool prints both numbers and not released, and the current question set stays in place.
  • Independent check: a ten-row labeled set worked by hand. Seven rows have the right route, so accuracy is 0.7, and the hand-counted calibration bins match the tool's output for the same rows.

Planned paths: openagents/agent/front/eval/.

Sources

Open questions for the owner

  1. Where do the labeled messages come from now? The old set is at the tag. New ones would come from real conversations, which needs a consent rule and must leave out our own testing.