Language models are primarily associated with generation. We ask a question, provide context and a moment later receive an answer: a message, a document summary, a code snippet or a data structure ready for further use.
The more often we use models inside applications, however, the more tasks appear where we do not actually need another piece of text. The system has to decide where to route a ticket, whether a search result is good enough, how urgent a case is or which tool should be used in the next step.
In situations like these, the interesting question is no longer what the model should write, but rather which of the available possibilities it should choose.
This leads to a slightly different way of using language models — one in which language remains the way we describe the problem, but text generation is no longer the final goal.
Not every answer has to be text
Imagine a simple customer support system. A user writes:
“Since yesterday I haven’t been able to pay by card. Two transactions were declined, and on the third attempt the money disappeared from my account.”
The system does not necessarily need to respond to the customer. At this stage, it may only need to determine the ticket category, its urgency and whether the case requires human intervention.
We can of course send the ticket to a generative LLM and ask it to return an answer in a specific format:
{
"category": "payments",
"priority": "high"
}Technically, this works very well. From the application’s point of view, however, the only values we care about are payments and high. We do not need writing style, reasoning or additional sentences.
There are many more cases like this.
Does a document satisfy a specific condition? Does the consultant’s response actually solve the customer’s problem? Does the RAG result contain enough information? Should the agent perform another search? Which of the available tools best fits the current task?
In all of these cases, the model’s main job is to evaluate several possibilities and help make a choice.
If the final result is supposed to be a decision, a natural question follows: does the model really need to generate something first?
Between a classifier and a generative LLM
We have long used classical classification models for tasks like these. We train a model on a fixed set of labels, for example billing, technical and sales, and then receive probabilities for the individual classes for a new example.
This approach is simple and effective when the problem remains stable. If we want to recognise the same four document types for years or route tickets into the same few categories, a specialised classifier may be exactly what we need.
Things become less convenient when similar decisions start multiplying.
One model determines the ticket category, another its urgency, a third its risk, and yet another whether a document complies with a procedure. Each new task may require another dataset, another training cycle and another model to maintain.
Generative LLMs solve this problem from the opposite direction. Instead of training another classifier, we can simply describe the task:
Assign the ticket to one of the categories:
- billing
- technical
- sales
- otherand a moment later ask the same model:
Assess the urgency of the ticket:
- low
- medium
- high
- criticalWe do not change the model. We change only the instruction and the space of possible answers.
There is, however, an interesting space between these two approaches.
On one side we have the classifier — fast and specialised, but tied to a specific task.
On the other side we have the generative LLM — extremely flexible, but designed primarily to predict subsequent tokens and generate content.
We can, however, treat the model’s language interface differently. Give it a state, a question and possible answers, and receive an evaluation of those possibilities instead of another sentence:
technical 0.82
billing 0.11
sales 0.05
other 0.02The model still uses its ability to understand language and instructions, but its role changes. It no longer has to formulate an answer. It has to make a constrained decision within a space defined by the application.
One abstraction, many decisions
Such a contract offers much more than ordinary classification.
Let us return to our customer ticket. We can ask:
Which area best describes the ticket?
- payments
- login
- account
- offerThis is a choice of one possibility.
But we can evaluate the same state with another question:
Does the ticket require human intervention?
- yes
- noor on an ordered scale:
How urgent is the case?
- low
- medium
- high
- criticalWe can also allow several independent answers:
Which problems does the ticket involve?
- declined payment
- incorrect account charge
- login problem
- delivery problemIn this case, the first two answers can both be true at the same time.
Finally, we can stop asking only about the description of the situation and move to action:
What should happen next?
- respond automatically
- ask for additional information
- hand over to a consultant
- stop automatic handlingThe type of decision changes, but the basic way of working does not. We still have a state, a question and a space of possibilities that the application can actually handle.
Importantly, the same state can be evaluated from several perspectives at once. A single ticket can receive a category, an urgency level, information about whether escalation is needed and a recommended next step within the same process.
We therefore start to think of such a model less as a single classifier and more as a shared state-evaluation layer inside the system.
Probability as part of the interface
The winning answer is not always the most important piece of information.
Compare two cases:
Case A
payments 0.96
account 0.02
technical 0.01
other 0.01and:
Case B
payments 0.41
account 0.36
technical 0.15
other 0.08In both cases payments wins, but the nature of the two decisions is completely different.
In the first case, one possibility clearly dominates. In the second, the two best answers are very close to each other.
That means a bare result:
paymentsmay be less useful to the application than:
payments: 0.96We do, however, need to be careful with the word “confidence”. A raw model score does not automatically become a probability that we can trust from a business perspective. If we want to automate real decisions based on it, we need calibration and validation on data representative of our use case.
Only then can we sensibly define policy:
if confidence >= AUTO_THRESHOLD:
process_automatically()
else:
send_to_human_review()The threshold should not come from intuition such as “0.9 sounds safe” either. It should come from measurements and the acceptable error level.
Different decisions may also have different requirements. Automatically assigning a ticket to a queue is relatively cheap to correct. Rejecting a document, blocking a transaction or performing an irreversible action may require much higher confidence.
This allows us to separate two things that are easy to confuse:
the model evaluates the situation, while the application defines the policy.
The model may provide a signal:
escalation required: 0.87but the code decides whether 0.87 means automatic escalation, additional verification or leaving the decision to a human.
Probability therefore stops being a decorative number displayed next to an answer. It becomes part of the interface between the model and the rest of the system.
From simple decisions to more complex operations
A single question such as “which category?” is relatively simple. More interesting possibilities appear when we start composing such decisions.
Assume that we are working with a document:
The agreement was signed on May 14.
The customer may withdraw from it within 14 days.
The withdrawal request was received on June 2.The system can first identify the fragments needed to solve a particular problem, then extract relevant values from them, and finally verify a specific claim.
We can therefore build operations corresponding to tasks such as:
- classifying a document according to described criteria,
- verifying whether a specific claim is supported by the source material,
- selecting only the fragments needed for the next stage,
- extracting values into a predefined schema,
- deciding whether the available information is sufficient to perform the next step.
The important point is that a more complex task does not have to mean one large answer generated “from start to finish”.
It can consist of several smaller operations that are easier to observe.
This also gives us an interesting architectural property. We can separately see which information was considered relevant, what result the next stage produced and why the application continued.
The model does not have to be a black box executing the entire process. It can become one component of the process, responsible for specific semantic decisions.
A decision model as part of an agent
Agent systems contain particularly many decisions of this kind.
An agent may have access to documentation, a database, APIs and many tools. Before it generates an answer for the user, it has to decide which source to use and what to do with the returned result.
A user may, for example, ask:
“Where is my order 18492?”
The available possibilities are clearly defined:
- search the documentation
- fetch order data
- search products
- hand over to a consultantA generative LLM can of course make such a choice through function calling. It is not the only possible solution, however.
If we are interested only in choosing the next operation, we can treat it as a separate decision.
The same applies to the next stage.
After performing a search, we can ask:
Is the retrieved information sufficient to answer the user?
If yes, we continue. If not, we perform another search or use another tool.
A decision model can therefore appear at several points in an agent workflow: when selecting a source, selecting a tool, evaluating the result, retrying or deciding whether to escalate.
This does not mean that it replaces the main generative model. Rather, it allows us to extract some of the small, closed decisions from it for which free-form generation is not particularly useful.
How a decision model works in practice
A good place to test this concept in real code is basal-omni-1.0-ultra.
It is an open model from the Basal family built on Gemma 4 31B. It runs behind the basal inference engine, which exposes an HTTP API. After installing Basal, we can run the model locally:
basal-serve \
--model Remek/basal-omni-1.0-ultra \
--mode eager \
--media on \
--port 8000We can then send an ordinary request from the application.
Let us assume once again that we are handling customer tickets:
import requests
ticket = """
The customer cannot log in to online banking.
After several attempts the account was locked.
"""
payload = {
"state": ticket,
"questions": {
"department": {
"type": "choice",
"instructions": "Which department should handle the ticket?",
"criteria": {
"cards": "Card complaints",
"online": "Online banking support",
"loans": "Loans",
},
},
"urgent": {
"type": "noul",
"instructions": "Is the customer unable to use the service?",
},
"severity": {
"type": "score",
"instructions": "How serious is the problem?",
"criteria": [
"low",
"medium",
"high",
"critical",
],
},
},
}
response = requests.post(
"http://127.0.0.1:8000/v1/systemone",
json=payload,
)
answers = response.json()["answers"]In a single call, we therefore use the same state for three different decisions. Because each question has a different type, the individual elements of the response also have a slightly different structure. An example result may look like this:
{
"department": {
"type": "choice",
"choice": "online",
"probabilities": {
"cards": 0.01,
"online": 0.97,
"loans": 0.02
},
"confidence": 0.97
},
"urgent": {
"type": "noul",
"noul": 0.94,
"probabilities": {
"true": 0.94,
"false": 0.06
},
"confidence": 0.94
},
"severity": {
"type": "score",
"score": 2.63,
"legend": {
"0": "low",
"1": "medium",
"2": "high",
"3": "critical"
},
"probabilities": {
"0": 0.01,
"1": 0.04,
"2": 0.26,
"3": 0.69
},
"confidence": 0.69
}
}For choice, we receive the selected possibility and a probability distribution over the available options. In the case of noul, the noul value represents the probability of a positive answer. score works differently again: it returns the expected value on an ordered scale, which is why the result for the distribution above is 2.63, even though the most probable individual level is critical.
The application can use the individual results independently:
department = answers["department"]
urgent = answers["urgent"]
severity = answers["severity"]
if department["confidence"] >= AUTO_ROUTE_THRESHOLD:
route_ticket(department["choice"])
else:
send_to_human_review(ticket)
if urgent["noul"] >= 0.90:
mark_as_urgent()
print(f"Severity score: {severity['score']:.2f}")And this fragment illustrates the division of responsibilities particularly well. The model answers semantic questions about the ticket, while the final logic remains in the application.
Basal does not limit the interface to choice. The basic question types also include noul and score, while the Basal engine provides additional mechanisms for more complex decisions, including multi, act and tool.
basal-omni-1.0-ultra allows up to 255 possibilities to be defined in a single question and also supports images. It is worth remembering, however, that image support in this version is experimental: the model was trained on text decisions, while the image layer comes from the underlying Gemma 4 model. The 31B variant does not support audio.
It is therefore not a small classifier that we can run on any machine without thinking about infrastructure. Rather, it is a good example of how far the idea can be taken: one model handling many different types of decisions defined only at request time.
Not every problem needs a decision model
It is easy to overestimate the possibilities of this approach. The fact that a model can make a decision does not mean that we should use it for every decision in the system.
If a condition can be expressed unambiguously:
if account_balance < 0:
block_transfer()then a language model only makes the solution more complicated.
Likewise, if we have fixed classes, a large amount of labelled data and a very stable problem, a classical specialised classifier may be simpler, faster and cheaper.
There is also another solution that can easily be confused with a decision model: Structured Output.
We can constrain a generative LLM to a specific schema:
{
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": ["billing", "technical", "sales"]
},
"urgent": {
"type": "boolean"
}
},
"required": ["category", "urgent"],
"additionalProperties": false
}We then receive a predictable result:
{
"category": "technical",
"urgent": true
}And in many applications, this will be exactly the best solution.
If we already use a generative LLM and want to extract the customer’s name, date, invoice number, category and a short summary from text, Structured Output naturally fits the problem.
A decision model addresses a slightly different question.
The main point is not that the result should have the correct format, but that we receive an evaluation of a constrained decision space:
technical 0.84
billing 0.11
sales 0.05We can of course add a field to the schema of a generative LLM:
{
"category": "technical",
"confidence": 0.84
}but such a value is still content generated by the model. Simply placing a confidence field in JSON does not make it a calibrated probability suitable for controlling automation.
In a decision model, the answer distribution is part of the model’s contract and can be calibrated and validated on data for a specific use case.
This does not mean that one approach is better than the other.
If we need a hard rule — we use code.
If we have a fixed, well-defined classification problem — a classical classifier may be the best choice.
If we need a generative model but the result should have a predictable structure — Structured Output may solve the problem very well.
If the decision is semantic, we know the space of possibilities in advance, and probability and uncertainty have real significance for downstream behaviour — then a decision model becomes particularly interesting.
And if we need a free-form answer, summary, text or code — a generative LLM remains the appropriate tool.
The boundaries between these solutions will not always be sharp. The same problem can often be solved in several ways, and the choice will depend on cost, latency, available infrastructure and the required level of control.
The most important question is therefore not: which model is the best?
A better question is: what kind of result does the application really need?
Sometimes it will be text. Sometimes an object conforming to a schema. Sometimes a single decision together with its probability.
And sometimes the best model will still be an ordinary if.