# Check model quality

Source: https://docs.littlebigbrain.com/guides/check-model-quality/

LBB calls models for its own work on your graph. A rerank model orders
search hits. A router and an answer model answer questions from the graph.
The fit maps integration streams to your classes. Model checks show how often those
calls are right.

A judge model checks a sample of the calls. You can agree with a check or
correct it. Your correction becomes the ground truth of the call, and the
judge's own verdict stays beside it. The share of reviews that agree with
the judge is the judge's own score.

In the console, model checks are on the **Evals** pages.

LBB runs the judge with its own key. A check sends the call's input and
output to the judge's provider (Anthropic for Claude Opus 5.5, Google
for a Gemini 4 judge, in the EU). They hold
text from your graph: search texts and hits, questions, and samples of the
connected source. LBB keeps the calls and the checks for the graph, and
deletes them when you delete the graph.

## What gets checked

| Job | Model | What the judge does |
| --- | --- | --- |
| Search rerank | Jev | grades every hit 0 to 3; the score is the nDCG@10 of the model's order |
| Query routing | Jev | answers the same choice; right when it picks the same option |
| Question answers | Claude Sonnet 5.5 | rates the answer against the question and the rows it read; writes the right answer or query when it is wrong |
| Query rewriting | Claude Sonnet 5.5 | rates the query, and writes a corrected one when it is wrong |
| Ontology fit | Jev | answers the same choice questions |
| Ontology proposals | Claude Sonnet 5.5 | rates the proposed changes |
| Eval labels | the eval judge | grades every labeled result 0 to 3 |
| Document mapping | Jev | answers the same choice questions (when the mapping workflow runs) |

The calls of your workflows are logged and not checked: the definitions,
mentions and links of documents, the values from text, and the calls of a
workflow's own code. **Usage → Spend** lists them for each workflow, use
and model, with their calls, tokens and estimated cost.

A score of 0.8 or more is **right**, below 0.5 is **wrong**, and between is
**partly**. Calls are sampled per graph and day, under a daily budget per
environment.

The daily budget is $2.00 by default. To change it, open **Usage →
Budgets** and click **Change** on the **Model checks** row. Set an
amount up to $1,000. Set 0 to stop the checks. **Use default** goes back
to $2.00. The new limit applies at the next check, and today's spend
stays. Model choice tests, search tuning and calibration have limits of
their own. They do not count in it, so they never stop the day's checks.
The API is `GET` and `PUT /stacks/{slug}/check-budget` with
`daily_budget_usd` and `expected_version`.

## In the console

Open **Evals**. It has four tabs, one per job:

| Tab | Holds |
| --- | --- |
| **Quality** | The month's checks per job and model. **All checks** opens the list. |
| **Test sets** | The right answers that changes are scored against: the golden queries and each dataset. |
| **Experiments** | Workflow experiments, search tuning sessions and model trials, in one list. |
| **Thresholds** | When a model's decision is written without a person: job thresholds and workflow gates. |

With **All graphs** in the top bar, each tab covers the environment and has a
**Graph** column. Choose a graph in the top bar to filter the tabs to it. A
row opens its item at its graph. **New test set**, **New experiment** and
**Start session** ask for the graph in their dialog. A tab reads at most 25
graphs and says when it leaves some out.

Evals asks its questions only in **Review**. The Quality tab shows these
figures for a month:

| Figure | What it counts |
| --- | --- |
| **Checked** | The checked calls, of all model calls logged in the month. |
| **Right** | The share of checks that are right. |
| **Reviewed by people** | The checks a person reviewed, of all checks. |
| **Judge agrees with people** | The share of reviews that kept the judge's answer. |
| **Judge cost** | An estimate of what the judge cost in the month. |
| **Judge budget today** | Today's judge spend against the daily budget of the environment. |

**By job** has a row for each job and model; Jev is marked as a decision
model. Select a job to see its checks. On the page of one graph, a line at
the top counts the questions for a person per source (model checks,
calibration, golden queries, datasets). Each count opens those items in
**Review**.

On **Checks**, filter by job, or show the wrong, the corrected or the not
reviewed checks. A routing row reads "lookup ✓" or "lookup → history": the
model's pick, then the judge's when it differs. Open a check to see the
model and the judge side by side:

- a routing or fit call: the model's pick and the judge's pick, each with
  how sure it is, and both probabilities of every option as bars;
- a rerank call: the hits in the model's order, each with the model's score
  and the judge's grade, and how close the order is to the best one;
- a question's answer: the model's answer beside the judge's, the steps
  the model took, its query beside the judge's, and the rows it read;
- a rewrite: the model's query beside the judge's corrected query.

The judge's reason follows in a few lines. **Details** holds the whole
call: its prompt, its input and output, and the judge's cost.

**Agree** keeps the judge's verdict. **Correct** sets the right verdict.
For a rerank call you can grade each hit again, and for a choice you can
pick the right option. Your grades also count in search tuning.

**All calls** lists every logged call of the month. **Check** asks the judge
to check one now.

Checks and calls load independently of the month's summary. You can open
and filter the rows while the summary is loading; if the summary fails,
its error appears above the list and the rows remain usable.

### Answer in Review

The checks also wait in **Review**, the inbox for every task a person
does. Each check is one item: the call, the judge's verdict with its
reason, and **Agree**, the two other verdicts or **Can't tell**. Your answer
there is the same review as on the Checks page, and a review on the Checks
page answers the item. Review holds up to 100 open checks per graph. The
rest wait, and come in as you answer, the oldest first. The Checks page
shows "N waiting in Review" and links to them.

Calibration questions, golden query labels and dataset values come into
Review the same way. An item's source chip opens its record in Evals: the
check, the calibration session's report, the request on **Golden queries**,
or the dataset.

A golden query item can open its whole request: the result table, to label
every row at once, and the answer, to give the right query when the answer
is wrong. **Golden queries** (under **Test sets**) has two tabs, **Goldens**
and **Score**. **Ask the judge** there labels the waiting results first and
leaves the ones it is not sure of in Review.

The **Models** page shows the judge's mean score per model: "94% score" on
a model's row, and the judge's agreement on its own row. The score is not
the share right. For a choice, such as a routing or a mapping answer, the
score is the judge's probability for the model's answer. The verdict is
right when the judge's own first choice is the model's answer.

## Tune search

Open **Evals**, then **Experiments**, then **New experiment** and **Search
settings**. **Search tuning** runs a session on the graph's own searches. The judge
proposes search settings (the rerank, how many candidates it reads, the
blend of rerank and similarity, and how many clusters a search reads), runs
them, grades the hits, and scores each variant with nDCG@10, MRR@10 and
recall@10. The best variant then runs against the current settings on
searches it did not see.

A session proposes settings only when they rank better and the 95% interval
of the gain is above zero. The proposal names the settings, the gain, and
the change of latency and cost per search. Nothing changes until you press
**Apply**.

## Measure a workflow gate

Three document workflows send their unsure answers to the inbox:
**Link documents**, **Review facts** and **Values from text**. An answer at
or above the workflow's gate (0.8 by default) is written at once. An answer
below it becomes a review item. Each time you accept or dismiss one, you
tell LBB whether the model's answer was right at that confidence.

**Evals → Thresholds** shows, on each workflow's gate card, what those
decisions measured and the lower gate they propose. **Measured in Review**
opens the full report. It counts those decisions per confidence band below
each gate (0 to 0.5, then 0.1 wide): how many, how many were right, the
precision and its 95% interval. Then it tries the gates below the current
one, 0.05 apart, from the highest down. A gate passes when the decisions
from it up to the current gate number at least 30, are right at least as
often as the target precision (95% by default), and have their interval
start at most 10 points below the target. The decisions just above it (the
next 0.1) must also hold one decision, and from 10 decisions be right at
least the target less 10 points of the time, so a bad region does not hide
under good decisions above it. The card proposes the lowest gate that
passes and shows, for each gate, what holds it.

The inbox only sees answers below the gate, so the page cannot measure the
bands above it, and a proposal only lowers a gate, never below 0.5.
**Measure above the gate** on a card starts a calibration session of that
gate, which checks the answers above the gate too (see below). For
**Link documents**, an item where the model chose no entry counts as right
when you dismiss it: nothing is written, as the gate would do.

Nothing changes until you press **Apply** and confirm. You can pick the
proposed gate or a higher one. The workflow then reads its instances again
under the new gate, and its row on the Workflows page shows "gate 0.65 ·
41 decisions · measured 2026-10-12". An API key cannot apply a gate.

## Find why an answer was weak

A diagnosis tells you why one answer of `ask` was weak, and what to do
about it:

```sh
curl -X POST "$LBB_URL/v1/models/checks/diagnose?graph=crm&call=$CALL_ID" \
  -H "Authorization: Bearer $LBB_API_KEY"
```

```ts
const diagnosis = await lbb.checks.diagnose(callId);
console.log(diagnosis.summary);
for (const step of diagnosis.next_steps) console.log(step.kind, step.text);
```

```python
diagnosis = client.checks.diagnose(call_id)
print(diagnosis["summary"])
```

Start with `outcome`, `summary` and `next_steps`:

| `outcome` | What it means | Next steps |
| --- | --- | --- |
| `missed` | Your graph holds a relevant entity (`best`), but the answer did not reach it. | `add_alias` on that entity, with the question's words for it as `alias`; `add_instruction` with a drafted `note` when no query searched by meaning, else `tune_search` |
| `broader_only` | Your graph's closest match (`best`, or `used` when the answer reached it) only touches the subject, or is broader than the question. | `accept_stand_in` with a drafted `reference`, `add_data` |
| `answered_badly` | The answer reached relevant data (`used`), and nothing better was found. The plan or the query made it weak. | `keep_as_test` |
| `not_in_graph` | Nothing relevant was found. | `add_source`; `declare_embedding` when the graph has no embedding |

`best` is the most relevant entity found, and `used` the most relevant
entity the answer reached. Each next step has a `kind`, a sentence, the
entity (`iri`) it is about, and for a correction the `reference` answer.

`unsupported` is true when the answer named entities and none of them is
relevant to the question: the answer guessed. Then the first next step of
`not_in_graph` is `keep_as_test` with the reference "the graph holds no
entity that answers this question". Correct the check with it, and a test
fails a later answer that guesses again.

In the console, open the check of an answer under **Evals** and select
**Find the cause**. The panel shows the outcome, the best match beside what
the answer used, and a button for each next step: **Add alias** opens Query
with the update filled in, **Correct with this reference** opens the
check's correction with the reference answer filled in, and the others open
Search tuning, Embeddings, Integrations or Test sets.

How it works: at the commit the call read, the diagnosis grades three
groups of entities with the judge. These are the entities the answer reached
(its citations, the values of its rows, the entities its queries named), the
names the server linked before it answered, and the hits of one search of
the question over every searchable class of the graph. `evidence` holds
every graded entity, 0 (unrelated) to 3 (answers the question). `cause` and
`sub_cause` give the finer cause for tools. A diagnosis uses the judge and
counts on the check budget. `GET /v1/models/checks/diagnosis` reads it
again.

## Test a next step before you apply it

An answer test tells you whether a change fixes a weak answer, before you
make the change. Arm A is Ask as it is; arm B is Ask with the change. Both
answer the question, 3 rewordings of it, and up to 10 questions your graph
answered right before (the guard set), at one commit. The judge grades every
answer. The test runs as a workflow and ends with a verdict.

```ts
const body = { step: 1 }; // the index of a next step, here tune_search
const estimate = await lbb.checks.answerTests.estimate(callId, body);
console.log(estimate.answers, estimate.estimate_micro_usd / 1e6);
const test = await lbb.checks.answerTests.create(callId, body);
const done = await lbb.checks.answerTests.wait(test.id);
console.log(done.verdict, done.failed, done.guard, done.warnings);
```

```python
estimate = client.checks.answer_tests.estimate(call_id, step=1)
test = client.checks.answer_tests.create(call_id, step=1)
test = client.checks.answer_tests.get(test["id"])  # read again until done
print(test["verdict"], test["warnings"])
```

| `verdict` | Meaning |
| --- | --- |
| `worked` | The change lifted the question and its rewordings, and did not lower the guard set by more than 5 points at the low end of its interval. |
| `no_change` | No difference larger than chance. |
| `worse` | The change lowered the question, or the guard set. |
| `too_few` | Fewer than 4 questions were answered on both arms. |

Name the change with `change` instead of `step`:
`{"kind": "ask_rerank"}` reranks every search by meaning of the answer, and
`{"kind": "instructions", "instructions": {"id": "ins_…", "version": "…"}}`
runs a version of your Ask instructions, a draft too, and
`{"kind": "alias", "alias": {"iri": "…", "label": "…"}}` links an alias of an
entity as if your graph held it, and `{"kind": "instructions", "note": "…"}`
tests a note on a draft version of your Ask instructions (nothing is
published). `tune_search`, `add_alias` (its `alias` is the question's words
for the entity; edit it if you like) and `add_instruction` are the steps a
test can run today; another step answers 400 `diagnosis_step_untestable`
and says what to do instead.
An alias test shows what linking the entity does: the queries of the answer
do not see the alias until you add it.

The options: `guard` (0 to 40, default 10; 0 runs without a guard set, and
the result warns), `rewordings` (default true), `replays` (answers per
question and arm, default 2) and `max_cost_usd` (default 15, at most 100).
Call the estimate first: a test costs about 36 answers of Ask by default.
The test changes nothing. When it worked, apply the change yourself.
`POST /v1/models/checks/answer-tests/cancel?id=` stops a test and keeps its
verdict of what it compared.

## Test another model

A model trial tests another model on the jobs above. It answers the calls
the judge already checked again with that model, for example Claude Haiku
5.5 for question answers or query routing. Then it scores both models
against the same ground truth: your corrections where you made them, the
judge's verdicts otherwise.

- A routing or fit call scores 1 when the model picks the right option.
- A rerank or label call scores the nDCG@10 of the model's order under the
  ground-truth grades.
- A question's answer is graded by the judge, with the known right answer
  as its reference. The new model's queries read the same commit as the
  first answer, when the graph still has it.

In the console, open **Models**, then **Model choice**. Each use of a
model (question answers, query routing, search rerank, …) has a card with
its current model. Pick another model (and its effort) in the card's model
menu to test it. The trial runs by itself: it answers the checked calls,
newest first, and adds each new check of that use for 14 days or until it
has 40 calls. The card's chart shows every model's score against its cost
per call, with the 95% interval of each tested model. Pick **Time** above
the chart to see the time per call instead. Open a trial to see
each call with both answers and the ground truth side by side.

A model **meets the bar** when at least 20 calls were compared, it is at
most 5 points worse at the low end of the 95% interval, it fails at most 5
points more often, and it is cheaper or better. A trial changes no model by
itself. A trial spends at most its cost limit of model and judge cost:
$10.00 by default, at most $100. Set it in **New experiment** when you
start a trial. On the trial's page, **Change limit** sets a new one; a
trial that stopped at its limit before its target goes on.

When a model meets the bar, **Switch** moves that use to the model on this
graph from the next call on. Question answers switch to a Claude or Gemini
model and its effort, query routing to a Jev model; the other uses are
tested only.
**Revert** goes back to LBB's model in one step.

A trial always compares a model with the model in use now. After a
switch, most checked calls come from the model before. A new trial has the
model in use answer those calls again, so both models answer the same
calls. Trials that compared with the model before end, and their models
show **Test again** instead of **Switch**.

## Choose the model of a workflow step

The AI steps of workflows run two models. The **Extract** model reads
values from text and answers the JSON prompts of a workflow's code (the
`reason` activity). The **Decide** model answers choice questions: whether
the text supports a value, and the `decide` activity. LBB runs Claude
Sonnet 5.5 for Extract and Jev for Decide. **Embed** keeps its model,
since vectors of two models do not compare.

You can choose another model for the whole environment, or for one
workflow. A workflow takes its own choice first, then the environment's,
then LBB's model. Each model call says in the call log which choice it
followed (`choice`). One `reason` call can also
[name its own model](#run-one-call-on-another-model).

These calls have no checked calls, so a trial cannot test them. Test the
model on the workflow's own inputs instead:

1. Open the workflow, then **Spend**. **Models by step** lists each step
   with its model, where the model comes from, and this month's calls and
   cost.
2. **Change** a step. Pick a model and its effort. The dialog says how the
   price per token moves, for example "about 20 times cheaper per token".
3. **Test first** runs the workflow on 6 inputs with that model. It writes
   nothing. Compare its values with an earlier test on the **Test** tab.
4. **Set for this workflow** makes the next step run the model. **Use the
   environment's** goes back in one step.

For the environment, open **Models**, then **Model choice**, and pick a
step under **Workflow steps**. Its card lists the workflows that run a
model of their own.

A change takes effect from the next step of a workflow. Other servers
take it within 30 seconds. A cheaper model lowers the cost per call from
its first call, and the budgets count each call at its own price.

### Run one call on another model

A workflow's code can set the model of a single `reason` call. For example,
a workflow runs on Claude Haiku 5.5. When it finds no quote, it asks Claude
Sonnet 5.5 once.

```ts
const quote = await ctx.step("quote", async (s) => {
  const first = await lbb.reason<{ quote: string | null }>(
    { prompt, schema },
    { effectId: s.effectId },
  );
  if (first.value.quote !== null) return first.value.quote;
  const second = await lbb.reason<{ quote: string | null }>(
    { prompt, schema },
    { effectId: `${s.effectId}.2`, model: "claude-sonnet-5-5" },
  );
  return second.value.quote;
});
```

In Python, pass `model="claude-sonnet-5-5"` to `lbb.reason`.

- `model` is a model id of the Extract step's options
  (`GET /v1/models/choices?use=extract`).
- A model that Extract cannot run fails with `400 model_choice_unsupported`.
- A model that the server has no key for fails with
  `409 model_choice_unavailable`.
- A model that takes an effort runs at `medium`.
- The call counts against the same budgets as every call of the workflow.
- The call log names the model that ran. The entry has no `choice`.
- Give the second call its own `effectId`. The same `effectId` with another
  model fails with `409 activity_effect_conflict`.
- Leave `model` out to run the workflow's choice.

### Gemini Decisions for Decide

Google's Gemini Decisions API (`gemini-decision-1`) is a second Decide
model.

- It is **processed outside the EU**. Your text and questions leave the EU
  on each call.
- It is off unless the operator of the server enables it. Until then, the
  list of models leaves it out.
- It is never the default. Someone must choose it.
- Its list price is $0.10 per million input tokens. Output tokens are free.

On a server that offers it, the list names it **Gemini Decisions (outside
the EU)**. Choose it as the Decide model like any other model. To compare
it first, run an [experiment](https://docs.littlebigbrain.com/guides/experiments/) that changes the
`decide` model.

## Calibrate thresholds and workflow gates

Jev answers each routing question and each fit question with a
probability. A threshold sets which answers LBB takes at once. Ask takes
the router's route when its confidence is at least the threshold; below
it, the answer loop reads only the probabilities. Both jobs start at 0.70,
a value nobody measured on your data.

The document workflows use a gate the same way. **Link documents** writes
a link, **Values from text** a value and **Review facts** a mapped fact
when its confidence is at least the workflow's gate (0.80 by default). Below the
gate the decision waits in the inbox for a person. Nobody sees the
decisions above the gate.

A calibration session measures, on the graph's own calls, how often the
model is right at each confidence level. A judge checks a sample of the
calls, and you check a part of the judge's verdicts. The session then
proposes a threshold for a target precision. For a workflow, the sample
holds decisions above the gate too, so the
session tells you how often the decisions written without a person are
right.

Open **Evals**, then **Thresholds**. **Query routing** and **Ontology
fit** each have a card with the threshold that applies now, whether people
validated it, and the last session. Below them, each workflow with a gate
has a card with its gate and the last session that measured it. **New
calibration** (or **Calibrate** on a card) asks for:

- the job, or the workflow when you start from its card;
- the target precision: 99% for the fit, 95% for routing, which writes no
  data. A workflow's gate starts at its own target, 95% unless the
  workflow sets another. The inbox measurement of the gate uses the same
  target. You can change it for one session;
- the most questions to answer (40);
- a budget for the judge in US dollars (10). It does not count against the
  daily check budget;
- the window of calls to read, in days (30).

While the session runs, its page shows the decisions it found, sampled and
checked, and the judge's cost against the budget. Then its questions wait in
**Review**, one item per question, and **Answer in Review** on the session
page opens them. Each card shows one decision: what the model read, what it
chose and how sure it was, and the judge's check with its reason. A workflow's decision that was
written without a person says so. When the two picks are the same, the
card asks whether that pick is right: **Yes**, **No** or **Can't tell**
(keys Y, N and C). When they differ, it asks which is right: the model's
pick (key 1), the judge's pick (key 2), **Something else** (key N) or
**Can't tell** (key C). After **No** or **Something else** you can name
the right option. Disputed decisions come first. The session asks for the
answers it still needs before it stops at its most questions. To change an
answer, open **Change answers in Review** on the session page and answer the
item again; the later answer replaces the earlier one in the report.

The report starts with the model: how often it is right over all its
decisions, and per confidence band. For a workflow it says how often the
decisions above the gate are right, and how often the ones below it are.
Then it says how far to trust these numbers. The judge checked the
sample, and your answers check the judge: for example, people checked 16
of its verdicts and agreed with 15 (94%, with a 95% range of 72% to 99%).
A session is **validated** when the range is at most 10 points on each
side (or the most questions have answers) and starts at 80% or higher.

The table reads the thresholds from 0.95 down. At each one it shows the
estimated accuracy and where its 95% interval starts, the share of
decisions at or above it, the known decisions there, and the next 0.1
above it. A threshold meets the rule when at least 10 known decisions lie
at or above it, they reach the target, and their interval starts at most
10 points below the target. A threshold below the target stops the walk.
So does a next 0.1 that holds decisions but no known one, or that is more
than 10 points below the target. The proposal is the lowest threshold
that meets the rule. The workflow gates from the inbox use the same rule.

**Apply** writes a threshold: the proposal, a row of the table, or a value
from 0.50 to 0.99. The page asks first and says what the threshold does. A
session that is not validated can still be applied, with a warning. The
router uses a new threshold within a minute. The integrations do not read
the fit threshold yet. For a workflow, **Apply** sets its gate, and the
workflow reads its instances again with it. The workflow keeps where its
gate came from, and its row on **Workflows** says "from a session". The
**Models** pages for
question answering and the fit show the same threshold, with a
**Calibrate** link.

## With the SDKs

The TypeScript and Python clients wrap trials and switches under
`models`. `wait` reads the trial until it compared the checked calls.

```ts
const { trials: [trial] } = await lbb.models.trials.create({
  candidate: { provider: "anthropic", model: "claude-haiku-5-5", effort: "low" },
  jobs: ["ask"],
});
const result = await lbb.models.trials.wait(trial.id);
if (result.report.qualifies) await lbb.models.switches.create({ trial: result.id });
```

```python
started = lbb.models.trials.create(
    candidate={"provider": "anthropic", "model": "claude-haiku-5-5", "effort": "low"},
    jobs=["ask"],
)
trial = lbb.models.trials.wait(started.trials[0].id)
if trial.report.qualifies:
    lbb.models.switches.create(trial=trial.id)
```

The clients choose the model of a workflow step with `models.choices`, and
test a model first with `models` on a workflow test:

```ts
await lbb.workflows.tests.create({
  name: "products",
  sample: 6,
  models: { extract: { provider: "anthropic", model: "claude-haiku-5-5", effort: "low" } },
});
await lbb.models.choices.put({
  use: "extract",
  model: { provider: "anthropic", model: "claude-haiku-5-5", effort: "low" },
  workflow: "products",
});
```

```python
lbb.models.choices.put(
    use="extract",
    model={"provider": "anthropic", "model": "claude-haiku-5-5", "effort": "low"},
    workflow="products",
)
lbb.models.choices.delete(use="extract", workflow="products")
```

The MCP server has the same: `lbb_model_choice` reads (`choices` lists the
model choices), and `lbb_model_choice_manage` starts, stops, switches and
reverts, and sets or removes a choice (`put_choice`, `delete_choice`).
## Over HTTP

```sh
# The month's checks of a graph by job, and the judge's agreement
curl "$LBB_URL/v1/models/checks/summary?graph=crm" \
  -H "Authorization: Bearer $LBB_API_KEY"

# Test Claude Haiku 5.5 on question answers and query routing
curl -X POST "$LBB_URL/v1/models/trials?graph=crm" \
  -H "Authorization: Bearer $LBB_API_KEY" -H 'Content-Type: application/json' \
  --data '{"candidate": {"provider": "anthropic", "model": "claude-haiku-5-5", "effort": "low"}, "jobs": ["ask", "route"]}'

# Correct a check: the right verdict and a note
curl -X POST "$LBB_URL/v1/models/checks/review?graph=crm&id=$CALL_ID" \
  -H "Authorization: Bearer $LBB_API_KEY" -H 'Content-Type: application/json' \
  --data '{"agree": false, "verdict": "wrong", "note": "Contacts are companies."}'
```

| Route | What it does |
| --- | --- |
| `GET /v1/models/checks/summary` | the month per job and model, the judge's agreement, today's budget |
| `GET /v1/models/checks` | the month's checks, newest first; `job`, `verdict`, `reviewed` filter |
| `POST /v1/models/checks/review` | `{agree: true}`, or a correction with `verdict`, `reference` and `note` |
| `GET /v1/models/checks/export` | the month's checks as JSON lines: the call, the judge and the review |
| `POST /v1/models/checks/diagnose` | find why an answer of `ask` was weak: `?call=<call id>`; answers the outcome, a summary, next steps and the graded evidence |
| `GET /v1/models/checks/diagnosis` | the stored diagnosis of a call |
| `POST /v1/models/checks/answer-tests` | test a next step or a change on two Ask arms: `?call=<call id>`, `{step}` or `{change}`; `/estimate` first |
| `GET /v1/models/checks/answer-tests/get` | one test with its answers, reports and `verdict`; `GET /v1/models/checks/answer-tests` lists them |
| `GET /v1/models/calls` | the call log, newest first; `outcome=failed` keeps the failed calls, `workflow=<name>` the calls of one workflow |
| `GET /v1/models/calls/get` | one call with its input, output and check |
| `POST /v1/models/calls/check` | check one call now |
| `POST /v1/search/tuning` | start a tuning session |
| `GET /v1/search/tuning` | the sessions, newest first |
| `POST /v1/search/tuning/apply` | apply a session's proposal |
| `GET /v1/workflows/triggered/calibration` | the workflow gates measured from inbox decisions: bands, labels and a proposal |
| `POST /v1/workflows/triggered/calibration/apply` | apply a gate's proposal (a console session only): `{starter, name, gate?}` |
| `GET /v1/models/trials/options` | per job: the current model, its checked calls, the models a trial can test |
| `POST /v1/models/trials` | test a model: `{candidate: {provider, model, effort?}, jobs?, max_cost_usd?}` |
| `GET /v1/models/trials` | the trials, newest first, with their reports |
| `GET /v1/models/trials/get` | one trial with its compared calls |
| `POST /v1/models/trials/stop` | stop a trial |
| `POST /v1/models/trials/limit` | a trial's new cost limit: `?id=…`, `{max_cost_usd}` |
| `POST /v1/models/switches` | switch a task to a trial's model: `{trial}` |
| `POST /v1/models/switches/revert` | back to LBB's model: `?job=ask` |
| `GET /v1/models/choices` | the model of each workflow use: the environment's rows, and with `workflow` the rows in force for one workflow |
| `PUT /v1/models/choices` | choose a model: `{use, model: {provider, model, effort?}, workflow?}` |
| `DELETE /v1/models/choices` | remove a choice: `?use=extract&workflow=products`; answers `{id, object, deleted: true}` |
| `POST /v1/models/calibration` | start a calibration session: `{"job": "route"}`, or a workflow's gate: `{"job": "resolve", "workflow": "documents-link"}` (`infer` for Values from text, `map` for Review facts) |
| `GET /v1/models/calibration` | the calibration sessions, newest first |
| `GET /v1/models/calibration/get` | one session with its questions and report |
| `POST /v1/models/calibration/answer` | answer a question: `yes`, `no` (with an optional `right`) or `cant_tell` |
| `POST /v1/models/calibration/apply` | apply the proposal, or a `threshold` from 0.50 to 0.99; for a workflow, its new gate; accepts an environment API key |
| `GET /v1/models/thresholds` | the applied thresholds of `route` and `fit` |

A rerank correction takes `reference: {"grades": {"<hit id>": 0..3}}`, and a
choice correction `reference: {"picks": {"<question id>": "<option>"}}`.

## From the SDKs and MCP

The TypeScript and Python clients wrap trials, switches and choices under
`models`, calibration reads and thresholds under `models.calibration` and
`models.thresholds()`, the workflow-gate calibration read under
`workflows.triggered.calibration()` (TypeScript) /
`client.triggered_calibration()` (Python), and a fit on one text under
`ontology.fitText()` / `ontology.fit_text()`. Apply a model-calibration session
through `POST /v1/models/calibration/apply` with an environment API key. Applying an
inbox-measured workflow-gate proposal through
`POST /v1/workflows/triggered/calibration/apply` requires a console session in
SaaS mode. Fit-text and calibration starts retry only rate-limit responses by
default; a network failure or server error can arrive after model work has
started. The SDKs also wrap `checks` and `embeddings.searchTuning` /
`embeddings.search_tuning`. See
[TypeScript](https://docs.littlebigbrain.com/sdks/typescript/#model-checks-and-search-tuning) and
[Python](https://docs.littlebigbrain.com/sdks/python/#model-checks-and-search-tuning). Through MCP,
`lbb_evals` reads the checks with `checks_summary` and `checks`, and
`lbb_evals_manage` records a review with `review_check`. See [MCP](https://docs.littlebigbrain.com/sdks/mcp/#other-tools).
