Call Decision Model Jev from Python in 10 Minutes: Let AI Make Choices and Score

Jev decision model performs classification, judgment, and scoring at extremely low cost; with confidence thresholds it can safely automate an AI customer service inbox.
The article introduces a lightweight AI decision-making approach: using Jev, a model designed specifically for decision-making, you can perform three types of structured judgments—No (yes/no), Choice (select one), and Score (scale rating)—with just a few lines of Python, rather than generating natural language text. Using Open Router as the provider, the author demonstrates refund judgment, team routing, and urgency scoring, with a single decision costing as little as less than one-thousandth of a cent. The core highlight is combining the three question types into a single request to build an auto-routing AI customer service inbox, with confidence thresholds as a fallback: below the threshold, hand off to a human; above the threshold, allow the AI to process. This design of "honestly expressing uncertainty" means the model doesn't need to always be right, yet can safely automate large numbers of routine decisions at extremely low cost.
When large language models are used to handle massive numbers of simple decisions, cost and latency often become bottlenecks. A Bilibili video tutorial demonstrates a lighter-weight approach: using Jev (transliterated as Jav/Jab/Jace in the subtitles), a model designed specifically for decision-making, to perform classification, judgment, and scoring with just a few lines of Python, and chain these together into a practical AI customer service inbox.
What Is Jev: It Doesn't Generate Text, It Only Makes Decisions
According to the Bilibili video tutorial, Jev is a decision model whose output is not natural language text but a structured judgment about a given state. When using it, you provide a state (such as a customer message) and then ask three types of questions about that state: No (yes/no questions), Choice (select one category or label from given options), and Score (rate something on a scale).
This design makes Jev very precise and extremely cheap when handling large numbers of routine decisions. The video emphasizes that when you need to make a large number of decisions that you typically wouldn't want to hand off to a large language model, Jev is an excellent choice.
Decision Model is a class of machine learning models designed specifically for structured judgment tasks, in contrast to generative large language models. Traditional LLMs generate text token by token in an autoregressive manner, which has high inference costs and requires additional parsing of outputs; decision models, by contrast, typically output probability distributions or category labels directly and are specifically optimized for tasks such as classification, ranking, and scoring. These models tend to have fewer parameters and faster inference, making them suitable for high-frequency, low-complexity decision scenarios. Jev belongs to this category: its output is not natural language but directly consumable structured results (such as boolean probabilities, option probabilities, and scale-weighted scores), eliminating post-processing steps and greatly reducing the cost per decision.
First Call: Refund Judgment in a Few Lines of Code
The video demonstrates the complete process of sending a request through Open Router. The author recommends using Open Router as the Jev provider—just register an account and obtain an API key to get started. The code needs to import modules such as json, os, and requests, and pass the customer message as a Message—the example content is "Hello, my order from last week was charged twice, can I get a refund for one of the payments?"
In the request, you need to specify the model, then pass in the state and an array of questions. Each question can be given any meaningful name, such as labeling it "Refund" with type set to No; in the instruction, write "Based on this state, is the customer requesting a refund?" and provide the True/False criteria. According to the video demonstration, the No value returned by Jev is a number between 0 and 1, where 1 represents True and 0 represents False—that is, the probability that the model believes the judgment to be true.

After running the code, the Is_Answer_Refund in the response has type No with a No value of 0.98, meaning the model judges with 98% probability that this is a refund request, and the ticket can be routed to the refund team. The Usage field in the response also shows the cost—less than one-thousandth of a cent. The author suggests wrapping an Ask helper function to handle request sending uniformly, and subsequent examples are all built on it.
Open Router is an API gateway that aggregates multiple model providers. Developers can call models from different vendors through a single API key and are billed by usage. It unifies the request format (such as the OpenAI-compatible chat/completions structure), simplifying the process of switching between and comparing multiple models. In the Jev example, Open Router acts as the provider responsible for routing requests to the Jev model, and the response returns structured decision results along with a Usage cost field. The advantage of using an aggregation gateway is that you don't need to register accounts with each vendor separately, but note that different providers may vary in their support for the same model and in their billing methods.
Choice: Selecting a Team from Multiple Options
The Choice type is used to select one option. In the video example, several customer messages are prepared, the question "Which team should handle this customer message?" is asked, and four options with descriptions are provided: Shipping, Tech, Billing, and Sales. Jev determines which category the message should be classified into based on the description values.
According to the demonstration, the example messages include "My package shows as delivered but it's not at my door," "I can't log in, it keeps saying wrong password," "Why is my plan $29 but I was charged $49," and so on, and the model gives the corresponding team classification for each. The Choice answer includes the selected option and a list of probabilities; if the model is not confident enough, it gives a confidence level other than 1, and the probability values of all options sum to 1, forming a probability distribution.
Probability Distribution here refers to the normalized result in which the probability values of the options returned by the Choice type sum to 1. For example, the four team options receive 0.1, 0.7, 0.15, and 0.05 respectively, indicating that the model believes the Tech team has the highest probability of handling the message. This output contains more information than a single hard label: the highest probability is the selected category, and its value itself can be regarded as the confidence level. When the highest probability is close to 1, the model is very certain; when multiple options have similar probabilities, it indicates the model is hesitant. Developers can use this distribution to set dynamic thresholds, automatically routing only when the highest probability exceeds the threshold, and otherwise handing off to human review.
Score: Giving Urgency via Weighted Average
The Score type is used to rate on a scale. The video takes ticket urgency as an example, with the instruction "How urgent is this support ticket" and a criteria array containing three values corresponding to 0, 1, and 2 on the scale—that is, not urgent, normal, and urgent. If there are four criteria, the scale range expands to 0 to 3, with labels evenly distributed across the scale.

The score returned by Jev is the weighted average of each level. For example, a score of 0.96 means the probability of being rated 0 is 0.96 and the probability of being rated 1 is 0.05, with a weighted average total of about 0.96, along with a confidence of about 93%. In the demonstration messages, "Wondering if there's a dark mode on the roadmap" is rated 0 (a general question), "My order is a few days late, any updates" scores 0.96 (normal but can wait), and "The whole team is locked out and we have a client demo in 20 minutes" scores 2 (extremely urgent).
Weighted Average is used in the Score type to convert a probability distribution over a discrete scale into a continuous score. Assuming the scale labels are [0,1,2] and the model returns probabilities [p0,p1,p2] for each level, the final score is 0×p0+1×p1+2×p2. The advantage of this approach is that it preserves the expression of uncertainty: if the model believes a ticket is "normal" and "urgent" with equal probability, the score will fall near the middle value rather than arbitrarily rounding. At the same time, the highest probability value can serve as a confidence reference. Developers should note that the weighted average score may fall at non-integer positions, and the business side should define interpretation rules for score ranges (e.g., below 0.5 is considered not urgent).
Combining Multiple Questions: Building a Simple AI Customer Service Inbox
At the end of the video, the three question types are integrated into a single request: for each ticket, simultaneously ask which team it should be assigned to (Choice), whether a refund is wanted (No), and how urgent it is (Score), and calculate the total cost. The author adds a practical fallback logic—when confidence is below a preset value, do not trust the AI's judgment and hand it over to a human; only when above the threshold is the AI allowed to actually process it.

The actual run results cover multiple scenarios: charged twice for this month's subscription—team Billing, refund True, urgency 94%, entering the refund queue; the app crashes when opening the settings page on Android—team Tech, refund False, urgency 1.63; a message asking about team plans has only 44% confidence, refund False, urgency 0.14, and is handed off to a human due to uncertainty; "the entire company can't log in" receives a high urgency of 2 and 100% confidence. The author mentions that the total cost of classifying these tickets is roughly on the order of one-thousandth or even one-ten-thousandth of a cent.
This confidence-driven routing is the most worthwhile part of the whole approach: the model doesn't need to always be right—as long as it honestly expresses uncertainty and hands the decision back to a human, it can safely automate large numbers of routine decisions at extremely low cost.
Practical Notes
- Give questions semantically meaningful names so you can retrieve values by name from the response.
- Question types can only be one of No, Choice, or Score; the number of scale labels determines the scoring range.
- The provider is not limited to Open Router—Jev's official API or any service you're used to works, as long as the request structure stays consistent.
- Complex or ambiguous questions will lower confidence, so always use thresholds as a fallback rather than trusting everything blindly.
One-line Summary
Jev decision model performs classification, judgment, and scoring at extremely low cost, and combined with confidence thresholds can safely automate an AI customer service inbox.
Paragraph Summary
The article introduces a lightweight AI decision-making approach: using Jev, a model designed specifically for decision-making, you can perform three types of structured judgments—No (yes/no), Choice (select one), and Score (scale rating)—with just a few lines of Python, rather than generating natural language text. Using Open Router as the provider, the author demonstrates refund judgment, team routing, and urgency scoring, with a single decision costing as little as less than one-thousandth of a cent. The core highlight is combining the three question types into a single request to build an auto-routing AI customer service inbox, with confidence thresholds as a fallback: below the threshold, hand off to a human; above the threshold, allow the AI to process. This design of "honestly expressing uncertainty" means the model doesn't need to always be right, yet can safely automate large numbers of routine decisions at extremely low cost.
Related articles
Tech FrontiersSherlock: An Open-Source Tool for Tracking Usernames Across Social Networks
Sherlock is an open-source Python tool that tracks social accounts across networks by username. This article covers its core features, why developers love it, typical use cases, and privacy compliance considerations.
Tech FrontiersGitHub Daily·Nov 07: Agent-Ready and Context Compression
GitHub Trending Nov 07: meta's agent-ready design system astryx, billion-context's 5x context compression, sherlock nearing 100k stars, plus local-first localthings and bare-metal GPU orchestration nvke.
Tech FrontiersBuoyant Open-Sources Kinference: An Inference Control Plane for vLLM on K8s
Buoyant open-sources Kinference, an inference control plane for vLLM on Kubernetes, with declarative routing, KV-cache-aware load balancing, and per-tenant metrics—claiming 95% lower median TTFT in official benchmarks.