Decision Answers
For the integration flow, read Decision Model-Related Protocols. For question IDs, options, and rubric definitions, use Decision Questions.
Response fields
DecisionResponse.answers maps the request’s question IDs to DecisionAnswer
values. Each answer separates its value from optional provider confidence.
Answer values
DecisionValue::Boolean wraps a BooleanEstimate. An absent distribution stays
unknown; it does not become a one-hot distribution. Likewise, a Boolean-only
answer does not imply probability zero or one.
Probability, ScoreValue, and ProviderConfidence are public numeric wrappers.
Their stated ranges and meanings are contracts, not validation performed by
their constructors. Keep answer probability separate from provider confidence.
Matching and errors
Retain the request when converting a response. Question IDs identify the expected
kind; choice IDs identify valid selections; rubric order gives scores meaning.
Both clients match responses against the request and perform format-specific
checks. An unexpected ID, kind, or malformed supported response can produce
LlmClientError::ResponseTranslation.
If the route question was refused or its apply_cutoff_to probability is missing,
the cutoff classifier uses its fallback when fail_open is enabled. Otherwise it
returns an error identifying the refusal or the missing probability.
Transport failures and upstream HTTP errors surface through
LlmClientError. A host converts its work result to libsy::Result<DecisionResponse>
when replying through CallDecision::respond.
These clients do not retry automatically. Their constructors accept a timeout covering the HTTP request and reading the body. See the question reference’s adapter links for the exact conversion and error paths.
Conversion guarantees
Supported decision fields map directly while retaining question IDs, answer probabilities, rubric positions, and confidence. OpenAI text-only fields carry structured protocol values as JSON text. This preserves content, rather than making the wire formats identical or guaranteeing arbitrary JSON round trips.
The provider must actually report a field for it to be available. Keep missing IDs, confidence, distributions, and usage unknown. For cache and reasoning token semantics, see LLM usage.
Return to the decision protocol guide to connect the response to your application’s execution loop.