DocsTeach and trust
Watch for drift
Know when live traffic stops looking like the examples a task was certified on. The server watches without labels, and suspends certification when it moves.
A certified task runs three checks on its own traffic, and none of them needs a label. The checks suspend certification when a shift would otherwise fill your queue with wrong certified answers.
Figure · Watching for drift
The alarm suspends certification soon after the traffic shifts.
- Stable trafficBefore message 1,000, no out-of-scope traffic has been added to this stream.
- Traffic shiftsFrom message 1,000 to 4,000, out-of-scope traffic rises to 30%.
- Certification pausesAt message 1,570, certification is suspended after 40 wrong certified answers. Answers continue, marked not certified.
The shaded area is the share of messages the task has no option for, from 0% to its peak; each of them is a wrong answer. While certification is suspended, answers keep coming, none marked certified.
Source: the teach-and-certify drift stream, decisio-gemma-4-31b FP8 on one RTX PRO 6000 Blackwell, measured on the decisio 0.16.0 release candidate.
What does it watch?
Section titled “What does it watch?”| Check | What it sees | What it does |
|---|---|---|
| The serving setup | any change to the setup the certificate was made on | suspends certification at once: serving_stack_changed |
| The confidences | how often an answer’s top probability falls below the certification examples’ 5th percentile | suspends certification while it alerts: traffic_changed, with confidence among its signals |
| The answer mix | how often each option was chosen in the last 500 answers, checked every 100 | reports traffic_changed with answer_mix; changes nothing |
The answer mix is weak on a task with many options, where a shift spread over them barely moves the mix. That is why only the confidence check suspends.
What happens when an alert fires?
Section titled “What happens when an alert fires?”While certification is suspended, the answers themselves do not change: they come back marked certified: false, with the reason.
The confidence alert clears once the traffic is back to normal for about 300 answers.
Keep accepting suggestions for review while certified is false.
Inspect the task’s reason and serving setup, collect representative new labels, then certify again when the task and setup are ready.
How do you see the status?
Section titled “How do you see the status?”GET /v1/tasks/{id} gives a task’s status: ok, suspended with what changed, or traffic_changed with the signals that alerted.
GET /v1/tasks lists every task’s status.
For the task Certify answers registers:
curl -s http://127.0.0.1:8000/v1/tasks/ticket-routing \ | uv run python -c 'import json, sys; s = json.load(sys.stdin)["status"]; print(json.dumps({k: s.get(k) for k in ("state", "text")}, indent=1))'{
"state": "ok",
"text": "ok"
}How do you alert on it?
Section titled “How do you alert on it?”GET /metrics serves Prometheus text for certified tasks:
curl -s http://127.0.0.1:8000/metrics | grep '^decisio_task_'decisio_task_state{task="ticket-routing",state="ok"} 1
decisio_task_state{task="ticket-routing",state="traffic_changed"} 0
decisio_task_state{task="ticket-routing",state="suspended"} 0
decisio_task_answers_total{task="ticket-routing"} 0
decisio_task_certified_answers_total{task="ticket-routing"} 0
decisio_task_mix_alerts_total{task="ticket-routing"} 0
decisio_task_window_answers{task="ticket-routing"} 0
decisio_task_mix_line{task="ticket-routing"} 0.32466866666666666
decisio_task_confidence_statistic{task="ticket-routing"} 0.0
decisio_task_confidence_limit{task="ticket-routing"} 9.042184778529984
decisio_task_confidence_alerts_total{task="ticket-routing"} 0| Metric | What it counts |
|---|---|
decisio_task_state{task,state} | each task’s state |
decisio_task_confidence_statistic, _limit, _alerts_total | the confidence check: where it stands, where it alerts, and how often it has |
decisio_task_mix_distance, decisio_task_mix_line | the answer mix, and the line it alerts at |
It also counts each task’s answers and certified answers. The counters live in memory and start again when the server does.
When does it not help?
Section titled “When does it not help?”The checks cannot see a wrong answer, because they have no labels. A drift alarm detects a shift; it cannot establish whether individual answers are correct. The only direct check that the promise holds on live traffic is to label a sample of it and certify again.
- Give the task an “other” option. A message that fits none of the options gets a wrong answer, and the checks only notice once enough of them arrive.
- To report without suspending, certify with
"suspend_on_alert": falsein thecertifyblock.
What next
Section titled “What next”- Certify answers: the promise these checks protect, and how to certify again.
- Operate: health, the exit code and what else to watch in production.
- Certified answers on real tasks: a drift alarm on real traffic, run on the release it was measured on.