# Certify answers

> Get answers the server stands behind. You choose the error rate; the server certifies only the answers sure enough to keep it, on traffic like your examples.

Source: https://opendecisio.com/docs/tasks/certify/

Add a `certify` block when you teach a [task](https://opendecisio.com/docs/glossary/#task), and every answer says whether it is certified. Pick how often a [certified answer](https://opendecisio.com/docs/glossary/#certified-answer) may be wrong; the server finds the [threshold](https://opendecisio.com/docs/glossary/#threshold) that keeps that promise:

 

[Figure: A stricter error target certifies fewer answers; the server picks the threshold that keeps its promise. The support inbox, BANKING77 with 77 intents, taught with 10 examples per intent on Gemma 4 31B. At an error target of 2%, nothing is certified: with 1,535 examples held back, no threshold can promise it. Every answer still comes back, marked not certified. At an error target of 5%, answers with a top probability of at least 0.941 are certified: 1,335 of 3,080 messages (43.3%), 43 of them wrong (3.2%). The rest come back marked not certified. At an error target of 10%, answers with a top probability of at least 0.690 are certified: 2,426 of 3,080 messages (78.8%), 196 of them wrong (8.1%). The rest come back marked not certified.]

 

## TL;DR

 

With a server running, from the root of the clone ([Teach a task](https://opendecisio.com/docs/tasks/#3-register) has both), add `certify` to the 120 labelled tickets decisio ships and register them:

 shell

```
uv run python -c 'import json; b = json.load(open("examples/tasks/examples.json")); b["certify"] = {"alpha": 0.05}; json.dump(b, open("certify.json", "w"))'
curl -s http://127.0.0.1:8000/v1/tasks -H 'Content-Type: application/json' -d @certify.json \
  | uv run python -c 'import json, sys; c = json.load(sys.stdin)["certificate"]; print(json.dumps({k: c.get(k) for k in ("alpha", "n", "threshold", "certified_n", "errors_at_threshold", "summary")}, indent=1))'
```

 Response

```
{
  "alpha": 0.05,
  "n": 60,
  "threshold": null,
  "certified_n": 0,
  "errors_at_threshold": null,
  "summary": "Nothing is certified: on the 60 held-out examples no confidence threshold keeps the wrong answers above it at 5% or fewer with probability 90%. The task works as before, and every answer carries certified: false. (Without the bound, 57% of the examples would have met 5% on these examples themselves; that is not a promise.) Warning: This task has no option for a message that fits none of its labels (such as 'other' or 'out of scope'), so such a message gets a wrong answer that can be certified. Add one, or rely on the traffic monitor, which watches the answer mix and the confidences."
}
```

 

The reply is the certificate, and every later answer of the task says whether it is certified.

 

## 1 Know the promise

 

Pick an [error rate](https://opendecisio.com/docs/glossary/#error-target), say 5%: of the answers decisio certifies, at most 5% are wrong, for traffic like your examples, nine times in ten (the default `delta` of 0.1).

 

- The promise is about the rate: even so, one certified answer can still be wrong.
- A stricter rate certifies fewer answers, and too few examples certify none; the rest go to a person.

 

## 2 Teach the task with a certificate

 

Your error target is `alpha`. The server holds back half the examples, teaches on the rest, reads the held-back ones as it will serve them, and answers with the certificate.

 

The [CPU stand-in](https://opendecisio.com/docs/glossary/#cpu-stand-in) is a small development model, so its certificate is its own. On the default model, Gemma 4 31B, decisio’s worked example, a three-queue ticket [question](https://opendecisio.com/docs/glossary/#question) at an error target of 15%, answered:

 json

```
{
 "certificate": {
  "id": "ticket-queue#7151e6bd7fd1",
  "alpha": 0.15,
  "delta": 0.1,
  "n": 200,
  "accuracy": 0.875,
  "threshold": 0.6917,
  "certified": true,
  "certified_share": 0.905,
  "certified_n": 181,
  "errors_at_threshold": 18,
  "split": {
   "method": "holdout",
   "holdout": 0.5,
   "fit_examples": 200,
   "certify_examples": 200,
   "disjoint": true
  },
  "warnings": [
   {
    "code": "no_catch_all_option",
    "text": "This task has no option for a message that fits none of its labels (such as 'other' or 'out of scope'), so such a message gets a wrong answer that can be certified. Add one, or rely on the traffic monitor, which watches the answer mix and the confidences."
   }
  ],
  "summary": "Answers whose top probability is at least 0.6917 are certified: on the 200 held-out examples that is 90% of the answers, 18 of 181 wrong. With probability at least 90% over the draw of such examples, at most 15% of the certified answers are wrong, for traffic like them and on this serving stack. Warning: This task has no option for a message that fits none of its labels (such as 'other' or 'out of scope'), so such a message gets a wrong answer that can be certified. Add one, or rely on the traffic monitor, which watches the answer mix and the confidences."
 },
 "status": {
  "state": "ok",
  "text": "ok"
 }
}
```

 

Recorded output.

 

Here, answers with a [top probability](https://opendecisio.com/docs/glossary/#top-probability) of at least 0.6917 are certified: 181 of the 200 held-back tickets, 18 of them wrong.

 

Recorded on Gemma 4 31B from its FP8 checkpoint, decisio 0.17.0, one RTX PRO 6000 at 600 W, 2026-10-19, on the plain layout; the response is abridged.

 

If no threshold can keep the promise, `threshold` is `null` and the task works as before, with every answer marked not certified. Give a choice task an “other” [option](https://opendecisio.com/docs/glossary/#option): a message that fits none of the options gets a wrong answer, and that answer can be certified. The server warns when a choice task has no such option.

 

## 3 Read each answer

 

Every answer for the task says whether it is certified, and why not when it is not:

 json

```
[
 {
  "ticket": "Urgent: the refund has not reached my bank account. Can you check today? (ref 70816)",
  "choice": "billing",
  "probabilities": {
   "billing": 0.977,
   "shipping": 0.01,
   "access": 0.013
  },
  "certified": true,
  "certificate": "ticket-queue#7151e6bd7fd1"
 },
 {
  "ticket": "Dear support, can I change the payment method on my plan. Also: the tracking page shows no update for days. (ref 82556)",
  "choice": "billing",
  "probabilities": {
   "billing": 0.573,
   "shipping": 0.373,
   "access": 0.054
  },
  "certified": false,
  "certificate": "ticket-queue#7151e6bd7fd1",
  "certified_reason": "below_threshold"
 }
]
```

 

Recorded output.

 

Heads up

Check that `certified` is `true` and `certificate_kind` is `gold` before taking a correctness-based action. A learned table can return an `agreement` certificate, which concerns matching the model, mistakes included.

 

Send answers that do not meet your policy to a person or larger model, and handle service errors through the same fallback.

 

## 4 Have enough examples

 

The server refuses to certify below the fewest held-back examples at which anything could be certified, at the default 90%:

  

| Error target | Fewest held-back examples |
| --- | --- |
| 2% | 149 |
| 5% | 59 |
| 10% | 29 |
| 20% | 14 |

 

The server holds back half of what you send, so a 5% certificate needs at least 118 labelled examples. That floor is for a task the model always gets right; yours needs more.

 

With 75 examples, four of five test tasks certified nothing at 5% or 10%. Set `certify.min_examples` above the floor to refuse a certificate that thin.

 

## Keep it valid

 

 

A certificate covers one task on one [serving setup](https://opendecisio.com/docs/glossary/#serving-setup), so a change to the setup means certifying again. [Set up for production](https://opendecisio.com/docs/production/#keep-a-certificate-valid) lists what to pin and when to certify again. A task is also fitted under one [prompt layout](https://opendecisio.com/docs/layout/#certify-under-the-layout-your-clients-send) and certifies only that layout’s requests.

 

## Certify from traffic labels

 

A certificate can come from the requests the task really serves, not only from examples you gathered beforehand. Register the task with a `labels` block beside its `certify` block: the server picks which answers to ask you about, by a draw that does not depend on the right answer, and the labels you post for them make the certificate.

 

In our tests on classification tasks where 30% of answers could be certified, drawing the certification labels from live traffic needed about a third as many labels as labelling at random at alpha 0.10, and under half as many at alpha 0.05. This is a measured saving, not a promise, and it applies to tasks whose most confident answers are almost always right.

 

On the hard multilingual tasks we tested (60-option intent sets and paraphrase detection), certified coverage stayed small: the largest share at alpha 0.05 was 4%, with up to 2,000 labels. At alpha 0.01 and 0.005, none of those multilingual tasks reached a certificate with up to 2,000 labels, so we make no saving or coverage claim at those levels.

 

- **Opt in:** `"labels": true`, or settings such as `{"audit_pi": 0.05, "due_days": 7}`. Nothing is logged per request unless the task opts in, and never the request’s text or state.
- **Label:** `GET /v1/tasks/{id}/labels/queue` lists the drawn answers to label, without the served answer, and `POST /v1/tasks/{id}/labels` takes up to 1,000 labels by `request_id`. A drawn answer not labelled by its due date counts as an error.
- **Serve:** the certificate from examples serves until the first look, at 300 drawn labels by default, and that look’s certificate replaces it. A label monitor suspends certification when the labelled error rises above your rate.
- **Level:** alpha is 0.05 by default, and the level you ask for is the level you get. At alpha 0.01 or 0.005 the task needs hundreds of labels in its region and labels on at least 5% of its answers, and a cohort with labels for fewer than 1 - alpha of its answers certifies nothing.
- **Fast table:** a task with a fast table keeps its certificate from examples, since the table’s answers have no label-free score.

 

Erasing an answer in the current traffic certificate’s cohort withdraws that certificate at once. The server recomputes it, counting the erased answer as wrong at confidence 1. Answers that age out under `ttl_days` are dropped from the cohort before recomputing.

 

With `"certify": {"mode": "average_error"}` a task that takes labels marks windows of its answers instead, and never certifies them. Its promise at alpha 0.05:

 

Note

On average over the labelled examples and over windows of answers like this one, at most 5% of the answers marked in a window are wrong. A particular window can have a higher share. Marks are given when the window closes.

 

To receive each closed window’s marks as a signed HTTPS callback, set `certify.callback` when registering the task or use the [callback endpoints](https://opendecisio.com/docs/api/#tasks).

 

The measurements are in decisio’s [labels-needed run record](https://github.com/aminry/decisio/tree/v0.56.0/runs/2026-11-23_labels-needed).

 

## Pick a line by hand

 

Without a certificate, you can still keep the answers above a line you choose and escalate the rest. Pick the line from the cost of an escalation against the cost of a wrong answer, measured on examples like yours. On decisio-examples' example 5, Escalate only when unsure: 1,172 ARC-Challenge questions, a public benchmark the model may have seen:

 

| Keep at or above | Answered on its own | Right among those (95% interval) | Wrong answers escalated |
| --- | --- | --- | --- |
| 0.5 | 1,168 (99.7%) | 97.6% (96.6% to 98.3%) | 3 of 31 |
| 0.6 | 1,162 (99.1%) | 97.8% (96.8% to 98.5%) | 6 of 31 |
| 0.7 | 1,154 (98.5%) | 98.2% (97.2% to 98.8%) | 10 of 31 |
| 0.8 | 1,145 (97.7%) | 98.5% (97.6% to 99.1%) | 14 of 31 |
| 0.9 | 1,125 (96.0%) | 98.8% (98.0% to 99.3%) | 18 of 31 |
| 0.95 | 1,078 (92.0%) | 99.2% (98.4% to 99.6%) | 22 of 31 |

 

Recorded on Gemma 4 31B from its FP8 checkpoint, decisio 0.17.0, one RTX PRO 6000 at 600 W, 2026-10-19, on the plain layout.

 

A line on the raw [probability](https://opendecisio.com/docs/glossary/#probability) promises nothing for new traffic; a certificate does. To keep answers above a line of your own:

 python

```
import json
import urllib.request

THRESHOLD = 0.8

body = {
    "state": "My card keeps getting declined when I renew.",
    "questions": {
        "queue": {
            "type": "choice",
            "instructions": "Which team should handle this ticket?",
            "criteria": {"billing": "Invoices, payments, refunds", "access": "Login, passwords, permissions", "bug": "The product behaves wrongly"},
        }
    },
}
request = urllib.request.Request(
    "http://127.0.0.1:8000/v1/systemone",
    data=json.dumps(body).encode(),
    headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(request) as response:
    answer = json.load(response)["answers"]["queue"]

top = max(answer["probabilities"].values())
if top >= THRESHOLD:
    print("keep:", answer["choice"], round(top, 3))
else:
    print("escalate: the likeliest is", answer["choice"], "at", round(top, 3))
```

 Output

```
escalate: the likeliest is access at 0.509
```

 

## Let the server abstain

 

A question can carry a “can’t tell” option, and the server can decline to answer when that option is likely enough:

 

1. Offer the option in the request, or start the server with `--abstain-option` to add one.
2. Register a threshold on it from labelled examples that include ones with no answer: `POST /v1/abstention/tasks`.
3. Read the answer: the server [abstains](https://opendecisio.com/docs/glossary/#abstain) when the option’s probability is over the threshold, and otherwise answers the best of the other options.

 

Register the task first and its abstention threshold second, and register both again together. A threshold applies only on the served name it was fitted for, so fit it on the model you serve.

 

## Limits

 

- Certified: choice and [yes/no questions](https://opendecisio.com/docs/glossary/#yesno-question) on text, asked in one order.
- Score questions and requests with images carry no certificate.
- A certified question is scored on its own, the way the certificate was made, so it does not share the read of the text with the other questions of its request.

 

## What next

 

- [Watch for drift](https://opendecisio.com/docs/tasks/drift/): know when traffic moves away from the examples a certificate was made on.
- [Certified answers on real tasks](https://opendecisio.com/demos/teach-and-certify/): the support inbox, a [drift](https://opendecisio.com/docs/glossary/#drift) alarm and a coding-agent gatekeeper.
- [The HTTP API](https://opendecisio.com/docs/api/#tasks): the certify block, the label routes and every field of a certificate.
