Lesson 01 · TypeSafe Jev — System One models

The mental model

The docs confuse people because they lead with philosophy. Let's do the opposite: one clear picture of what Jev is, what it hands back, and — most important for you — a simple test for spotting the problems it's actually built for. No code yet; just the shape.

~7 min Knowledge Goal: recognise a "Jev-shaped problem" in your own projects
The one sentence Jev is a model that takes your app's state plus one or more typed questions and returns machine-readable decisions — a choice, a score, or a yes/no — each with probabilities and a confidence, so your code can act immediately with nothing to parse.

1. The mismatch it removes

When you use a normal LLM to make a decision inside code, you're bending a text-generation tool into a decision tool. TypeSafe calls this the core mismatch: "you are coercing a text-generation system into outputting structured decisions, then parsing the results back into something your code can depend on." [TypeSafe: Introduction]

✗ LLM as a decision-maker

  • Ask in a prompt, hope it answers in JSON
  • Parse free text; handle when it drifts
  • No real probabilities — just vibes
  • Slower & pricier: it writes prose too
  • Retries, schema validators, regex bandaids

✓ Jev as a decision-maker

  • Ask a typed question; get a typed answer
  • Nothing to parse — it's already structured
  • Calibrated probabilities + a confidence
  • Fast & cheap: no tokens spent on prose
  • Deterministic shape your code can trust
The name to remember — "System One" TypeSafe borrows from Kahneman: System 1 = fast, automatic judgement; System 2 = slow, deliberate reasoning. A chat LLM is System 2 (it "thinks out loud" in text). Jev is a System One model: "built to make fast, structured decisions that software can use directly." Reach for it when you need a snap judgement in code, not an essay. [Introduction]

2. The three primitives

Every question you ask Jev is one of three types. That's the entire vocabulary — learn these three and you know the product. Each takes your instructions + criteria and returns a different shape of answer. [docs.typesafe.ai]

PrimitiveThe question it asksWhat comes back
Choice "Which one of these options?"
— pick from a fixed set
choice (the winner) + probabilities over every option + a confidence
Score "How much, on this rubric?"
— rate against ordered levels
score + probabilities per level + a confidence
Noul "Is this statement true?"
— a binary judgement
a single probability from 0–1 (no separate confidence)
Mental hooks Choice = a labelled switch statement.   Score = a graded slider (urgency 1–5, quality 1–10).   Noul = a probabilistic if — "is X the case?" as a number, not a hard boolean.

3. Anatomy of one call

A request is just state (everything a panel of experts would need to judge) and a questions object. Here's a support ticket being routed — our running example:

POST https://api.typesafe.ai/v1/systemone
Authorization: Bearer $TYPESAFE_API_KEY

{
  "model": "jev-latest",
  "state": "Help! My payouts have been failing for 3 days.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "billing":   "Payments, invoicing, refunds",
        "technical": "Bugs, outages, integrations",
        "sales":     "Pricing, upgrades, new accounts"
      }
    }
  }
}

And the answer — already the shape your code wants:

{
  "model": "jev-1.13.0",
  "answers": {
    "department": {
      "type": "choice",
      "choice": "technical",
      "probabilities": { "billing": 0.08, "technical": 0.85, "sales": 0.07 },
      "confidence": 0.82
    }
  },
  "usage": { "input_tokens": 312, "output_tokens": 48 }
}

Wire format per the LiteTLM/TypeSafe pass-through reference. [LiteLLM: TypeSafe]

The superpower — many questions, one call, one price of latency questions is a map. Add priority (a Score) and is_angry (a Noul) beside department and they all evaluate in parallel against the same state. TypeSafe: "adding questions typically adds very little latency, although additional question text still contributes token cost." One round trip, a whole dashboard of decisions. [docs]

4. Reading the answer like an engineer

Don't just take choice. The probabilities and confidence are the point — they let your code decide how much to trust the call:

technical0.85
billing0.08
sales0.07

A clean winner at 0.85 with confidence 0.82 → auto-route. But if the top two were 0.44 / 0.41, your code can choose to send it to a human instead. That threshold is your logic, not the model's — which is exactly the control the parsing-a-paragraph approach never gave you.

The rule that makes Jev reliable — decompose, don't ask it to reason Break a hard problem into small, atomic questions and combine the answers in your own code. Don't ask one giant "figure out what to do" question. Ask "which team", "how urgent", "is the user angry" — then you write the if. The model judges; your app decides.

5. Is it a "Jev-shaped problem"? — your decision test

This is the part that answers your real question — where would I use this? Run any task through these four checks. The more yes-es, the more it's Jev's job rather than a chat LLM's:

  1. Does code consume the answer, not a human? If the output feeds an if/router/queue — yes. If a person reads it — no, that's a chat LLM.
  2. Is the answer space small and known? A fixed set of teams, a 1–5 score, a true/false. If it needs open-ended prose, it's not a primitive.
  3. Do you want probabilities / a confidence to gate on? "Auto-act above 0.8, else escalate" is a Jev pattern.
  4. Is it high-volume or latency-sensitive? Routing, moderation, prioritising every incoming item — where fast + cheap + repeated beats eloquent.
When NOT to use it Anything whose output is words for a person: writing replies, summaries, explanations, chatbots. Jev doesn't generate text — that's the whole design. Pair them instead: Jev decides whether/where, an LLM writes the reply.

Check yourself

Retrieval, not recognition — answer before you reveal. The effort is what makes it stick.

Q1. What does Jev hand back for a question?

Q2. The three primitives are:

Q3. Ten questions in one call, versus ten separate calls:

Q4. Which of these is the Jev-shaped task?

I'm your teacher — ask me anything. Good next questions: "Walk me through calling this from TypeScript", "What's a real confidence-threshold pattern?", or "Give me three Jev-shaped problems in a product like mine."

Primary source to read next: TypeSafe — Introduction (now that you have the map, the "System One vs text" framing will click).

Reference: Glossary & primitives cheat-sheet · Next: Lesson 02 — the first real call in TypeScript (ask me to build it).