Search

↑↓ to move↵ to openesc to closetop 6 documentation results

Book a demoTry TokenTriage

In development · Explore the product preview. Join the launch list or book a walkthrough.

Browse docs

Gate routing on a proven quality floor

Add a min_quality_lcb floor to a routing selector so a cheaper tier is eligible only while its measured lower bound clears it.

How-to guideLast updated

On this page

Spend an active calibration as a routing constraint: a cheaper tier becomes eligible only while its calibrated quality lower bound clears a floor. The floor is a selector parameter, min_quality_lcb, and it gates candidacy, not rank. A tier below the floor is not a cheap option, it is not an option.

Prerequisites

  • An active quality calibration for the metric and served-model you want to gate. See Calibrate quality from your logs.
  • A routing policy using a select node (the floor is a parameter of a cost-aware selector).
  • If the metric is scored by an LLM judge, a standing promotion for that judge on that segment. A judge’s verdicts carry reported until they have been measured against human labels, and a reported observation licenses no bound for the floor to read. That precondition is a walk of its own: Gate a rollout on a validated judge runs it end to end, and Why your number is reported, not measured explains what a promotion moves and what it leaves alone.

1. Add the floor to a selector

min_quality_lcb lives in a select node’s by.params, beside the quality_metric it reads under. This admits the cheapest tier whose calibrated lower bound clears 0.98 on output_nonempty, and sends everything else to the frontier when none qualifies:

routing:
  default_tier: frontier
  policy:
    version: 1
    root:
      rules:
        - id: extraction-floor
          to:
            select:
              from: { tiers: all }
              by:
                selector: cheapest_meeting
                params:
                  min_quality_lcb: 0.98        # a bound on a pass rate, in [0,1]
                  quality_metric: output_nonempty
              # A candidate that cannot meet the floor is not an option.
              # When none can, traffic goes here.
              on_empty: { tier: frontier }
      default: { tier: frontier }

2. Validate and reload

Validate strictly, then reload the config. The router reads calibration off an immutable snapshot published off the request path, so the floor takes effect on the next reload, not mid-request:

$ tokentriage validate --config tokentriage.yaml

3. Verify on a real decision

Send traffic and read a decision back. When the chosen candidate’s quality was actually consulted, the row records a QualityConsult and a decision.predicted.* block (the metric, the tier, the calibration version, and the fact):

$ tokentriage policy explain --req-id <req-id> --log ~/.tokentriage/decisions.jsonl

The selector’s score table carries every candidate’s quality verdict, not only the admitted ones, because once the floor gates candidacy, the admitted-arm count is what an off-policy propensity is computed over.

4. Read the two exclusion terms

Absence and below-floor are different facts that call for different operator actions, and the score table keeps them apart:

  • quality_below_min_lcb. The tier was measured, admitted to the comparison, and its calibrated bound fell below the floor. It carries the numbers.
  • quality_absent:<reason>. The tier’s quality could not be read at all, with the reason riding the term name (e.g. quality_absent:segment_uncalibrated, quality_absent:below_min_n). An absent tier is not scored as if it had failed.