DocsQuestions and answers
How it works
Follow a text from your request to a typed answer, then decide what your application should do with it.
Send a text and your questions, then use the typed answers in your application. The model judges the text; your code chooses the next action.
Figure · Illustrative decision
Ask a question; use the answer in your backend.
- TextMy card keeps getting declined when I renew.
- QuestionWhich team should handle this ticket?
- AnswerSelected: billingbilling0.80access0.05bug0.15
- Your codeRoute to a queue or ask for review
The question and possible answers are yours. Your application chooses what happens next.
Illustration: chosen probabilities, using the tutorial request. Your model returns its own values.
The request flow
Section titled “The request flow”
Put the text in state, and name each entry in questions so you can find its answer later.
A request shares a read of the text across its questions.
Ask related questions together when you already know them.
Use plain layout when you ask a series of different questions about the same text. The default header layout on Gemma lists the questions before the text, so a different set of questions can require another read.
One decision and its probabilities
Section titled “One decision and its probabilities”
Each question returns probabilities over the answers you supplied. A choice selects an option, a yes/no question returns the probability of yes, and a score returns a weighted level on your scale.
Figure · One pass
A question is one prompt; its answer is read at one position, with no text generated.
The text is read once per request, and every question starts from that read. The letters are the options, in order.
Recorded decision: Gemma 4 31B, decisio 0.17.0, RTX PRO 6000 at 600 W, 2026-10-19, on the plain layout; record 1 of 60 of decisio-examples' support-routing run, sent again on that release; the probabilities are rounded to two places. The mechanism is the README's "How it works".
The figure shows a recorded request under the plain layout. Treat probabilities as inputs to an application policy: act, request review, or ask a follow-up question. A manual threshold is your policy; it does not create a certificate.
Teach, then certify, then route
Section titled “Teach, then certify, then route”
Start with an ordinary request. When you ask the same question repeatedly, teach a task from examples labelled by people, then certify it at your error target.
Figure · Teach and trust
Teach the question, certify its answers, route on the certificate, and let the server watch.
Teach a task, Certify answers and Watch for drift each take one of these.
Your application checks each answer’s certified and certificate_kind fields before acting.
A gold certificate concerns correctness on traffic like your labelled examples; an agreement certificate concerns how often a learned table agrees with the model.
Send answers that do not meet your policy to review.
Where it runs
Section titled “Where it runs”
Run a GPU server, MLX on Apple silicon, or the supported Ollama path. Your backend sends HTTP requests to the running service.
Figure · Where it runs
The same server and the same routes everywhere; only the engine under it changes.
Each panel links to its guide.
What repeats
Section titled “What repeats”Keep the model and serving settings stable when you need comparable answers. Exact probabilities can move across batches, restarts or machines; What was measured on what describes the measured behavior and the settings for repeated reads.
Good to know
Section titled “Good to know”- A default request selects among supplied answers; thinking is an optional extra reasoning step.
- A certificate covers one task and serving setup; certify again after changing either.
- Your application needs a review path for uncertain answers and service failures, as the recipes show.
What next
Section titled “What next”- Write a decision request: choose questions and options for your data.
- Use probabilities: connect a result to application policy.
- Teach a task: improve a recurring question with your own labels.