# How it works

> Follow a text from your request to a typed answer, then decide what your application should do with it.

Source: https://opendecisio.com/docs/how-it-works/

Send a text and your [questions](https://opendecisio.com/docs/glossary/#question), then use the typed answers in your application. The model judges the text; your code chooses the next action.

 

[Figure: Ask a question; use the answer in your backend. Text: My card keeps getting declined when I renew.. Question: Which team should handle this ticket?. Answer: billing, probability 0.80. Your code: Route to a queue or ask for review.]

 

## 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](https://opendecisio.com/docs/layout/) when you ask a series of different questions about the same text. The default [header layout](https://opendecisio.com/docs/glossary/#prompt-layout) on Gemma lists the questions before the text, so a different set of questions can require another read.

 

## One decision and its probabilities

 

 

Each question returns [probabilities](https://opendecisio.com/docs/glossary/#probability) over the answers you supplied. A [choice](https://opendecisio.com/docs/concepts/choice/) selects an [option](https://opendecisio.com/docs/glossary/#option), a [yes/no question](https://opendecisio.com/docs/concepts/noul/) returns the probability of yes, and a [score](https://opendecisio.com/docs/concepts/score/) returns a weighted level on your scale.

 

[Figure: A question is one prompt; its answer is read at one position, with no text generated. One support-ticket question with 6 lettered options becomes one prompt. The model's distribution over the letters at the answer position is the answer: A billing 0.96, B access 0.01, C bug 0.02, D feature 0.00, E cancellation 0.01, F other 0.00.]

 

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](https://opendecisio.com/docs/concepts/probabilities/) is your policy; it does not create a certificate.

 

## Teach, then certify, then route

 

 

Start with an ordinary request. When you ask the same question repeatedly, [teach a task](https://opendecisio.com/docs/tasks/) from examples labelled by people, then [certify it](https://opendecisio.com/docs/tasks/certify/) at your [error target](https://opendecisio.com/docs/glossary/#error-target).

 

[Figure: Teach the question, certify its answers, route on the certificate, and let the server watch. Three steps and a watch. 1, teach: your labelled examples fit a correction to your question. 2, certify: examples held back set a threshold with an error target. 3, route: certified answers act on their own and the rest go to a person. The server watches the traffic and suspends certificates when it shifts. 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

 

 

Run a [GPU server](https://opendecisio.com/docs/deploy/cloud-gpu/), [MLX on Apple silicon](https://opendecisio.com/docs/deploy/mac/), or the supported [Ollama path](https://opendecisio.com/docs/deploy/mac/#on-a-laptop-with-ollama). Your backend sends HTTP requests to the running service.

 

[Figure: The same server and the same routes everywhere; only the engine under it changes. The same decisio server and routes on four engines: One NVIDIA card, stock vLLM with decisio's plugin; Docker, vLLM's release image with decisio inside; A Mac, MLX, from an MLX build of the model; Any machine, for development, a small model on the CPU. Each links to its deploy guide.]

 

## 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](https://opendecisio.com/docs/measured/#repeatability) describes the measured behavior and the settings for repeated reads.

 

 

## Good to know

 

- A default request selects among supplied answers; [thinking](https://opendecisio.com/docs/think/) is an optional extra reasoning step.
- A certificate covers one [task](https://opendecisio.com/docs/glossary/#task) and [serving setup](https://opendecisio.com/docs/glossary/#serving-setup); certify again after changing either.
- Your application needs a review path for uncertain answers and service failures, as the [recipes](https://opendecisio.com/docs/use-cases/) show.

 

## What next

 

- [Write a decision request](https://opendecisio.com/docs/build-request/): choose questions and options for your data.
- [Use probabilities](https://opendecisio.com/docs/concepts/probabilities/): connect a result to application policy.
- [Teach a task](https://opendecisio.com/docs/tasks/): improve a recurring question with your own labels.
