How to Build AI Decision Systems with Jev

Modern software increasingly needs AI to make decisions, not just generate text.

A customer-support system needs to decide which team should receive a ticket. An invoice-processing system needs to decide whether a document should be paid, held, or reviewed. An AI agent needs to decide which tool to call. A security system needs to decide whether an alert can be closed automatically or should be escalated.

Traditionally, developers have used large language models for these jobs by prompting them to produce text or JSON. That approach can work, but it creates an awkward interface between probabilistic intelligence and deterministic software: the application has to interpret generated output before it can safely act on it.

How to Build Fast, Probabilistic AI Decisions with TypeSafe

TypeSafe AI is taking a different approach with Jev, its first public System One model. Rather than generating prose, Jev evaluates structured questions against application state and returns typed decisions, probability distributions, and—on Choice and Score questions—confidence values. TypeSafe AI+1

The central idea is simple:

Put AI inside the decision-making layer of software rather than asking software to interpret an AI-generated essay.

This makes Jev particularly interesting for classification, routing, scoring, verification, guardrails, extraction, workflow automation, and other tasks where the answer ultimately needs to become a branch in code.

TypeSafe’s documentation describes three primitives:

  • Choice — select one option from a predefined set.
  • Score — rate something against ordered levels.
  • Noul — estimate the probability that a yes/no statement is true. TypeSafe AI

The other important concept is uncertainty. Jev does not simply return an answer and force the application to pretend that the answer is certain. Its responses expose probabilities, and Choice and Score responses also include confidence. This allows developers to build systems that automatically act on high-confidence cases while routing ambiguous cases elsewhere. TypeSafe AI

This guide answers 23 practical developer questions, moving from the basics to application architecture, AI agents, LLM combinations, evaluation, production monitoring, and threshold selection.


1. How do I use Jev?

The basic Jev workflow has three parts:

  1. Provide the state that the model should evaluate.
  2. Define one or more typed questions.
  3. Use the structured answers in your application code.

The state can be a string or structured data such as an object or array. The questions tell Jev what judgment to make about that state. The API returns one answer for every question. TypeSafe AI

Also check: Jev AI Beyond Email: 50 Practical Use Cases for Automating Everyday Software Decisions

For example, suppose your application receives this customer message:

My payment failed three times and I need to complete the purchase today.

You could ask:

{
  "state": "My payment failed three times and I need to complete the purchase today.",
  "model": "jev-latest",
  "questions": {
    "is_urgent": {
      "type": "noul",
      "instructions": "Does this message express urgency?"
    }
  }
}

The response contains a typed Noul value:

{
  "answers": {
    "is_urgent": {
      "type": "noul",
      "noul": 0.95
    }
  }
}

A Noul value ranges from 0 to 1, representing the probability that the statement is true. TypeSafe AI

The important mental model is that Jev isn’t being asked to “write an answer.” It is being asked to perform a narrowly defined judgment that your code can consume.

Real-world use case: customer support triage

A support platform could evaluate every incoming ticket for urgency, department, and frustration. The application can then route the ticket without asking an LLM to generate a classification sentence and subsequently parse that sentence.


2. How do I make my first Jev API call?

The documented HTTP endpoint is:

POST https://api.typesafe.ai/v1/systemone

Authentication uses a bearer API key. The request specifies the state, the model, and a map of questions. TypeSafe AI+1

A minimal cURL example is:

curl -X POST https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "My laptop was stolen yesterday.",
    "model": "jev-latest",
    "questions": {
      "is_security_incident": {
        "type": "noul",
        "instructions": "Does this describe a security incident?"
      }
    }
  }'

The API returns an answer under the same question ID.

TypeSafe also provides a playground where developers can paste state and experiment with Noul, Choice, and Score questions before integrating the API into an application. TypeSafe AI

Real-world use case: proof-of-concept classification

Before writing an integration, a developer building a security operations platform could paste sample alerts into the playground and test questions such as “Is this likely a genuine security incident?” This lets the team refine question wording and criteria before putting the workflow into production.


3. How do I create a Choice question?

Use a Choice question when the answer must be one option from a known set.

For example:

{
  "type": "choice",
  "instructions": "Which team should handle this customer request?",
  "criteria": {
    "billing": "Payment, subscription, or invoice issues",
    "technical": "Bugs, outages, or integration problems",
    "sales": "Pricing, upgrades, or new accounts"
  }
}

A Choice response contains:

  • choice — the selected option.
  • probabilities — the distribution across all options.
  • confidence — a summary of how concentrated that distribution is. TypeSafe AI+1

The documented API supports up to 255 options in a Choice question. TypeSafe AI

A useful design principle is to make the choices mutually meaningful. If an input could legitimately fall outside your list, TypeSafe recommends considering an other or none_of_the_above option. TypeSafe AI

Real-world use case: help-desk routing

An IT service desk receives thousands of tickets every day. Instead of asking an LLM to generate a department name, a Choice question can select among network, identity, hardware, software, and security, after which ordinary application code sends the ticket to the corresponding queue.


4. How do I create a Score question?

Use Score when the answer belongs on an ordered scale.

For example:

{
  "type": "score",
  "instructions": "How urgent is this customer request?",
  "criteria": [
    "Can wait",
    "Needs attention this week",
    "Needs attention today"
  ]
}

Score levels are ordered, and the response contains:

  • score
  • legend
  • probabilities
  • confidence

The API accepts between two and ten Score levels. TypeSafe AI

Unlike a Choice question, a Score represents a position on a spectrum. That distinction matters.

For example:

Choice:
refund / rebooking / information

is categorical.

Whereas:

low urgency / medium urgency / high urgency

is ordinal.

TypeSafe’s documentation also notes that a Score can produce a position between defined levels because it is probability-weighted across the levels. TypeSafe AI

Real-world use case: customer frustration

A customer-success application could score every conversation as:

0 = calm
1 = concerned
2 = frustrated
3 = highly frustrated
4 = extremely angry

The application could use that score alongside account value and issue severity to determine whether a customer-success manager should review the conversation.


5. How do I create a Noul question?

Noul is designed for a yes/no judgment where the probability itself is useful.

For example:

{
  "type": "noul",
  "instructions": "Does this message contain a request for a refund?"
}

The response looks like:

{
  "type": "noul",
  "noul": 0.91
}

A value close to 1 means Jev considers the statement likely true. A value close to 0 means likely false. Around 0.5 means uncertainty. Noul does not have a separate confidence field. TypeSafe AI+1

You can also clarify what “yes” and “no” mean with Noul criteria:

{
  "type": "noul",
  "instructions": "Does this document contain personally identifiable information?",
  "criteria": {
    "true": "It contains information that can identify a person.",
    "false": "It does not contain personally identifying information."
  }
}

Real-world use case: privacy screening

A document-management platform could use Noul to screen uploaded documents for potential personally identifiable information before sending them to another processing service.


6. How do I interpret Jev’s probability?

Probability and confidence should not be treated as interchangeable concepts.

For a Noul question, the noul value directly represents the probability that the yes/no statement is true.

For example:

noul = 0.92

means the model assigns a 92% probability to “yes” for that particular proposition.

For Choice, the response instead provides a probability distribution:

{
  "technical": 0.80,
  "billing": 0.15,
  "sales": 0.05
}

The selected Choice is the highest-probability option.

For Score, the probabilities describe the distribution over the ordered levels. TypeSafe AI+1

A key principle is to preserve these probabilities rather than immediately throwing them away.

Real-world use case: document classification

Suppose a document classifier returns:

invoice: 0.52
purchase_order: 0.45
contract: 0.03

Choosing invoice and discarding the distribution loses important information. The system knows that invoice is only narrowly ahead of purchase order. That uncertainty could be used to trigger review.


7. How do I set a confidence threshold?

For Choice and Score answers, Jev provides confidence, a value from 0 to 1 derived from the probability distribution. TypeSafe describes confidence as a convenient summary of how concentrated the distribution is. TypeSafe AI

A simple pattern is:

if answer.confidence >= threshold:
    execute_action(answer)
else:
    send_to_review(answer)

But there is no universal “correct” threshold.

A read-only operation might tolerate substantially more uncertainty than an irreversible operation.

For example:

if confidence < 0.5:
    route_to_human()
elif action == "approve_transfer" and confidence <= 0.9:
    ask_for_confirmation()
else:
    continue()

This reflects TypeSafe’s documented confidence-gated approach: high-confidence decisions can proceed automatically, medium-confidence decisions can receive additional verification, and low-confidence decisions can be routed away from autonomous execution. TypeSafe AI

Real-world use case: automated refunds

An e-commerce platform might automatically approve a low-value refund only when the relevant classification is highly confident. Ambiguous cases can be sent to a support agent instead of being automatically processed.


8. How do I handle uncertain Jev decisions?

Don’t treat uncertainty as an error.

Uncertainty is information.

A robust application can create three paths:

High confidence → automate
Medium confidence → verify
Low confidence → human or fallback

The exact boundaries should depend on the consequences of an incorrect action. TypeSafe specifically recommends starting conservatively, testing thresholds against your own data, and adjusting them based on observed performance. TypeSafe AI

You can also collect additional evidence before asking again.

For example:

Initial classification
        ↓
Confidence too low
        ↓
Fetch additional customer/order context
        ↓
Ask again
        ↓
High confidence → continue
Low confidence → human review

Real-world use case: fraud operations

A payment platform could use Jev to assess whether a transaction pattern looks suspicious. High-confidence cases might proceed through an automated workflow, while uncertain cases are sent to a fraud analyst with the model’s probability information attached.


9. How do I send multiple questions to Jev?

You can place multiple questions inside a single questions map.

For example:

{
  "state": {
    "message": "My account has been charged twice and I need this fixed today."
  },
  "model": "jev-latest",
  "questions": {
    "is_billing": {
      "type": "noul",
      "instructions": "Is this a billing issue?"
    },
    "intent": {
      "type": "choice",
      "instructions": "What does the customer primarily want?",
      "criteria": {
        "refund": "Money returned",
        "explanation": "An explanation of the charge",
        "technical_help": "Technical assistance"
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is the request?",
      "criteria": [
        "Can wait",
        "Needs attention soon",
        "Needs attention immediately"
      ]
    }
  }
}

Every question sees the same state, but the questions are evaluated independently. TypeSafe AI

Real-world use case: support triage

One request can simultaneously determine:

  • whether the ticket is billing-related,
  • what the customer wants,
  • how urgent it is,
  • how frustrated the customer appears.

The application can then combine those values using ordinary deterministic logic.


10. Can Jev answer multiple questions simultaneously?

Yes. This is one of the important architectural ideas behind Jev.

TypeSafe documents that multiple questions in a single request are evaluated in parallel and independently. Adding questions has little effect on response time compared with issuing separate calls, although additional questions still consume their associated tokens. TypeSafe AI

The docs describe this as a speculative fan-out pattern: ask several questions that the workflow might need and allow code to decide which results are relevant. TypeSafe AI+1

This is especially useful because you don’t necessarily need to predict which question will become relevant before making the API call.

Real-world use case: AI support agent

A support agent could ask about intent, urgency, sentiment, escalation requirements, refund eligibility, and account-risk indicators in one request. The application then chooses which signals matter for that particular ticket.


11. How do I integrate Jev into an existing application?

The cleanest integration is to treat Jev as a decision service inside your existing application, rather than rebuilding your application around AI.

A useful architecture is:

Application state
       ↓
Jev questions
       ↓
Typed answers + probabilities
       ↓
Business logic
       ↓
Action / review / fallback

Your existing application remains responsible for deterministic business rules.

Jev handles the parts that are difficult to express with conventional rules but can be framed as focused judgments.

For example:

if order_total < 20:
    approve_using_existing_rule()
else:
    evaluate_with_jev()

This hybrid approach is important because TypeSafe’s documentation explicitly recommends keeping complex workflow composition in code while using System One for atomic judgments. TypeSafe AI+1

Real-world use case: invoice automation

An accounts-payable system might use ordinary code for:

  • checking whether an invoice number already exists,
  • verifying arithmetic,
  • comparing currency codes,
  • checking required fields.

Jev could handle judgments such as:

  • whether the invoice appears to correspond to the purchase order,
  • whether the description matches the goods received,
  • whether an exception requires human review.

12. How do I use Jev with Python?

TypeSafe provides a Python SDK called typesafe-sdk. The current documentation says it requires Python 3.10 or newer. You can install it with either pip or uv. TypeSafe AI+1

With pip:

pip install typesafe-sdk

Or:

uv add typesafe-sdk

Set your API key:

export TYPESAFE_API_KEY="your-key"

Then:

from typesafe_sdk import Choice, Noul, Score, TypeSafeClient

client = TypeSafeClient()

response = client.system_one(
    state={
        "ticket": "My account was charged twice. Please fix this ASAP."
    },
    questions={
        "billing": Noul(
            instructions="Is this ticket about billing?"
        ),
        "tone": Choice(
            instructions="What is the customer's tone?",
            criteria={
                "calm": None,
                "frustrated": None,
                "angry": None,
            },
        ),
        "urgency": Score(
            instructions="How urgent is this ticket?",
            criteria=[
                "Can wait",
                "Needs attention this week",
                "Needs attention today",
            ],
        ),
    },
)

print(response.answers["billing"].noul)
print(response.answers["tone"].choice)
print(response.answers["urgency"].score)

The SDK also provides an asynchronous client, AsyncTypeSafeClient. TypeSafe AI

Real-world use case: Python data pipeline

A Python data-processing service could evaluate thousands of customer records or documents, classify them with Choice questions, score relevant attributes, and store the structured results in a database for downstream analytics.


13. How do I use Jev with JavaScript?

The official JavaScript SDK is installed with:

npm install @typesafe-ai/sdk

The current SDK documentation specifies Node.js 20 or newer. TypeSafe AI

A basic JavaScript example:

import { choice, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

const response = await client.systemOne({
  state: {
    document: "I was charged twice. Please fix this ASAP."
  },
  questions: {
    category: choice("What is this ticket about?", {
      billing: null,
      technical: null,
      other: null
    })
  }
});

console.log(response.answers.category.choice);

The SDK supports ESM, CommonJS, and TypeScript declarations. TypeSafe AI

Real-world use case: customer-support backend

A JavaScript-based support backend can receive a ticket, send it to Jev for intent classification, and immediately route the request to a specialized handler without converting an LLM’s prose into a category.


14. How do I use Jev with TypeScript?

TypeScript is particularly useful for this kind of API because the entire concept is based around typed questions and typed answers.

The official JavaScript package includes TypeScript declarations, and the SDK infers answer types from the questions you provide. TypeSafe AI

For example:

import {
  choice,
  noul,
  score,
  TypeSafeClient
} from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

const response = await client.systemOne({
  state: {
    message: "The customer says the payment failed again."
  },
  questions: {
    category: choice("What is this request about?", {
      billing: null,
      technical: null,
      other: null
    }),

    urgent: noul(
      "Does the customer express urgency?"
    ),

    severity: score(
      "How severe is the issue?",
      [
        "Minor",
        "Moderate",
        "Severe"
      ]
    )
  }
});

console.log(response.answers.category.choice);
console.log(response.answers.urgent.noul);
console.log(response.answers.severity.score);

The exact benefit is not merely editor autocomplete. Your application can keep the model’s output aligned with the set of values your code expects.

Real-world use case: typed workflow orchestration

Imagine a SaaS application where a ticket can be routed only to billing, technical, or sales. TypeScript can make the downstream handler mapping explicit, reducing the chance that a model-generated string silently creates an unsupported branch.


15. How do I use Jev with Node.js?

The current JavaScript SDK targets Node.js 20 or newer. TypeSafe AI

A Node.js service might expose an endpoint like:

import express from "express";
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";

const app = express();

app.use(express.json());

const client = new TypeSafeClient();

app.post("/classify", async (req, res) => {
  const response = await client.systemOne({
    state: req.body.ticket,
    questions: {
      department: choice("Which team should handle this?", {
        billing: null,
        technical: null,
        sales: null
      })
    }
  });

  res.json(response.answers.department);
});

app.listen(3000);

In production, you would also add authentication, error handling, timeouts, logging, request validation, and appropriate retry behavior.

Real-world use case: API gateway routing

A Node.js API gateway could use Jev to determine whether an incoming natural-language request belongs to billing, account management, technical support, or a specialized workflow, then route the request to the appropriate service.


16. How do I use Jev with Vercel?

A natural Vercel architecture is to place Jev calls in server-side functions, keeping the API key away from the browser.

The JavaScript SDK is designed for Node.js 20 or newer, so a Vercel application should use a compatible server-side runtime configuration. TypeSafe AI

Conceptually:

Browser
   ↓
Vercel server function
   ↓
TypeSafe SDK
   ↓
Jev
   ↓
Typed decision
   ↓
Vercel function
   ↓
Browser

Do not put the TypeSafe API key into client-side JavaScript.

A server function can perform the evaluation:

import { TypeSafeClient, choice } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

export async function POST(request) {
  const body = await request.json();

  const response = await client.systemOne({
    state: body.message,
    questions: {
      intent: choice("What does the user want?", {
        refund: null,
        support: null,
        information: null
      })
    }
  });

  return Response.json(response.answers.intent);
}

Real-world use case: AI-powered SaaS dashboard

A SaaS product hosted on Vercel could let users submit natural-language requests. The Vercel backend evaluates intent with Jev, then dispatches the request to an existing API without exposing the TypeSafe credentials to the browser.


17. How do I use Jev with an AI agent?

Agents are a particularly interesting application because agents continuously make decisions.

An agent might need to decide:

Should I call a tool?
Which tool?
Which argument category applies?
Should I ask the user?
Should I escalate?
Is the current result safe to use?

Jev can serve as a structured decision layer around those choices.

TypeSafe also provides an agent skill designed for coding-agent environments, and its documentation describes Jev-based patterns for agent workflows such as skill selection. TypeSafe AI+1

A useful architecture is:

User
 ↓
LLM agent
 ↓
Candidate action
 ↓
Jev verification
 ↓
Code-controlled action

The LLM can remain responsible for flexible reasoning and natural-language interaction, while Jev provides focused decisions that the surrounding program can gate.

Real-world use case: coding agent

A coding agent might generate a proposed tool call. Before executing it, a Jev question could classify whether the action is read-only, reversible, or potentially destructive. The application could require confirmation for the latter categories.


18. How do I combine Jev with an LLM?

Jev and an LLM do not have to compete.

They can perform different jobs.

An LLM is well suited to generating language, summarizing information, writing code, explaining concepts, and performing open-ended reasoning.

Jev is designed around structured decisions that software can directly consume. TypeSafe specifically positions System One models as complementary to systems where ordinary LLMs generate strings for humans. TypeSafe AI+1

A useful architecture is:

                ┌──→ LLM → generate response
User → State ───┤
                └──→ Jev → classify / score / verify
                         ↓
                    Code decides

For example, an LLM could draft a customer response while Jev checks:

Is the response relevant?
Does it violate a policy?
Does it contain a prohibited claim?
Does it require human review?

TypeSafe’s published cookbook collection includes patterns for LLM guardrails, citation checking, and RAG-passage classification. TypeSafe AI

Real-world use case: RAG application

A retrieval-augmented generation system could ask Jev to score retrieved passages for relevance or potential prompt injection before passing selected content to the generation model.


19. How do I build a human-in-the-loop system with Jev?

The simplest approach is to treat confidence as a routing signal.

For example:

                    Jev
                     ↓
              ┌──────┴──────┐
              ↓             ↓
        High confidence   Low confidence
              ↓             ↓
        Automated path   Human review

You can add a middle path:

High → execute
Medium → ask user / verify
Low → human

TypeSafe explicitly describes this confidence-gated routing model. It recommends choosing thresholds according to the consequences of incorrect actions rather than treating confidence as a universal cutoff. TypeSafe AI

A human review interface should ideally show:

  • the original state,
  • the question,
  • Jev’s selected answer,
  • probability distribution,
  • confidence where available,
  • the proposed action,
  • the reason the workflow was escalated.

Real-world use case: insurance claims

An insurance workflow could automatically process straightforward claims while routing uncertain cases to an adjuster. The reviewer sees both the model’s proposed classification and the uncertainty that caused the escalation.


20. How do I evaluate Jev accuracy?

Start by defining what “correct” means for each question.

Don’t evaluate an entire workflow as one opaque score if the workflow actually contains multiple judgments.

For example, an invoice workflow might contain:

Question 1: Is this an invoice?
Question 2: Does it match the purchase order?
Question 3: Is there an anomaly?
Question 4: Does it require review?

Build a labeled evaluation dataset for each question.

Then measure metrics appropriate to the question:

  • Accuracy for categorical decisions.
  • Precision and recall when false positives and false negatives have different costs.
  • Calibration for probability estimates.
  • Agreement with expert reviewers.
  • Human-review rate at different thresholds.
  • End-to-end business outcomes.

TypeSafe’s workflow evaluation methodology similarly emphasizes decomposing tasks into programmatic rules and atomic intelligent judgments rather than relying exclusively on a single large prompt. Evals

The published evaluation site describes example workflows including security incidents, agent-trace observability, invoice processing, and customer service. Evals

Real-world use case: security alert triage

Build a historical dataset of alerts labeled by analysts. Run Jev against the same alerts, record probabilities and decisions, and measure how many alerts could be automatically closed at different confidence thresholds while tracking missed incidents.


21. How do I monitor Jev decisions in production?

Production monitoring should cover more than latency.

At minimum, capture:

timestamp
model version
question ID
input/state identifier
selected answer
probabilities
confidence
action taken
human override
final outcome
latency
token usage
errors

Be careful about logging sensitive state. In many applications, you should store a reference to the source record rather than duplicating private customer content.

The API response includes the model identifier and token usage, which can support operational and cost monitoring. TypeSafe AI

Monitor at least four dimensions:

Decision quality

Track human corrections and downstream outcomes.

Confidence behavior

Look for cases where high-confidence decisions are frequently overridden.

Distribution drift

If the percentage of billing, technical, and sales classifications changes dramatically, investigate whether the underlying traffic changed.

Operational performance

Monitor latency, failures, retries, and token usage.

Real-world use case: enterprise customer support

A support company could build a weekly dashboard showing Jev’s routing distribution, escalation rate, human overrides, average confidence, and downstream ticket resolution. A sudden increase in overrides could trigger an investigation into changed customer language or a changed workflow.


22. How do I choose a Jev threshold?

Threshold selection should be treated as a business-risk problem, not a magic AI number.

Suppose an automated action has two possible errors:

False positive → action happens when it shouldn't
False negative → action doesn't happen when it should

The costs may be very different.

A read-only action might have a low cost of error.

A financial transfer, account deletion, security containment, or legal workflow might have a much higher cost.

Therefore:

low-risk action
→ lower operational barrier may be acceptable

high-risk action
→ stronger confidence + additional verification

TypeSafe’s confidence documentation explicitly says thresholds scale with risk and recommends testing conservative thresholds on your own data. TypeSafe AI

A practical process is:

  1. Collect representative historical examples.
  2. Obtain trusted labels or outcomes.
  3. Run Jev and record probabilities/confidence.
  4. Calculate performance at several candidate thresholds.
  5. Estimate the operational cost of errors and reviews.
  6. Select thresholds separately for different actions.
  7. Continue monitoring after deployment.

Do not assume that 0.90 is inherently safe or that 0.70 is inherently unsafe.

Real-world use case: account security

A security platform might use one threshold for automatically categorizing an alert and a much stricter threshold for automatically containing a machine. Both decisions use the same model, but their consequences are different, so the workflow can legitimately use different confidence requirements.


Putting It All Together: A Practical Jev Architecture

The most important lesson from Jev is not a particular API call. It is a different way of designing AI-powered software.

Instead of:

Huge prompt
    ↓
LLM
    ↓
Large textual answer
    ↓
Parser
    ↓
Business logic

a Jev-oriented workflow can look like:

Application state
        ↓
Atomic Jev questions
        ↓
Typed decisions + probabilities
        ↓
Deterministic code
        ↓
Business action

For complex systems, several questions can be composed:

                     ┌── Noul: Is this urgent?
                     │
Incoming state ──────┼── Choice: What is the intent?
                     │
                     ├── Score: How severe?
                     │
                     └── Noul: Does it require review?
                              ↓
                       Application logic
                              ↓
                  ┌───────────┼───────────┐
                  ↓           ↓           ↓
                Act        Verify       Human

This architecture aligns closely with TypeSafe’s documented philosophy of atomic questions composed in code. Rather than asking one model to make a complicated end-to-end judgment, developers can break that judgment into smaller dimensions and decide how those dimensions should interact. TypeSafe AI+1

For example, instead of asking:

"Should we prioritize this support ticket?"

ask:

How severe is the issue?
How frustrated is the customer?
How urgent is the request?
Does the customer have an important business deadline?
Does the request require specialist intervention?

Then your code can define the business policy:

priority = (
    severity.score * 0.35
    + frustration.score * 0.20
    + urgency.score * 0.30
    + specialist_need * 0.15
)

The exact formula belongs to your application, not to the model.

That separation has an important engineering advantage: policy can change without changing the AI question itself.


Jev and the “Smart If-Statement”

One useful way to understand Jev is as a probabilistic extension of ordinary application logic.

Traditional code might say:

if customer.is_enterprise:
    priority = "high"

But many real-world conditions cannot be represented accurately with a simple boolean:

if customer_message_is_urgent:
    ...

Urgency is often expressed indirectly.

Jev allows the application to ask:

Does this message express urgency?

and receive a probability.

The resulting architecture becomes:

if urgency_probability > threshold:
    prioritize_ticket()

The intelligence is inside the evaluation.

The policy remains in the code.

This distinction is central to building maintainable AI systems.


Why Decomposition Matters

A common mistake when building AI automation is creating one enormous prompt.

For example:

Read this customer conversation, understand the customer's problem,
determine their sentiment, check our refund policy, decide whether
they qualify, determine whether the issue is urgent, choose the right
department, and decide what action the business should take.

That may be possible with a sufficiently capable LLM, but it combines many independent judgments into one opaque decision.

Jev’s design encourages a different structure:

Noul → Is the customer requesting a refund?

Choice → What is the customer's primary intent?

Score → How frustrated is the customer?

Noul → Does the policy permit the requested refund?

Choice → Which team should handle the request?

Then code combines the answers.

TypeSafe‘s documentation explicitly recommends this atomic-question approach and describes composite scoring as a pattern for combining several independent Score judgments. TypeSafe AI+1


When Should You Use Jev Instead of an LLM?

Jev is particularly relevant when the output needs to become a structured decision inside software.

Examples include:

  • classification,
  • routing,
  • scoring,
  • verification,
  • guardrails,
  • ranking,
  • extraction,
  • moderation,
  • risk assessment,
  • workflow branching,
  • agent action selection.

An ordinary LLM remains valuable when you need:

  • long-form writing,
  • conversational responses,
  • code generation,
  • summarization,
  • creative generation,
  • open-ended reasoning,
  • explanations for humans.

In many production systems, the answer may be both.

An LLM can generate.

Jev can evaluate.

Code can decide.

That division of responsibility is often cleaner than asking a single model to perform every function.


The Most Important Production Principle: Keep Code in Control

The strongest architectural idea behind TypeSafe’s documentation is that AI should not automatically own the entire workflow.

Jev makes a judgment.

Your application determines what that judgment means operationally.

For example:

if answer.choice == "refund":
    if answer.confidence >= REFUND_THRESHOLD:
        process_refund()
    else:
        request_human_review()

The model does not get to redefine your business rules.

Similarly:

if security_score >= CONTAINMENT_THRESHOLD:
    require_secondary_verification()

The application controls the consequence.

This separation makes the AI component easier to test, monitor, replace, and audit.


Final Takeaway

Jev represents an interesting shift in how developers can think about AI APIs.

Instead of treating AI as a text-generation endpoint, TypeSafe positions Jev as a machine-facing decision primitive.

You give it state.

You define a typed question.

It returns a structured answer.

For Choice, you get an option, probabilities, and confidence.

For Score, you get a score, probability distribution, legend, and confidence.

For Noul, you get a probability from 0 to 1 representing how likely the statement is to be true. TypeSafe AI+1

The resulting architecture can be remarkably straightforward:

State
  ↓
Question
  ↓
Jev
  ↓
Probability / typed result
  ↓
Code
  ↓
Action or human review

And when the workflow becomes more sophisticated:

                    ┌── Choice
                    ├── Score
Application state ──┼── Noul
                    └── more questions
                           ↓
                  Probabilistic signals
                           ↓
                    Business logic
                           ↓
               ┌───────────┼───────────┐
               ↓           ↓           ↓
             Act         Verify      Escalate

That is the fundamental idea developers should take away.

Don’t ask AI to own your application logic. Give AI narrowly defined judgments, preserve its uncertainty, and let ordinary software compose those judgments into reliable workflows.

TypeSafe’s current documentation provides the building blocks for exactly this approach: the three primitives, confidence-aware routing, speculative fan-out, composite scoring, intent routing, SDKs, and HTTP API access. TypeSafe AI+3

For developers exploring Jev today, the practical path is straightforward:

  1. Start with a single narrow judgment.
  2. Choose Noul, Choice, or Score based on the shape of the answer.
  3. Test the question against representative examples.
  4. Preserve probabilities and confidence rather than reducing everything to a hard label.
  5. Add deterministic business rules around the model.
  6. Batch independent questions into one request.
  7. Introduce human review for uncertain or high-risk decisions.
  8. Measure accuracy and calibration on your own data.
  9. Monitor decisions and overrides in production.
  10. Adjust thresholds according to the actual cost of errors.

The broader promise of this architecture is not that AI eliminates software engineering. It is almost the opposite.

AI supplies the judgment. Software supplies the control.

That division can make AI automation easier to reason about, easier to test, and easier to integrate into the systems developers already know how to build.

Leave a Comment