Choice, score and noul questions
A request carries one state (the text to judge) and up to 32 questions. Each question has one of three types. Every question is answered independently against the same state, in a single forward pass, so adding one more question never changes the others.
Explore the three types
Pick a type to see how Laya reaches its answer, what you send, and what comes back. Then run it on your own text.
choice: pick one label
Like a multiple-choice quiz. Laya scores every option against the text, the scores add up to 100%, and the most likely one becomes the answer.
“What does the customer want?”
→ choice = refund
Free demo, no key, processed in Switzerland.
You send (in questions)
You get back (answers.intent)
Tips for choice
- Describe each label in criteria (a short phrase each). Bare names give the model less to work with.
- Always include an "other" option so unrelated text has somewhere to go.
- Keep it small. Accuracy drops on big taxonomies (Banking77, 77 labels: 0.425), so split into a coarse and a fine question.
Reference: the three question types
choice — pick one label
score — ordinal levels
noul — is this statement true?
Request fields
| Field | Description |
|---|---|
statestring | object | array | What to decide about. Objects are serialised to JSON. Only the first 512 (English) or 1,024 (multilingual) tokens per question are read — put the decisive text first. |
questionsrequiredobject | Map of your question ids to definitions. Max 32 per request, max 64 options per question. |
model"english" | "multilingual" | "typed-decision… | Pin a checkpoint. Omitted (or an unknown id such as a Jev model name) → automatic routing. |
langstring | Language hint ("en", "de", "pt-BR"). Beats automatic detection, which can mistake short non-English Latin-script text for English. |
Choosing thresholds
Laya's checkpoints ship over-confident before per-task calibration (the model card reports mean ECE falling from 0.466 to 0.081 after temperature fitting). Treat confidence as a ranking signal: collect a few hundred labelled examples, find the confidence above which accuracy meets your bar, automate above it and send the rest to a human. See calibrated probabilities and act/escalate routing.
Tips for writing good questions
- Describe each label in
criteria; bare label names give the model less to work with. - Keep label sets small. Accuracy drops on large taxonomies (Banking77, 77 labels: 0.425) — split into a coarse question and a fine one.
- Ask one thing per question. Each question reads the state once and is billed its input tokens, so ask only what you act on; five focused questions answer better than one compound one.
- If a noul answer seems to follow its own true/false wording rather than the text, rephrase it as a two-option choice with neutral keys.
- For the four typed-decision workflows (customer service, invoices, security incidents, agent traces), pass
"model": "typed-decisions".