Letter sacks are stacked to the mailroom ceiling. The naughty-or-nice list is due tonight, and the chatbot is answering every letter with a book report.
- Santa
I asked one question: naughty or nice? It sent back four paragraphs on Tim's complicated relationship with broccoli!
- Mrs. Claus
So an elf reads every essay hunting for one word. And the letters the model wasn't sure about: who sees those?
- Santa
Nobody! I check my list twice, not a mountain of book reports. The list is due tonight.
- Tinsel
Stop asking for an essay.
/decisionsreturns one typed answer per question with probabilities, and the unsure letters go to Mrs. Claus.
- stateTim's lettertext or JSON
- questionsorq.ai/decisionsnoul · choice · score
- 12on failmodelorq/decider-4bfallbackopenai/gpt-6-luna
- typedanswersTyped answers"is_nice": 0.0 to 1.0
How it works
Tinsel’s checklist is one request. You send content and named questions, and you get one typed answer per question.
- State. Put the content in
state. It can be a string, an object or an array. Objects and ordinary arrays are serialised as JSON, so one call can judge a message, a tool payload or a whole record. - Questions.
questionsmaps your own keys to definitions. Each has atypeand plain-languageinstructions.choiceandscorealso needcriteriathat set the rubric; fornoulit is optional. - Answers. The response has
answersunder the same keys. Nothing is parsed out of free text.choiceandscoreanswers also carryprobabilitiesand aconfidence.
The call goes to POST https://my.orq.ai/v3/router/decisions. It is traced, priced and rate-limited like other router traffic.
Try it with curl
curl -X POST https://my.orq.ai/v3/router/decisions \
-H "Authorization: Bearer $ORQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "orq/decider-4b",
"state": "Dear Santa, I fed the cat every day. I want a sled.",
"questions": {
"is_nice": {
"type": "noul",
"instructions": "Was this child mostly nice this year?"
},
"workshop": {
"type": "choice",
"instructions": "Which workshop should build the gift?",
"criteria": {
"toys": "Toys and games",
"outdoor": "Sleds, bikes and outdoor gear",
"books": null
}
},
"politeness": {
"type": "score",
"instructions": "How polite is the letter?",
"criteria": ["Rude", "Plain", "Very polite"]
}
},
"fallbacks": [{"model": "openai/gpt-6-luna"}],
"timeout": {"call_timeout": 2000}
}'
Or from the Python SDK
Install the Orq Python SDK. The same body works, and state can be a dict:
import os
from orq_ai_sdk import Orq
orq = Orq(api_key=os.environ["ORQ_API_KEY"])
result = orq.router.decisions.create(
model="orq/decider-4b",
state={"child": "Tim", "deeds": ["fed the cat"]},
questions={
"is_nice": {
"type": "noul",
"instructions": "Was this child mostly nice?",
},
},
)
print(result.answers)
print(result.usage)
Pick a question type
type |
Answer | Use it when |
|---|---|---|
noul |
Probability that instructions is true, 0 to 1 |
Yes or no, or a probability to threshold |
choice |
One option from criteria, with probabilities |
The content belongs to one of a known set |
score |
A position on an ordered scale | The answer is a degree, like sentiment |
For choice, set an option’s description to null when the name says enough. For score, list at least two levels from lowest to highest.
Only supported decision models answer, such as orq/decider-4b, openai/gpt-6-luna and google-ai/gemini-decision-1. Every model in fallbacks must support decisions too.
Beta limits
Decisions is in Beta and works through the API and SDK only. Your key needs the classify permission; the standard gateway key preset grants it. PII plugins, guardrails and evaluators do not run on these requests yet. Body fields the endpoint does not know, like plugins, are ignored without an error. The model must also be enabled for your workspace, or the request returns 403.
A refusal from OpenAI is a successful answer. Check type before you read noul, choice or score.
For a big pile of letters, run a batch with endpoint /v3/router/decisions. The key then needs both the batches and classify permissions.
Nice list
- Ask several questions in one request. Each gets its own typed answer, and you pay one round trip instead of one call per question.
- Send low-
confidenceanswers to a person. The docs suggest escalating those rows and usingprobabilitiesto pick the ones worth human review. - Gate expensive work with a cheap
noulpre-check and send only passing letters to a larger model. Native decision models charge nothing for output tokens.
Naughty list
- Pointing
modelat a chat model such asanthropic/claude-sonnet-5-5. Only supported decision models work. An enabled model without decision support returns400. - Reading
.noulwithout checkingtypefirst. OpenAI can answer a question withrefusal, which has no scored fields and does not trigger a fallback. - Counting on your PII redaction plugin. During the Beta,
stateandinstructionsreach the provider exactly as sent. - Sending a
choicequestion withoutcriteria, or ascorewith one level. Both fail with422.
Elf's challenge
Grade Tim's manners: add a score question with "criteria": ["Rude", "Plain", "Very polite"]. Is the score that comes back safe to use as criteria[score]?
Stuck? Ask Tinsel for a hint
No. The docs call score a position on the scale, not an index, so it can be fractional (the docs example shows 1.41). Use legend to map each whole index back to your labels.
Christmas crackerWhy is Sprocket begging Santa for a 0.5 cut-off?Pull it for the punchline
His is_nice came back 0.51.