Docs
OfficialJev Guides & Articles
AI Primer: RLCD and Calibration
Why TypeSafe trains decision models with RLCD instead of RLHF: calibrated probabilities where 0.2 outcomes happen about 20% of the time, and the case for machine-to-machine automation.
- Format
- Docs
- Reading time
- 3 min
- Published by
- TypeSafe AI
- Last verified
- Sep 2026
Works forJev for Evaluation
Used inJev for Software & DevTools
Highlights
- RLCD, reinforcement learning for calibrated decisions, is a third post-training path alongside RLHF and RLVR.
- Calibration means outcomes given 0.2 probability occur around 20% of the time across many predictions.
- RLHF rewards can produce sycophancy and hallucinations; TypeSafe cofounder Diogo Almeida co-invented RLHF.
- TypeSafe expects future AI automation to be roughly 99% machine-to-machine and 1% human-facing.
Quickstart
python
from typesafe_sdk import Noul, TypeSafeClient
client = TypeSafeClient()
response = client.system_one(
state="I was charged twice. Please fix this ASAP.",
questions={"refund": Noul(instructions="Does this message request a refund?")},
)
p = response.answers["refund"].noul # P(true): calibrated, not generated text
# RLCD trains these: across many predictions, 0.8 should be right about 80% of the timeWatch out
Calibration is a property of groups of predictions, not a promise about one answer, so keep a review path for the individual cases that matter.
Questions about this entry
Short answers drawn from the linked project or page.
The primer's argument is calibration: RLCD trains probabilities where a 0.2 outcome happens about 20% of the time, while the page says RLHF rewards can produce sycophancy and hallucinations. It frames RLCD as a third post-training path beside RLHF and RLVR.
No. The caveat says calibration is a property of groups of predictions, not a promise about a single answer, so keep a review path for the individual cases that matter rather than treating a high probability as proof.
The primer lines up three post-training paths. RLHF turned pretrained models into chatbots by training them on responses people prefer. RLVR, reinforcement learning with verifiable rewards, created reasoning models strong at mathematics but slower and more expensive. RLCD trains TypeSafe to return decisions and calibrated probabilities instead of generated text. RLHF trained InstructGPT and ChatGPT and was co-invented by TypeSafe cofounder Diogo Almeida.
Preference optimization makes the model favour a particular style, such as instruction following, while reducing the probability of other possible outputs. The primer calls mode dropping a milder version of mode collapse, the classic GAN failure where a generator keeps producing the same kind of output because it continues to fool the discriminator.
It starts from the bet that large-scale automation will be dominated by AI-to-AI and AI-to-software interactions, so the machine interface matters more than the chat interface. The term covers software-like properties: structure, reliability, observability, testability, speed, consistency and low cost. The page is also explicit that it is building prod, not God, for narrow decisions code can inspect and act on.
No. It says RLHF remains a good fit for conversational models. The disagreement is about optimization targets: an output can be compelling to a person without being reliable enough for unattended automation, so human preference and machine trustworthiness are different things, and production automation needs a training objective centered on constrained decisions and calibrated uncertainty.
Across many predictions from a well-calibrated model, outcomes assigned a probability of 0.2 should occur about 20% of the time, 0.8 about 80% of the time, and 1.0 about 100% of the time. That is what makes uncertainty usable by software, since you can set a threshold and expect roughly the stated error rate. The primer stresses that these rates describe groups of predictions, not any single answer, and points to the Confidence guidance for deciding when software should act and when it should escalate.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
X: How the agent stack moved in Jev's first three days
YouTube: Diogo Almeida tells swyx what System One is, why RLHF failed his automation goal, and why AI should eventually disappear.
X: The 10-step roadmap, summarised
X: Giving your agents a decision brain
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.