Most of the AI Calls in Your Stack Are If Statements

A look at Jev, TypeSafe’s System One model, the math behind calibrated decisions, and why structural type safety matters.

Pull up the trace of any agent running in production and count the model calls that exist only to answer a yes or no question. Is the task done? Is this ticket about billing? Does this old tool result still matter? Is this command safe to run?

Most teams route every one of those queries to a frontier LLM. The model spends a few seconds generating a JSON object, the code parses it, and a single boolean drops out. It functions, but it is slow, expensive, and occasionally malformed. Worse, the confidence score attached to that output usually means very little.

On September 15, TypeSafe AI released Jev, a model that abandons text generation entirely. You send it program state alongside a set of typed questions — yes/no (Noul), pick one of N (Choice), or place on a scale (Score). It returns a probability distribution over those predefined answers. Latency hovers around 100 milliseconds. Input tokens are $0.042 per million, and output is free. Because the answer space is fixed before the call, malformed responses are structurally impossible.

The fundamental shift here is the training objective. TypeSafe post-trained Jev using RLCD (Reinforcement Learning for Calibrated Decisions). While RLHF optimizes for human preference and RLVR for verifiable logic, RLCD rewards probability distributions that match reality. If Jev assigns an answer 0.8, it should be correct roughly 80% of the time across a population of similar decisions.

That matters for automation. A model with 90% accuracy that reports 0.99 confidence on everything gives your code nothing to gate on. A calibrated model — where 0.7 and 0.97 actually mean different things — allows you to confidently automate the obvious cases and escalate the rest.

A few reality checks when looking at the stack:

  • Confidence is not the probability of being correct. It is a shape statistic. For a distribution of 0.84, 0.159, and 0.001, the hosted API reports a confidence of 0.596. You still have to map thresholds to accuracy on your own labeled data.
  • The headline numbers are a ceiling. The advertised 193.6x speedup and 444.6x cost reduction are derived from TypeSafe’s own workflow evaluations against a dual-frontier-model baseline. They represent the absolute high end of potential savings.
  • RLCD is currently a black box. TypeSafe hasn’t published a paper or reward function. (And the acronym RLCD already belongs to a 2023 alignment method: Reinforcement Learning from Contrastive Distillation).
  • It fails where LLMs fail, plus a few new ways. Jev cannot do arithmetic, count items, or reliably compare dates. Those tasks still belong in deterministic code.

The full technical breakdown is available on the Vector1 Research Substack.

The complete article covers the API contract (with working TypeScript and Python), the math behind strictly proper scoring rules, a Python script to measure Expected Calibration Error (ECE) on your own traffic, five design patterns for routing System One models, and a complete analysis of Jev’s documented failure modes.

Read the full deep dive on Substack: https://brianjamescurry.substack.com/p/the-smart-if-statement-jev-rlcd-and

About the Author

Brian Curry is a Kansas City-based machine learning and AI strategist, marketing economist, and applied researcher. He leads Vector1, an independent research studio working on cognitive AI, causal inference, marketing economics, and knowledge engineering, with a focus on simulation-driven intelligence systems.

Over more than twenty years, Brian has led data science and analytics initiatives at enterprises ranging from $4B to $125B in revenue, including Koch Industries, Tractor Supply, Vail Resorts, Hallmark, Garmin, and AT&T. His work applies economics and causal inference to connect marketing investment to structural outcomes, operational decisions to economic value, and AI adoption to durable competitive advantage.

He is also the founder of KC AI Lab, a 1,500-member AI and ML education community in the Midwest. He lives in Kansas City and is an active part of the Kansas City community.

Research and Open-Source Projects

The modeling approach in this paper draws on PyCausalSim and Papilon.

Causal Inference and Economics

  • PyCausalSim: Simulation-driven causal discovery and evaluation, using counterfactual scenarios to isolate structural drivers.
  • Papilon: Complex-system simulation and optimization, with applications in media mix modeling and adaptive architectures.
  • Daedalus: Causal analytics for money-flow mapping and macroeconomic tracking.
  • The Autonomy Economy: A macroeconomic framework for the combined effects of rapid productivity growth and structural price deflation in an AI-automated economy.

Forecasting and Applied Modeling

  • Regimecast: Time-series regime detection, structural breaks, and economic forecasting.
  • CarryNet: Financial modeling for commodity carry trade analysis.
  • Foodmesh-ml: Machine learning, optimization, and simulation for distributed food systems.

Cognitive AI and Semantic Architecture

  • Memory-Node Encapsulation (MNE): A cognitive AI architecture and data structure for artificial episodic memory (NeoCortex-M).
  • MeaningFlow: Semantic content modeling, embeddings, clustering, and coverage gap analysis.

Contact: brian@vector1.ai | GitHub @Bodhi8 | Substack

The text of this article may be shared with attribution under Creative Commons Attribution 4.0 International (CC BY 4.0). Code and models referenced here are available separately to paid subscribers.

Related research