Evaluation framework · Decision models
Should this task use rules, a decision model, or an LLM?
Route an inbox message, handle a request with two issues, and compare the options on the same examples before choosing a model.
A service inbox receives this message: “The unit stopped yesterday, and the invoice still looks wrong.” Should it go to maintenance or billing?
This fictional example gives a model a small set of possible answers, but the request spans two of them. You could send it to a person, route it to both teams if the workflow allows that, or ask for more information. Choosing a model won’t settle how your business wants to handle it.
Start with that decision. Then compare the tools that might help make it.
Rules work when the fields already contain the answer
If a verified account field tells you which team owns a request, a rule can send it there. A model would add a chance of getting the same lookup wrong.
Rules become less useful when the answer depends on what a message means. A customer might describe the same broken unit in several different ways. A decision model can map that text to a set of choices, such as maintenance, billing, general questions, or review.
A general large language model can also classify the message. It can then do other work, such as summarizing the request or drafting a reply. Test whether you need that extra capability for the step you’re building.
Compare the output you need
| Approach | A good fit | What to check |
|---|---|---|
| Rules | Reliable fields determine a value or destination | Missing fields, conflicting rules, and rules that have become outdated |
| Decision model | Free text or other input must map to a stable set of choices | Wrong categories, ambiguous requests, unfamiliar inputs, and unreliable probability estimates |
| LLM with structured output | You need extracted fields, a category, or generated text in a set format | Correct format but wrong facts; refusals or incomplete answers |
| Human review | The request is incomplete, interpretations conflict, or a person needs to make the decision | Consistent decisions, enough context, and the time spent reviewing |
For the inbox example, test the category separately from any summary or draft reply. A fluent summary can make a wrong routing decision easier to overlook. Also check where the request actually lands after routing.
Structured output helps software read a model’s answer. It doesn’t make the answer correct. OpenAI’s documentation covers schema-constrained responses and their limits. Cloudflare’s Clef documentation describes questions with allowed answers and probabilities.
Decision models you can evaluate
Ollama added Jev-style decision models in September 2026. They use supplied state and named questions to produce bounded answers. Cloudflare introduced Clef and Clef-flash in October, with hosted models on Workers AI and downloadable models under Apache 2.0.
Cloudflare later added Clef-omni, which accepts audio and video as well as text and images. That can matter when the input is a recording but the answer still needs to be one of a few choices.
Check the limits of the version you’ll run. The October 9 update reduced hosted Clef-flash’s context window to 24K tokens while leaving the downloadable weights unchanged. A hosted endpoint and a local copy can therefore have different limits.
These releases give you options to test. Their announcements don’t establish accuracy, speed, or cost on your inbox.
Try the same requests with each approach
Collect examples from the task you want to automate and label the answers you expect. Include a straightforward maintenance request, a billing question, a message covering both, and one with too little information to decide. Add requests outside your categories and text that tries to tell the model to ignore its instructions.
Run rules, a decision model, and a general LLM on those same inputs. Count correct answers, incorrect destinations, and requests sent for review. Record how long review takes. Keep the inputs and versions so you can repeat the comparison after changing a model or rule.
A probability threshold needs testing too. A model reporting high confidence can still be wrong, especially on input unlike its training examples. Keep an option for an unknown answer or review, and check how often it is used.
For the fictional message about a broken unit and a disputed invoice, the review path would let a person choose how to handle both issues. An LLM could summarize the request for that person. Sending a reply or changing the account would be a separate task with its own permissions.
The intake test shows how to check a saved result. The routing cost example includes retries and failed work in the comparison.
This article proposes a comparison; it does not report measured model results. Release announcements were originally checked October 19, 2026, and the structured-output and Clef documentation on October 28.