Decision models evaluate supplied information against questions with predefined answer spaces, such as whether a support request is urgent, which team should handle an invoice, or how severe an incident is. They return typed answers rather than open-ended text or arbitrary extracted values, which helps you connect AI judgments to application logic.
On Cloudflare, you can run Cloudflare's Clef family of decision models (Clef, Clef-flash, and Clef-omni) directly on Workers AI, or call TypeSafe's Jev decision models (Jev and Jev 1.14) through AI Gateway.
You provide an input state and define a set of named, typed questions, including each question's instructions and allowed options or scoring levels. For the core question types, the model returns structured results with probabilities. Typed results provide a predictable structure but do not guarantee correctness.
| Model | Model ID | Supported inputs | Notes |
|---|---|---|---|
| Clef | @cf/cloudflare/clef |
Text, JSON, images, video | 27B multimodal decision model on Workers AI (65,536 context window). |
| Clef-flash | @cf/cloudflare/clef-flash |
Text, JSON, images, video | Fast 9B multimodal decision model on Workers AI (24,576 context window). |
| Clef-omni | @cf/cloudflare/clef-omni |
Text, JSON, images, audio, video | 30B MoE (3B active) multimodal decision model on Workers AI (64,000 context window). |
| Jev | typesafe/jev |
Text, JSON (images in beta) | TypeSafe's Jev 1.13 decision model via AI Gateway. Beta image inputs are not recommended for production. |
| Jev 1.14 | typesafe/jev-1.14.0 |
Text, JSON (images in beta) | TypeSafe's Jev 1.14 decision model via AI Gateway. Adds beta box questions (images and box questions are not recommended for production). |
Use a decision model when your application needs to select from a predefined set of options, evaluate a yes/no condition, or score an input against an ordered rubric. Alternatively, use an extraction model to extract, compute, estimate, or forecast typed values, or a generative model to produce open-ended content.
The following table compares these model types using invoice examples:
| Model type | Use when you need | Invoice example |
|---|---|---|
| Decision | Select from a predefined set of options or score against a defined rubric. | Determine if an invoice requires approval, manual review, or rejection. |
| Extraction | Extract, compute, estimate, or forecast values, such as amounts, dates, durations, or text. | Read the total and due date from an invoice. |
| Generative | Produce open-ended content. | Summarize discrepancies between the invoice, purchase order, and delivery receipt. |
If a condition is exact and deterministic, such as checking whether an invoice total exceeds a fixed threshold or comparing two dates, write that rule in application code rather than calling a model.
A decision request combines an input state (text or structured JSON) with a map of named questions. Some models also accept media, such as images, audio, or video. Each question specifies a type and instructions. Set criteria to an option map for choice or an ordered list of levels for score. For noul, criteria is optional. The response returns one entry in answers under each question ID.
For example, you provide an invoice record and approval policy as state. Separately, you define three questions:
missing_po(noul): whether the invoice is missing a purchase-order reference.routing(choice): whether the invoice should go toauto_approve,manual_review, orreject.risk_level(score): an ordered rubric from0(routine) to2(high risk).
The model returns the probability that the purchase-order reference is missing, the selected routing option with per-option probabilities and confidence, and a probability-weighted risk score with level probabilities and confidence.
Your application then decides what happens next, such as routing the invoice to a reviewer queue or requesting missing information. The model does not look up external records, verify permissions, or trigger side effects. Your application code owns those steps.
Clef and Jev support three core question types: noul, choice, and score. Supported question types vary by model and version. For example, Jev 1.14 adds a beta box question that returns bounding box coordinates and confidence. Box questions are not recommended for production.
Evaluate a binary yes/no proposition (type: "noul"). A Noul question returns a probability from 0 to 1 that the answer is yes. It returns a number rather than a pre-thresholded boolean, and it does not include a separate confidence field.
A value near 0.5 indicates uncertainty about whether the proposition is true, not a medium level of severity or degree.
Select one option from a defined list of unordered alternatives (type: "choice"). A Choice question returns the highest-probability option, the probability distribution across all defined options, and a confidence value.
You can include a fallback option such as other to handle inputs that do not fit your main categories, though a fallback option does not guarantee safe abstention on every task.
Evaluate an input against an ordered rubric of descriptive levels (type: "score"). Levels are indexed starting at 0. A Score question returns the probability distribution across all levels, a confidence value, and a probability-weighted level index (which can be fractional).
For example, on a three-level rubric (0, 1, 2), a returned score of 1.0 represents a weighted level index of 1.0, not 100% accuracy.
Question types and option lists define the shape of a response. They do not guarantee that the model chose the right answer.
Returned probabilities estimate likelihood across the options you defined. Calibration is a property measured across groups of predictions, not a guarantee that an individual prediction is correct.
Before relying on probability thresholds in production, evaluate the model's outputs against labeled examples from your own workflow.
For choice and score questions, confidence is a statistic computed from the shape of the returned probability distribution. It is not independent verification of the answer.
Probability, confidence, and empirical accuracy are separate quantities. A model can return high confidence and still be wrong, particularly when inputs are ambiguous, incomplete, or unlike those in your evaluation data.
Inspect the full level probability distribution for score questions rather than relying only on the weighted average. Different distributions can produce the same weighted score.
For example, on a 0 to 2 rubric, a distribution of (0, 1.0, 0) and a distribution of (0.5, 0, 0.5) both produce a weighted score of 1.0. The first is concentrated on level 1, while the second is split evenly between the two extremes.
Defining allowed options restricts what the model can return. It does not ensure the right answer is in your list.
If an input belongs to a category you omitted, the model still distributes probability across the options you provided.
Give each question a descriptive ID and write instructions that state exactly what the model should evaluate. Use criteria to define what each option or rubric level means so categories do not overlap.
Match the question type to the judgment your application needs:
- Use
noulfor yes/no checks. - Use
choicefor mutually exclusive categories. - Use
scorefor ordered scales where intermediate levels have clear definitions.
Keep deterministic checks, arithmetic, and business rules in application code.
Include relevant facts in the request, such as policy text, account metadata, or timestamps. The model uses the supplied state and question definitions, including supported media, and does not fetch live external data.
Choose safeguards based on the cost of an incorrect decision. Suggesting a triage queue for a human reviewer carries less risk than automatically issuing a refund or blocking an account.
Decide when to send uncertain results for review, such as a noul probability near 0.5 or a choice distribution with no clear winner. Before consequential or irreversible actions, verify results against independent checks or require human review.
- Typed output does not guarantee correctness. A response can satisfy your schema and allowed options while still making the wrong judgment.
- Probabilities and confidence scores are estimates, not guarantees. They do not replace application-level checks or evaluation on your own labeled data.
- Separate questions in one request should not be assumed to be statistically independent unless you have verified that assumption for your model and task. Do not multiply probabilities across questions without validation.
- Capabilities vary by model and version, including context windows, supported question types, and media inputs. Consult the model documentation for Clef, Clef-flash, Clef-omni, and Jev for model-specific limits and schemas.
- Review the decision model references for supported inputs, question schemas, and examples:
- Compare with extraction models when your application needs typed values rather than predefined choices.
- To call Clef over HTTP, follow the Workers AI REST API quickstart and refer to the Workers AI Run API reference.
- To call Jev over HTTP, use the universal
/ai/runendpoint in the AI Gateway REST API guide and the request example on the model page. - Configure a Workers AI binding to run models from a Worker. For Jev, refer to calling third-party models with the AI binding.