The AI Doesn't Talk. It Decides.

An introduction to Jev, a decision-focused AI model by TypeSafe AI, explaining how it returns structured decisions with calibrated probabilities, where it can be used, and how it compares to traditional LLMs.

Hashan Ranasinghe10 min read
Share

Introduction

Imagine you own a huge online business that receives around 10,000 customer messages and emails every day. Before responding to them, you need to classify each message into categories such as critical, high, medium, low.

What's the first solution that comes to your mind? We could use a traditional Large Language Models (LLM), such as GPT, Gemini, or Claude, to classify these messages. And yes, we can do that!

We can send each message to an LLM and ask it to return the appropriate category. With structured outputs, we can even get the result in a predefined format that our application can use directly.

But here's the interesting question: Do we really need a model designed to generate text to make these simple decisions?

How much time would it take to classify all messages and emails? How much would it cost to process thousands of messages? And could we make this process faster and more efficient?

After all, we don't need a detailed explanation for messages. We simply need to choose the right category from a predefined list.

This is where Jev, a decision-focused AI model developed by TypeSafe AI, enters the picture. Instead of focusing on generating text, Jev is designed to return structured decisions that software can use directly.

Let's explore how it works, what makes it different, and whether this approach could change the way we build AI-powered applications.


Today's LLM Challenges and How Jev Approaches Them

Today, many AI-powered applications use LLMs to make decisions. For example, an application might use an LLM to classify customer messages, detect spam, or decide whether a support request needs urgent attention.

This works well, and general-purpose LLMs can even return structured data, such as JSON, that applications can process directly.

However, when an application needs to make thousands of similar decisions every day, it is worth asking whether a general-purpose model is the best fit for every task. Processing more requests can increase the overall cost and may introduce additional latency.

So, let's look at how traditional LLMs and Jev approach these tasks differently.

AspectTraditional LLMsJev
OutputCan generate text, JSON, and other structured outputs.Designed to return predefined, type-safe decisions.
How output is producedTypically generates output token by token, including when producing JSON.TypeSafe says Jev uses a parallel approach to produce its decisions rather than generating them token by token.
Response timeGenerating output token by token can add latency, especially for longer responses.Its parallel decision approach may reduce latency for structured decision-making tasks.
ConfidenceCan provide confidence estimates when prompted, but these estimates are not necessarily calibrated.Designed to provide calibrated probabilities, which aim to reflect how often predictions are correct.
FlexibilityCan handle many tasks, including writing, coding, summarizing, and decision-making.Focuses on specific decision types defined in advance.
Main trade-offHighly flexible, but generating more output than a task needs can add latency and cost.A more specialized approach that may be more efficient for clearly defined decision-making tasks.

The difference is what each approach is designed to do. A general-purpose LLM can generate almost any kind of response, while Jev focuses on producing decisions within a predefined structure.

For example, if we need to classify a customer message as low, medium, high, or critical priority, we may not need a detailed paragraph. We need a decision that our application can use.

Jev is designed for this kind of task. Whether it is faster or cheaper than a traditional LLM depends on the workload, and implementation, so those benefits should be measured in a comparable real-world test.


What Is Jev, and How Does It Work?

Jev is an AI model developed by TypeSafe AI, a company founded by Diogo Almeida in 2024. Almeida previously worked as a researcher at OpenAI and was involved in the development of reinforcement learning techniques such as RLHF. Jev is the company's first public model.

Let's explore the ideas behind Jev and understand how it works.

1. Understanding System 1 and System 2

The concepts of System 1 and System 2 became widely known through psychologist Daniel Kahneman's book Thinking, Fast and Slow. They describe two different modes of human thinking.

System 1 — Fast thinkingSystem 2 — Deliberate thinking
System 1 involves quick, automatic responses. It helps us recognize familiar patterns and make intuitive judgments without deliberately analyzing every detail.System 2 involves slower, more deliberate reasoning. It helps us analyze multiple factors, compare alternatives, and work through complex problems.
For example, when you read a message saying, "I was charged twice this month," you might immediately recognize that it is probably a refund request.For example, investigating a complicated billing dispute might require checking transaction records, review company policies, and comparing several pieces of information before deciding what to do.

These are simplified descriptions of human thinking. They are not strict categories that every AI model fits into.

How does this relate to Jev?

TypeSafe describes Jev as a System 1 model because it focuses on making fast, structured decisions.

Imagine your application receives thousands of customer messages every day. It needs to answer three questions about each message:

Three questions about each customer message

Instead of generating a detailed paragraph for every message, the application needs the answers in a format it can process. That's the idea behind Jev's System 1 approach.

2. How Does Jev Receive Questions and Return Decisions?

Jev works with two main inputs: state and questions.

  • State: The data the model needs to evaluate, such as a customer support email, a message, or relevant information about a transaction.
  • Questions: The specific decisions your application wants the model to make about that data.

For example:

State and questions example

These questions are defined in advance. According to TypeSafe's documentation, Jev supports three main question types.

Question typeWhat it doesExample result
noulEvaluates a yes/no question and returns a probability that the statement is true.
"Is a refund request?"
Yes (0.92) | No (0.08)
choiceSelects among predefined options and provides probabilities for those options.
"which department should handle a customer message?"
Billing (0.75) | Sales (0.10) | Technical Support (0.15)
scoreEvaluates the input against a predefined, ordered scale.
"It can assess a customer's issue using a priority scale."
Low (0.10) | Medium (0.25) | High (0.65)

3. Why Are Probabilities Important?

One of the interesting features of Jev is that it provides probabilities for its decisions. But why is this important, and what makes these probabilities different from simply asking an LLM how confident it is?

Let's understand this through an example.

Imagine that an online business receives this customer message:

"I was charged twice this month. Please fix this issue."

The AI needs to decide whether this is a refund request. It might return the following result:

  • Yes, it is a refund request: 90%
  • No, it is not a refund request: 10%

These probabilities help the application understand how likely the model considers each answer to be. However, a model assigning 90% probability to an answer does not automatically mean it will be correct 90% of the time.

This is where calibration becomes important. In simple terms, calibration means that an AI model's confidence should match how often its predictions are actually correct. For example, if a well-calibrated model assigns 90% probability to 100 similar predictions, around 90 of them should be correct.

If only 60 predictions are correct, the model is overconfident because its confidence does not match its actual performance.

Traditional LLMs can also provide confidence estimates but asking an LLM how confident it is does not guarantee that its estimates are calibrated. Jev is designed to provide calibrated probabilities as part of its decision-making approach.

This can help developers decide when a task can be automated and when an uncertain case should be reviewed by a human. However, calibration does not guarantee that an individual prediction is correct, so important decisions still require appropriate testing and safeguards.

This is where Jev's approach comes in. TypeSafe developed Jev using a training approach called Reinforcement Learning for Calibrated Decisions (RLCD), which focuses on producing decisions with well-calibrated probabilities.

4. RLHF vs. RLCD: How Is Jev Trained Differently?

Let's look at two training techniques to understand how Jev differs from traditional LLMs.

RLHFRLCD
Reinforcement Learning from Human FeedbackReinforcement Learning for Calibrated Decisions
RLHF uses human feedback to help AI models learn which answers people prefer.RLCD is the training approach TypeSafe says it uses for Jev. It focuses on training the model to make decisions with well-calibrated probabilities.
Example: Imagine an AI chatbot gives two answers to a customer's question. One answer is confusing, while the other is clear and helpful. Human reviewers prefer the helpful answer, and their feedback helps guide the model during training.Example: Imagine Jev is classifying customer messages to identify refund requests. If it assigns an 80% probability to many similar messages, a well-calibrated model should correctly identify approximately 80% of those cases.

In simple terms, RLHF focuses on human preferences, while RLCD focuses on reliable decision probabilities. RLCD does not guarantee that every decision will be correct, but calibrated probabilities can help applications decide when to automate a task and when to request human review.

Jev's approach is designed to make AI decisions easier for software to use. By combining structured outputs with calibrated probabilities, it aims to help developers build applications that can make decisions, assess uncertainty, and identify cases that need human review.


4. Where Can We Use Jev?

Jev is useful for applications that need structured decisions and probability estimates. Let's look at three practical examples of how it can be used.

1. Customer Support Automation

Jev can classify incoming customer messages, such as refund requests, billing problems, and technical issues. It can help route messages to the correct department, identify urgent cases, and use probabilities to help determine which cases can be automated and which need human review.

Example: The diagram below shows how Jev can evaluate multiple customer-support questions in a single request and return structured decisions with associated probabilities.

Customer support automation with Jev

2. AI Model Routing

Applications often use multiple AI models with different capabilities, costs, and reasoning abilities. Jev can help classify incoming requests and decide which model is appropriate for each task.

For example, a simple request might be sent to a lightweight model, while a complex task could be routed to a more capable reasoning model.

AI model routing with Jev

3. AI Guardrails

AI applications sometimes need to check whether an action or request follows predefined safety rules before proceeding. Jev can help evaluate these cases and provide probabilities that support decisions about whether to allow an action, block it, or send it for further review.

For example, before an AI agent executes a payment-related action, Jev could evaluate whether the action appears safe. The application can use that result alongside its own validation rules and safety checks.

AI guardrails with Jev


5. Limitations and Challenges of Jev

So far, we have explored what Jev is, how it works, and where it can be used. However, like any AI model, Jev also has limitations that developers need to understand before integrating it into their applications.

1. Understanding Why a Decision Was Made

One of Jev's main limitations is that it focuses on returning structured decisions and probabilities rather than generating detailed explanations.

For example, when a traditional LLM classifies a customer message, it can also provide a natural-language explanation for its classification. If the classification is incorrect, that explanation may help developers investigate what went wrong, although the explanation itself is not necessarily a reliable account of the model's internal reasoning.

With Jev, developers may receive a decision and its associated probability without a detailed explanation of why that decision was made. This can make it more difficult to investigate incorrect predictions and understand the factors that influenced the result.

2. Validate Inputs and Outputs

Developers should validate both the information provided to Jev and the decisions it returns.

Input validation helps ensure that the model receives data in the expected format and that important information is present. Output validation helps ensure that the returned decisions match the application's expected structure and allowed values.

For example, if Jev classifies a customer request, the application should check that the returned category is one of the predefined categories before using it to route the request.

3. Pay Attention to Data Quality

The quality of the input data can affect the quality of the decisions. Incomplete, outdated, misleading, or manipulated information may lead to incorrect predictions.

Developers should therefore check input data carefully and monitor whether the model's performance changes over time. For important decisions, they should also consider independent checks and human review.

Ultimately, Jev's probabilities should be treated as predictions rather than guarantees. Although Jev is designed to provide calibrated probabilities, individual decisions can still be wrong. Proper validation, monitoring, and safeguards are essential when using it in real-world applications.


6. Jev vs. Traditional LLMs: Which Should You Use?

Choosing between Jev and a traditional LLM depends on your application's requirements. These are some steps I'm following.

  1. Purpose of the Task: Jev is suitable for structured decisions, while traditional LLMs are better suited for tasks such as content generation and open-ended questions.
  2. Capabilities: Consider whether your task fits Jev's predefined question types or requires the flexibility of a traditional LLM.
  3. Expected Output: Use Jev when you need structured decisions and probabilities, or a traditional LLM when you need natural-language responses.
  4. Accuracy and Reliability: Evaluate both approaches using your own data. Remember that probabilities do not guarantee correct decisions, so important tasks may require additional verification.
  5. Performance and Cost: Compare response times and costs using your actual workload rather than assuming one approach is always faster or cheaper.

Jev introduces a decision-focused approach to AI by providing structured outputs and probabilities for predefined questions. It can be useful for tasks such as customer support automation, AI model routing, and implementing AI guardrails.

However, Jev also has limitations, and its predictions are not guaranteed to be correct. Developers should consider their application's requirements and use appropriate validation and safeguards.

Ultimately, Jev and traditional LLMs serve different purposes, and combining them can be an effective approach for building AI applications.

Part of the Jev Series series

View all parts