Stop Forcing Poets to Return Booleans: Why TypeSafe AIâs Jev and System One Architecture Change Everything
TL;DR: For the past three years, enterprise architects have been burning $15 per million tokens and waiting 4 to 8 seconds of autoregressive GPU time just to force chat-tuned Large Language Models to return a boolean or pick an enum from a list. With the emergence of TypeSafe AI and its flagship System One model, Jev (
jev-1.13.0)âbuilt by RLHF co-creator Diogo Almeida using Reinforcement Learning for Calibrated Decisions (RLCD)âwe finally have machine-native decision primitives (Choice,Score, andNoul) that evaluate state in a single 114-millisecond parallel pass at $42 per billion input tokens. Here is my architectural breakdown of why dual-process cognitive routing (System 1 Jev + System 2 Gemini 3.1 Pro) is the new production standard.
Every few months in software engineering, a release drops that forces you to stop, look at the microservice topology diagram on your whiteboard, and admit that we have all been doing something quietly absurd.
This week, that moment hit me while watching Sam Witteveen's technical breakdown, "Jev - The Ultimate Classification Model?", and digging into the technical specifications of TypeSafe AI's System One documentation. Across YouTube, X, and architecture Slack channels, principal engineers are having the exact same reactionânot because someone built yet another 2-trillion-parameter chatbot that writes slightly better haikus, but because someone finally built the anti-chatbot.
Wait until you appreciate the irony of who built it.
TypeSafe AI, which emerged from stealth in September 2026 with $40M in seed funding, was co-founded by Diogo Almeida alongside Erik Gafni and Sasha Sheng. If Almeidaâs name rings a bell to those of us who follow foundational ML papers, it should: at OpenAI, he was one of the original researchers who co-invented RLHF (Reinforcement Learning from Human Feedback) and InstructGPTâthe exact alignment breakthrough that turned raw pre-trained transformers into ChatGPT and launched the conversational AI era.
And now, in 2026, the co-creator of RLHF has stepped forward with a blunt architectural confession on the TypeSafe AI Manifesto: when it comes to building reliable software automation, we took the wrong research direction.
1. The Architectural Absurdity: Coercing a Poet into an if Statement
Look closely at the anatomy of a typical production enterprise AI architecture in 2026. When we inspect modern backend codebases running dozens of LLM-powered microservices, the vast majority of those services are not generating human-facing prose at all.
Instead, they are executing deterministic control-flow tasks:
- Reading an incoming customer support ticket or webhook payload and deciding which queue (
billing,technical,fraud,sales) should handle it. - Checking whether a user prompt or RAG document chunk violates 10 compliance, PII, or prompt-injection guardrails (
trueorfalse). - Grading a sales lead, an insurance claim, or a pull request diff against a 4-level severity rubric (
0to3).
Look closely at what we have been doing to execute those tasks. We take a massive, autoregressive System Two reasoning modelâa model trained via RLHF to converse with humans token-by-tokenâand we wrap it in a 600-word system prompt that begs: "You are a strict JSON classifier. Do NOT output markdown fences. Do NOT explain your reasoning. Return ONLY a JSON object matching this Pydantic schema."
Why has this always felt like hitching a Formula 1 engine to a lawnmower? Because it suffers from four fundamental architectural defects that no amount of prompt engineering can cure:
- RLHF Destroys Probability Calibration (Overconfidence & Mode Dropping):
RLHF rewards models for producing answers that human raters find persuasive and confident. As a direct mathematical side effect, RLHF causes mode collapse and destroys probability calibration. If you ask an RLHF-tuned chat LLM to output a
"confidence"float between0.0and1.0, it will routinely output0.95or0.99even when it is completely guessing. You cannot build deterministic confidence-gated branching in Python or Go if the model's confidence score is a hallucinated string rather than a true calibrated probability distribution. - Autoregressive Tail Latency (
8.5svs.114ms): Even when you use constrained decoding (response_schemain Vertex AI or Structured Outputs), an autoregressive LLM still generates JSON syntax character by characterâ{,",u,r,g,e,n,t,",:,,t,r,u,e,}âand often burns 1,500 hidden thinking tokens before emitting the first brace. On complex multi-question evaluation workflows, TypeSafe AI's production benchmarks show traditional LLM workflows taking 8.566 seconds, whereas a non-autoregressive parallel pass completes in 0.114 seconds (114ms)âa 193.6x speedup. - Context Rot When Asking Multiple Questions: If you stuff 15 distinct rubric and guardrail questions into a single LLM prompt to save network round-trips, the model suffers from context rot and cross-question contamination: its answer to Question #1 interferes with its attention distribution on Question #12.
- FinOps Token Bleed ($15/1M vs. $42/1B Tokens): Using a frontier conversational LLM for high-frequency routing, log triage, and guardrail checks at 50 million requests per month quietly drains hundreds of thousands of dollars in cloud budget for zero generative value.
2. Enter System One & RLCD: Decisions, Not Strings
In his landmark book Thinking, Fast and Slow, Nobel laureate Daniel Kahneman divided cognition into two distinct modes:
- System 1: Fast, automatic, parallel, intuitive, and bounded pattern recognitionâthe gut-check judgment an experienced domain expert makes in 100 milliseconds (
Is this customer angry?,Is this transaction anomalous?). - System 2: Slow, effortful, sequential, deliberative reasoningâwriting a 2,000-word architectural RFC, synthesizing multi-step code patches, or proving a mathematical theorem.
For the last four years, the AI industry poured 99% of its capital into scaling System 2 (RLHF for chat models like GPT and Claude, followed by RLVRâReinforcement Learning with Verifiable Rewardsâfor slow chain-of-thought reasoning models). Meanwhile, software engineers desperately needed a machine-native System 1.
That is what TypeSafe AI built with Jev (jev-1.13.0).
Instead of RLHF, TypeSafe AI trained Jev using a new paradigm called RLCD (Reinforcement Learning for Calibrated Decisions). Jev does not generate prose, cannot chat, and does not emit tokens one by one. You send an arbitrary state (an unstructured support ticket, a JSON log event, a code diff, or a financial transcript) along with a dictionary of typed questions, and Jev evaluates every single question in parallel and in isolation in a single forward pass.
flowchart TD
subgraph ClientApp["Enterprise Microservice / Event Pipeline"]
Req["Incoming State Payload<br/>(Ticket, Log, Diff, or User Prompt)"]
end
subgraph SystemOne["TypeSafe AI Jev â System One Parallel Gate (114ms @ $42/1B Tokens)"]
direction LR
P1["Noul Primitive (0..1)<br/>is_prompt_injection: 0.02<br/>is_urgent: 0.98"]
P2["Choice Primitive<br/>department: 'technical'<br/>confidence: 0.89"]
P3["Score Primitive<br/>frustration: 2.0 (High)<br/>confidence: 0.94"]
end
subgraph RouterLogic["Deterministic Code Branching (Python / TypeScript)"]
Gate{"Confidence >= 0.80<br/>& Safe Noul Gate?"}
FastPath["Fast-Path Execution (85% Traffic)<br/>Direct DB / Queue Dispatch<br/>Zero LLM Token Spend"]
end
subgraph SystemTwo["Google Cloud Vertex AI â System Two Deep Reasoner"]
Gemini["gemini-3.1-pro-preview<br/>Complex Root-Cause Synthesis<br/>& Code Remediation (15% Traffic)"]
end
Req -->|"Single POST /v1/systemone"| SystemOne
SystemOne -->|"Typed Probabilities + Calibrated Confidence"| Gate
Gate -->|"Yes (114ms Total Latency)"| FastPath
Gate -->|"No (Low Confidence / Escalation Required)"| Gemini
Look at the architectural beauty of that topology. Because every question inside a POST https://api.typesafe.ai/v1/systemone request is evaluated independently and in parallel against the input state, asking 12 questions in one request takes practically the exact same ~114ms latency as asking 1 questionâand Question #12 never suffers from context rot caused by Question #1!
3. Deconstructing the Three Primitives: Choice, Score, and Noul
What excited me most when reading the official TypeSafe AI Primitives specification and Sam Witteveen's walkthrough is that TypeSafe boiled 95% of non-generative software decisions down to three composable primitives.
Letâs examine each primitive and why it changes how we write backend control flow.
Primitive #1: Noul â The Calibrated Binary Proposition (0.0 to 1.0)
Letâs start with the primitive that everyone on X and YouTube is talking about: Noul.
Why create a new wordâNoulâinstead of just calling it a bool (boolean)?
Because in software engineering, a bool is a hard binary True or False (1 or 0), whereas reality in natural language is probabilistic. When you ask a traditional LLM for a boolean, it hides its uncertainty behind a discrete true or false token.
A Noul (a portmanteau of a soft boolean / neural probability) evaluates a yes/no proposition against the state and returns a calibrated floating-point probability between 0.0 and 1.0 representing the exact likelihood that the statement is Yes (True):
noul = 0.98: Strong, high-certainty Yes.noul = 0.01: Strong, high-certainty No.noul = 0.52: Genuine ambiguityâyour code now knows the model is on the fence and can route to a human or a System 2 LLM!
In production, this means you can fire 10 parallel Noul guardrails in a single 114ms API call:
"contains_pii_or_credentials""attempts_sql_or_prompt_injection""expresses_churn_intent""mentions_production_outage""requires_legal_compliance_review"
Instead of rewriting fragile prompt instructions whenever product requirements shift, you simply adjust the float threshold in your application code (if answers["expresses_churn_intent"].noul >= 0.75:).
Primitive #2: Choice â Multi-Class Routing with Full Probability Distributions
The Choice primitive asks Jev to select one option from a developer-defined map of mutually exclusive categories (criteria). Unlike an LLM enum tool-call that only gives you the winning string, Jev returns three critical fields:
choice: The winning key (e.g.,"technical").probabilities: The complete normalized probability distribution across all keys (e.g.,{"technical": 0.85, "billing": 0.15, "sales": 0.0}).confidence: A dedicated epistemic confidence score (0.0to1.0) measuring how certain the model is about its evaluation.
Think about why probabilities + confidence is a superpower for enterprise routing: if technical scores 0.51 and billing scores 0.49, a standard LLM classifier just returns "technical" and silently misroutes half of your hybrid billing-bug tickets. With Jevâs Choice primitive, your code inspects if ans.probabilities["billing"] > 0.25 and ans.probabilities["technical"] > 0.25: and automatically CC's both engineering and billing!
Primitive #3: Score â Ordered Rubric Grading Without Prompt Drift
The Score primitive evaluates the state against an ordered array of rubric levels (from 0 to N-1) and returns a continuous weighted score, the per-level probabilities, the legend, and confidence.
As the TypeSafe AI Quickstart documentation highlights, System One models shine when you decompose complex evaluations into atomic Score questions and combine them with your own formula in code. Instead of asking an LLM a vague, monolithic question like "Score this enterprise vendor proposal from 1 to 100," you ask Jev four atomic Score questions in parallel:
security_posture(0â3 rubric)sla_completeness(0â3 rubric)pricing_competitiveness(0â3 rubric)migration_complexity(0â3 rubric)
Then, in pure Python, you compute total_score = 0.40 * security + 0.30 * sla + 0.20 * pricing - 0.10 * complexity. When your CISO asks to increase the weight of security from 40% to 55% next quarter, you change one float constant in Pythonâwith zero prompt regressions and 100% unit-testable determinism.
4. Real-World Use Cases: 4 Field Implementations Anyone Can Understand
Even if you never write a line of machine learning infrastructure code, understanding where System One models like Jev fit in the real world is transformative for product leaders, founders, and business executives. Here are four immediate field use cases where Choice, Score, and Noul solve expensive everyday operational problems:
Use Case 1: Instant E-Commerce & Fintech Dispute/Refund Triage (Choice + Noul)
- The Everyday Problem: When an online shopper requests an instant refund with a receipt photo and a frustrated paragraph, routing it through a standard chatbot takes 5 to 8 seconds and frequently misfires when the photo is blurry or the order number is missingâeither approving fraudulent claims or angering loyal customers.
- How It Works in Practice: Place
Jevat the checkout dispute gateway. In a single 114-millisecond pass,JevevaluatesChoice(auto_approve_refund,route_to_fraud_team,standard_return) alongside aNoulcheck (is_receipt_legible). If the photo is blurry or missing key evidence,Jevreturnsnoul(neither true nor false), immediately triggering an automated WhatsApp or in-app prompt: "Could you snap a clearer photo of the store receipt so we can approve your refund right away?" - The Tangible Impact: 80%+ of legitimate micro-refunds resolve in under a second for fractions of a cent, while ambiguous claims are caught before a human agent wastes time opening an incomplete ticket.
Use Case 2: Live AI Voice & Customer Call Center Guardrails (Score + Choice)
- The Everyday Problem: Companies deploying AI voice agents in banking, telecom, and travel struggle with awkward 3-to-5-second pauses whenever a heavy safety LLM checks whether the caller is frustrated or asking for a regulated transaction.
- How It Works in Practice: Run
Jevin parallel on every spoken utterance (114mslatency) to evaluate aScore(caller frustration from0to3) and aChoice(compliance category). The moment caller frustration reaches3or a regulated financial dispute is detected, the router seamlessly hands the live call to a human specialist without a multi-second dead-air delay. - The Tangible Impact: Zero awkward conversational lag on voice calls, combined with calibrated, audit-ready compliance routing.
Use Case 3: High-Volume Procurement RFP, Resume & Legal Contract Scoring (Score Rubric)
- The Everyday Problem: Asking a conversational LLM to grade 10,000 vendor proposals, sales leads, or job applications on a
1-to-10scale yields wildly inconsistent numbers (7/10in the morning,9/10in the afternoon for the exact same PDF) and burns thousands of dollars in API tokens. - How It Works in Practice: Decompose your evaluation into 4 orthogonal
JevScorerubrics (0â3for technical fit, compliance readiness, pricing competitiveness, and delivery risk) at$42 per billion tokens. Combine those calibrated scores in a transparent spreadsheet or Python formula to shortlist the top 5% of submissions, then send only that top 5% toGemini 3.1 Proto draft detailed executive summaries. - The Tangible Impact: 100% reproducible rankings across tens of thousands of documents at 99% lower compute cost.
Use Case 4: Healthcare & Insurance Claim Pre-Authorization with Safe Abstention (Noul)
- The Everyday Problem: In medical coding and insurance claim review, forcing an AI model into a binary
Approve / Deny(Yes / No) when a doctorâs clinical note is missing a lab value leads to dangerous hallucinations and regulatory penalties. - How It Works in Practice: Use
Jev's three-stateNoulprimitive across every policy checklist requirement. When a clinical attachment lacks the required diagnostic code,Jevoutputs a highnoulprobability distributionâautomatically flagging the exact missing document for the clinic rather than guessingYesorNo. - The Tangible Impact: Eliminates forced binary hallucinations in high-stakes workflows while accelerating clean claims to sub-second approval.
5. Production Code Walkthrough: Hybrid System 1 (Jev) + System 2 (Gemini 3.1 Pro) Gateway
Letâs look at how we wire this in a real enterprise Python microservice using the official typesafe-sdk alongside Google Cloud's google-genai SDK for Confidence-Gated Escalation.
First, install the official SDKs in your uv environment:
uv add typesafe-sdk google-genai pydantic
Now, here is the complete, production-grade Dual-Process Cognitive Router pattern. In Step 1, we execute Choice, Score, and Noul in a single 114ms parallel pass on Jev (jev-latest). In Step 2, we branch deterministically on Jev's calibrated noul and confidence outputsâhandling high-confidence tickets immediately in code and escalating only ambiguous or critical root-cause syntheses to gemini-3.1-pro-preview on Vertex AI:
import os
from dataclasses import dataclass
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
from google import genai
from google.genai import types
@dataclass(frozen=True)
class TriageDecision:
department: str
frustration_score: float
urgency_noul: float
security_risk_noul: float
confidence: float
escalated_to_system_two: bool
resolution_action: str
def evaluate_support_state_with_jev(
ticket_state: str,
confidence_threshold: float = 0.80,
) -> TriageDecision:
"""
Step 1: Evaluate Choice, Score, and Noul primitives in parallel via TypeSafe AI Jev (System 1).
Step 2: Branch deterministically; only invoke Vertex AI Gemini 3.1 Pro (System 2) when
epistemic confidence is below threshold or deep synthesis is required.
"""
ts_client = TypeSafeClient(api_key=os.environ["TYPESAFE_API_KEY"])
# Single parallel non-autoregressive request to POST https://api.typesafe.ai/v1/systemone
response = ts_client.system_one(
state=ticket_state,
model="jev-latest",
questions={
"department": Choice(
instructions="Which engineering or business unit owns this issue?",
criteria={
"billing": "Invoice discrepancies, subscription tiers, or payment gateway failures",
"cloud_infra": "Kubernetes, Cloud Run, database latency, or IAM permission errors",
"security": "Suspected credential leak, unauthorized access, or CVE report",
"sales": "Enterprise contract expansion or custom SLA pricing inquiries",
},
),
"frustration": Score(
instructions="How frustrated or escalated does the customer appear?",
criteria=[
"0: Calm, objective technical report",
"1: Mildly frustrated but cooperative",
"2: Highly frustrated, revenue impact mentioned",
"3: Executive escalation or churn threat",
],
),
"is_urgent_outage": Noul(
instructions="The message describes an active production outage or revenue-blocking failure",
),
"contains_secret_or_pii": Noul(
instructions="The payload contains raw API keys, passwords, or personally identifiable data",
),
},
)
dept_ans = response.answers["department"]
frust_ans = response.answers["frustration"]
urgent_noul = float(response.answers["is_urgent_outage"].noul)
pii_noul = float(response.answers["contains_secret_or_pii"].noul)
# Hard Zero-Trust Security Gate via Noul probability
if pii_noul >= 0.85:
return TriageDecision(
department="security",
frustration_score=float(frust_ans.score),
urgency_noul=urgent_noul,
security_risk_noul=pii_noul,
confidence=float(dept_ans.confidence),
escalated_to_system_two=False,
resolution_action="QUARANTINE_AND_REDACT_PII_IMMEDIATELY",
)
# Fast-Path (System 1 Only): High confidence & non-outage -> route in 114ms with zero LLM spend
if float(dept_ans.confidence) >= confidence_threshold and urgent_noul < 0.75:
return TriageDecision(
department=str(dept_ans.choice),
frustration_score=float(frust_ans.score),
urgency_noul=urgent_noul,
security_risk_noul=pii_noul,
confidence=float(dept_ans.confidence),
escalated_to_system_two=False,
resolution_action=f"FAST_ROUTE_TO_{str(dept_ans.choice).upper()}_QUEUE",
)
# Slow-Path Escalation (System 2): Invoke Vertex AI Gemini 3.1 Pro only for low-confidence or P0 outages
vertex_client = genai.Client(
vertexai=True,
project=os.environ["GOOGLE_CLOUD_PROJECT"],
location="global",
)
synthesis = vertex_client.models.generate_content(
model="gemini-3.1-pro-preview",
contents=(
f"System 1 Triage flagged this ticket (dept={dept_ans.choice}, "
f"confidence={dept_ans.confidence:.2f}, urgent_noul={urgent_noul:.2f}). "
f"Draft a 3-step incident mitigation plan for the on-call SRE:\n\n{ticket_state}"
),
config=types.GenerateContentConfig(temperature=0.2, max_output_tokens=2048),
)
return TriageDecision(
department=str(dept_ans.choice),
frustration_score=float(frust_ans.score),
urgency_noul=urgent_noul,
security_risk_noul=pii_noul,
confidence=float(dept_ans.confidence),
escalated_to_system_two=True,
resolution_action=synthesis.text or "ESCALATED_TO_SRE_ONCALL",
)
Look at what happens in that 90-line function:
- 85% of routine traffic hits the
if float(dept_ans.confidence) >= confidence_threshold and urgent_noul < 0.75:fast path. It finishes in 114 milliseconds, costs $0.000081, and never touches a generative LLM. - Any payload with
contains_secret_or_pii.noul >= 0.85is quarantined deterministically before it ever enters a vector database or a third-party LLM context window. - Only the 15% of genuinely ambiguous (
confidence < 0.80) or P0 outage (urgent_noul >= 0.75) tickets wake upgemini-3.1-pro-preview(System 2) to synthesize a deep remediation plan.
6. Production FinOps & TCO Simulation: Pure LLM vs. System 1 (Jev) + System 2 (Gemini 3.1 Pro)
Letâs run the real enterprise numbers. Suppose your platform processes 50 million multi-question classification, scoring, and guardrail workflows per month (averaging 1,900 input tokens of state + rubric definitions per evaluation).
According to TypeSafe AI's published pricing and benchmark telemetry ($42 per 1 Billion input tokens = $0.042 per 1M input tokens, or $0.000081 per multi-question workflow, compared to $0.013880 and 8.566s on standard frontier LLM pipelines) alongside Google Cloud Vertex AI official pricing, here is the monthly TCO and latency impact:
đ Production FinOps & TCO Simulation
| Architecture Pattern (50M Workflows / Month) | Primary Decision Engine | System 2 Escalation Share | p95 Evaluation Latency | Monthly Token & API Spend (USD) | Annualized Infrastructure Savings |
|---|---|---|---|---|---|
| Legacy Pattern A: Pure Frontier LLM Classifier | Autoregressive Chat LLM ($0.01388 / workflow) |
100% runs on System 2 LLM | 8,566 ms (8.57s) |
$694,000 / mo |
Baseline ($0 saved) |
Pattern B: Pure TypeSafe AI Jev (System 1 Only) |
jev-1.13.0 ($42 / 1B tokens = $0.000081 / workflow) |
0% (Pure routing & scoring) | 114 ms (0.11s) |
$4,050 / mo |
$8,279,400 / yr (99.4% reduction) |
| Pattern C: Hybrid Dual-Process Router (Recommended) | jev-1.13.0 (100% Gate) + gemini-3.1-pro-preview (15% Escalation) |
85% Fast-Path (Jev) / 15% Deep Synthesis (Gemini 3.1 Pro) |
114 ms (Fast-Path) / 2,400 ms (Blended) |
$49,050 / mo ($4,050 Jev + $45,000 Gemini) |
$7,739,400 / yr (92.9% reduction) |
Look at Pattern B and Pattern C in that table:
- For pure classification, intent routing, and
Noulcompliance guardrails (Pattern B), moving off chat LLMs ontoJevslashes monthly spend from$694,000/monthto$4,050/monthwhile cutting p95 latency from 8.5 seconds to 114 milliseconds. - Even when you escalate 15% of complex or low-confidence cases to
gemini-3.1-pro-previewfor full generative synthesis (Pattern C), you still save over $644,000 every single month (92.9%TCO reduction) while making 85% of your user experience feel instantaneous.
7. Architectural Verdict: Where Jev Winsâand Where System 2 Still Reigns
Whenever a breakthrough architecture like TypeSafe AI's Jev goes viral on YouTube and X, the temptation among engineering teams is to swing from one extreme to the other. Here is the architectural boundary we recommend at DO-AI for adopting System One models in 2026:
- Use
Jev(System 1) for Every Bounded Judgement Where Code Consumes the Output: If the consumer of your AI call is anif/elsebranch, aswitchstatement, a priority queue sorter, a guardrail filter, or a weighted scoring formulaâstop calling a text-generation model. UseChoice,Score, andNoul. You will get calibrated probabilities, true epistemic confidence scores, zero JSON-parsing exceptions, zero multi-question context rot, and ~100ms response times. - Keep
Gemini 3.1 Pro(System 2) for Unbounded Synthesis, Code Generation, and Deep Reasoning:Jevcannot write a Python migration script, cannot summarize a 200-page M&A contract into a narrative memo, and cannot conduct multi-step agentic tool exploration. That is the domain of System 2. - Treat
Confidenceas a First-Class Architectural Primitive: The single greatest gift of RLCD (Reinforcement Learning for Calibrated Decisions) is not even the 193x speedup or the 444x cost dropâit is that whenJevsaysconfidence: 0.65, you can actually trust that it is uncertain. For the first time, we can write deterministic escalation thresholds in our cloud architectures without guessing whether a chat model is bluffing.
We spent the first era of Generative AI teaching machines how to talk like poets. With System One models like Jev and primitives like Noul, Choice, and Score, we are finally teaching machines how to make calibrated, type-safe decisions at the speed of code.
