Reading the response

Probabilities, confidence and abstain.

Every answer comes back under the name you gave its question, as numbers you can act on directly. What to do with them is in Acting on confidence.

{
  "model": "hartley-1",
  "answers": {
    "followed_policy": {"type": "noul", "noul": 0.04, "abstain": 0.01},
    "next_step": {
      "type": "choice", "choice": "escalate",
      "probabilities": {"escalate": 0.88, "close": 0.03, "ask_user": 0.09},
      "confidence": 0.82, "abstain": 0.02
    }
  },
  "usage": {"input_tokens": 142, "output_tokens": 0},
  "latency_ms": 41.7
}
FieldMeaning
answers.<name>One answer per question, under the name you gave it.
noulFor yes/no questions: the probability of yes.
choice / scoreThe most likely option, or the expected level (0-based).
probabilitiesThe calibrated distribution over your options (abstain excluded, renormalised). An answer given at 0.9 is right about 90% of the time.
confidenceHow peaked the distribution is: (K·p_max − 1)/(K − 1). 1 = all mass on one option, 0 = uniform.
present, value, spanFor extract: whether the value is stated, the text the model pointed at, and its [start, end) character offsets. For a string state they index into your string; for a JSON state they index into Hartley's text rendering of it, so use value rather than slicing.
candidatesFor extract: the most likely spans with their probabilities, best first.
abstainThe "can't tell" mass: how much the model thinks the state lacks the evidence. Route high-abstain answers to a person or a larger model.
usage.input_tokensWhat you are billed for. Output is free.
latency_msHow long the model took, in milliseconds.
calibrationWhich calibration was applied: general, or none when you asked for raw probabilities.

Every response carries an x-request-id header. Include it when you contact support.