ব্লগে ফিরে যান

Jev / System One Model in Practice: Turn a Language Model into a Decision Function

Developer Tools2026-09-1916 মিনিট পড়ুনJevSystem One ModelTypeSafe AIAI SDKmodel routingAgent engineeringstructured output

Language models are good at generating text, but software often needs one decision: which queue should receive this ticket, whether content needs human review, which model to call next, or whether a response can be sent.

TypeSafe AI's Jev takes a different approach. Given state and a set of declared questions, it returns typed answers with probabilities and confidence instead of generating an explanation that the application must parse back into JSON.

This article summarizes 01Coder's video, “Jev in Practice: The Basic Mechanics of This Fast Decision Model”, together with public TypeSafe and Vercel material. Video observations, official benchmarks, and engineering recommendations are different kinds of evidence. Official numbers should not be treated as a guarantee for every workload.

Where Jev Fits

Jev does not write the final answer and does not replace a general language model. It sits between state and application code:

state
  → declare several questions
  → Jev evaluates them in parallel
  → Choice / Score / Boolean + probabilities
  → application routing, action, or human review

Jev workflow: state, parallel questions, typed decisions, and code branches

System One Is Not “A Model That Cannot Chat”

The video uses Daniel Kahneman's System One and System Two as an analogy. Conventional language models generate text token by token; Jev targets high-volume internal decisions with a constrained output space.

Typical examples include:

  • routing a ticket to billing, technical, or account;
  • classifying sentiment;
  • detecting spam;
  • choosing a cheaper or stronger model; and
  • checking whether an LLM response leaks internal policy.

The important idea is not that Jev replaces reasoning. It is that the application declares the legal answer space before the model evaluates the state.

Choice, Score, and Boolean

Choice

Use Choice when the answer is one item from a finite set:

Question: Which queue should receive this ticket?
Options: account / billing / technical / other
Answer: billing
Additional data: probability distribution over the options

Score

Use Score for an ordered scale such as severity, urgency, or risk. Define the scale first instead of asking the model to invent an arbitrary number. Probabilities can show when a result is close to a boundary.

Boolean

Use Boolean for a proposition such as “Has support already issued a refund?” The result is true or false with a probability estimate.

A high probability is not proof of a business fact. Refunds, deletions, permission changes, and other side effects still require deterministic rules, authoritative data, and approval boundaries.

The Main Change: Evaluate Independent Questions Together

Instead of asking one question, waiting, then asking the next, declare independent questions over the same state:

same state
  ├─ category: Choice
  ├─ severity: Score
  ├─ reproducible: Boolean
  ├─ refund_requested: Boolean
  └─ sentiment: Score

The application then consumes only the fields relevant to the current route. This separates semantic judgment from business dependencies: the model proposes typed signals, while code decides which fields are valid, what happens next, and when to escalate.

Five Useful Playground Patterns

  1. One Boolean question. Use a support record to estimate whether a refund was issued, then treat the probability as an uncertainty signal rather than proof.
  2. Parallel ticket triage. Evaluate category, severity, reproducibility, refund request, and sentiment together; route low-confidence or contradictory cases to humans.
  3. Model routing. Choose a light model for typo correction and a stronger model for complex code or query optimization. Measure routing latency inside the full request path.
  4. Content moderation. Pass a structured object containing author, time, text, history, and reports; classify spam and offensiveness, then let policy code decide allow, review, or delete.
  5. LLM output validation. Let an LLM draft a support reply, then use Jev to check quality, policy leakage, and tone before sending, rewriting, or escalating.

Typed output guarantees an interface shape, not correctness. An incomplete option set can still force a bad answer, so question design is part of the system.

How to Read Official Numbers

Speed, cost, and accuracy depend on state length, question count, independence, network path, retry behavior, reference labels, and calibration. Compare like with like: a structured decision benchmark is not an open-ended writing benchmark.

Use your own labeled samples to calibrate thresholds. Record predictions, probabilities, correctness, and human takeovers across real cases before allowing a probability threshold to trigger an action.

When to Use It

Jev fits classification, routing, scoring, validation, and branching when the answer space is defined, multiple questions can be evaluated together, and uncertain results can be escalated.

It is not a direct replacement for explanation, long-form writing, code generation, open-ended exploration, or workflows that cannot tolerate probabilistic errors without review and rollback.

Minimal AI SDK Shape

The public Vercel example uses an experimental evaluate interface. This is an illustrative structure, not a claim that every project or current SDK version accepts it unchanged:

import { experimental_evaluate as evaluate } from 'ai'

const result = await evaluate({
  model: 'typesafe-ai/jev',
  state: {
    message: 'The support agent issued a full refund to the customer.',
    channel: 'email',
  },
  questions: {
    refunded: {
      type: 'boolean',
      instructions: 'Was a refund issued?',
    },
    queue: {
      type: 'choice',
      options: ['account', 'billing', 'technical'],
      instructions: 'Which support queue should receive this case?',
    },
  },
})

console.log(result.answers)

Summary

Jev is most useful as a typed decision layer around a broader application: it can produce parallel signals quickly, while code, data sources, permissions, and humans retain responsibility for consequential actions.

Check the current TypeSafe AI documentation and Vercel AI documentation for live model IDs, interfaces, pricing, retention, and availability before implementation.