API reference

One call, three question types, one response shape. The Python API and the HTTP API carry identical JSON.

Concepts Question types review() Response HTTP Confidence and calibration Limits Errors

Concepts

A review is one call with one state and one or more questions. The state is any JSON value describing the situation. Each question is typed and names its own answer space in advance. The model scores every candidate answer independently and returns a probability distribution per question. Nothing is generated: there are no output tokens, and the answer can only be one of the candidates you supplied.

Because each candidate is scored on its own, a question that needs the options compared against each other ("which of these five vendors is cheapest") only works if the comparison is already present in the state.

Question types

Choice: pick one of N

FieldTypeMeaning
type"choice"Required in JSON; implicit in Python.
instructionsJSON valueThe question. Usually a string; objects are serialized canonically.
criteriaobject, 2+ keysOption key to description. Keys are the labels returned; descriptions are what the model reads.
Choice("Which team should own this?", {"billing": "Payments and refunds", "technical": "Bugs and outages"})
{"type": "choice", "instructions": "Which team should own this?", "criteria": {"billing": "...", "technical": "..."}}

Score: place on an ordered rubric

FieldTypeMeaning
type"score"
instructionsJSON valueThe question.
criteriaarray, 2+ itemsOrdered levels, lowest first. Index 0 is the first level.
Score("How urgent is this?", ["routine", "time-sensitive", "emergency"])
{"type": "score", "instructions": "How urgent is this?", "criteria": ["routine", "time-sensitive", "emergency"]}

Noul: yes or no, with a probability

FieldTypeMeaning
type"noul""binary" and "boolean" are accepted aliases.
instructionsJSON valueThe statement or question to judge.
criteriaobject, optionalOptional true and false descriptions. Defaults to "The statement is true." / "The statement is false."
Noul("Is a refund requested?")
Noul("Should the agent proceed?", {"true": "Proceed with the write", "false": "Stop and ask a human"})
{"type": "noul", "instructions": "Is a refund requested?"}

The call

OpenAuditor.from_pretrained(path, device="cuda") -> OpenAuditor
OpenAuditor.review(state, questions, *, model="openauditor") -> ReviewResponse
ParameterTypeMeaning
stateJSON valueShared context for every question in the call. Strings pass through; other values are serialized with sorted keys.
questionsobject, 1+ keysYour key to a Choice, Score, Noul, or the equivalent JSON object.
modelstringEchoed in the response. Reserved for routing between checkpoints.

Questions in one call are independent: reordering them or adding an unrelated question does not change another question's probabilities. This is checked in the evaluation suite.

Response

{
  "model": "openauditor",
  "answers": {
    "team":        {"type": "choice", "choice": "technical",
                    "probabilities": {"billing": 0.04, "technical": 0.93, "sales": 0.03},
                    "confidence": 0.78},
    "urgent":      {"type": "noul", "noul": 0.91},
    "frustration": {"type": "score", "score": 1.62,
                    "legend": {"0": "calm", "1": "frustrated", "2": "very frustrated"},
                    "probabilities": {"0": 0.05, "1": 0.28, "2": 0.67},
                    "confidence": 0.31}
  },
  "usage": {"input_tokens": 41, "output_tokens": 0, "candidate_token_evaluations": 716}
}
FieldMeaning
choiceThe argmax option key.
probabilitiesSoftmax over the candidates after temperature calibration. Sums to 1 per question.
scoreExpected rubric index: the probability-weighted mean of the level indices. 1.62 means "between frustrated and very frustrated, closer to the latter".
legendIndex to level text, so the score is interpretable without the request.
noulCalibrated probability that the statement is true.
confidenceNormalized entropy concentration in [0, 1]: 1 when all mass is on one option, 0 when uniform. Not a probability of being correct. See below.
usage.input_tokensTokens in the state plus each question's instructions, counted once.
usage.output_tokensAlways 0. Nothing is generated.
usage.candidate_token_evaluationsTotal tokens scored across all candidate prompts. This is the actual compute cost of the call.

HTTP

The local server exposes the same contract. Body and response are the JSON shapes above.

RouteMeaning
POST /v1/reviewBody: {"state": ..., "questions": {...}, "model": "openauditor"}. Returns the response object. Body limit 16 MiB.
GET /healthReturns {"status": "ok", "model": "openauditor"}.
curl -s localhost:8080/v1/review -H 'content-type: application/json' -d '{
  "state": {"order_id": "A-1042", "amount": 1250, "customer_tier": "gold", "note": "duplicate charge, please refund"},
  "questions": {
    "action":  {"type": "choice", "instructions": "What should happen next?", "criteria": {"refund": "Issue a refund", "escalate": "Escalate to finance", "close": "Close with no action"}},
    "policy":  {"type": "noul",   "instructions": "Is this within the automatic refund policy?"},
    "risk":    {"type": "score",  "instructions": "Fraud risk", "criteria": ["low", "medium", "high"]}
  }}'

Any HTTP client works. In JavaScript: fetch("/v1/review", {method: "POST", headers: {"content-type": "application/json"}, body: JSON.stringify(request)}).

Confidence and calibration

Limits

LimitValue
Prompt length512 tokens per candidate prompt for the public checkpoint (state + instructions + one candidate). Over-length prompts are rejected, never truncated. The curriculum recipe trains at 4,096.
Candidates per questionNo hard cap. Each candidate is one forward pass; 255 candidates measured at about 8.5 s on Apple MPS and 0.4 s on an H100.
Questions per callNo hard cap. Cost is the sum of candidates across questions.
Request body (HTTP)16 MiB.

Errors

The Python API raises ValueError; the HTTP server returns 422 with {"error": "..."}. Common causes: