
Latest
Everything published, newest first.
The log
Entries 1–20 of 56
SFT Improved This Model. Did DPO Add Anything?
Implement reply-only SFT and DPO on a small language model. Read the T4 measurements, derive the preference loss and distinguish a better margin from an established accuracy gain.14 min readPyTorch post-trainingsupervised fine-tuningHow to Build an RL Environment With a Verifier in Python
Build a small RL environment in Python: a task generator, a verifier and two policies. Then show a loose verifier paying a policy that does no work, and test the verifier with hostile inputs.12 min readRL environmentsevaluationsMake a Tool an Agent Can Operate: Ten Rules from a Retrofit
Agents lose time on tools built for people: prompts, one exit code for everything, prose output and polling. Build a small CLI that fixes each one, and check it the way an agent will.11 min readagent toolingcommand-line interfacesWrite the Acceptance Spec Before You Build an Eval Judge
An LLM judge can only grade against a written, versioned policy. Name the owner, the rubric, the labeled set and the pass rule before you build it, and test the rubric on people first.9 min readAI evaluationLLM-as-judgeA Coding Agent That Writes Its Own Tests Is Grading Itself
When a coding agent writes both the change and the tests, a passing suite measures the agent's idea of done. Treat it as an eval problem: tests written from the spec, exit codes, rendered measurements and a named human verdict.8 min readcoding-agentsagent-evaluationRead an Agent Architecture Diagram by Tracing Every Arrow to Code
A box labeled trusted budget means nothing if its arrow carries a field the model wrote. Trace each arrow in an eval agent's diagram to the line of code that reads it.10 min readagent architecturesystem designShadow-Test an Agent Release Without Duplicate Writes
An agent release is a tuple of model, prompt, tools and config. Run the candidate in shadow on real inputs with its write authority removed, and derive how many clean episodes it takes to bound what you missed.9 min readshadow deploymentagent releasesMeasure Whether One Tool Schema Works Across Model Providers
The same JSON Schema can be offered to two providers and still produce different calls, costs and refusals. Keep one strict contract, write thin adapters, and run a paired experiment before you call the tool portable.8 min readtool-callingmodel providersTest an Agent's Fallback Path Against the Same Acceptance Bar
A fallback model runs rarely, so production traffic barely measures it and the aggregate hides it. Derive why, then force failover on your eval set and grade the fallback against the primary's contract.8 min readfallback modelsagent-evaluationUse a Circuit Breaker When Retries Multiply an Outage
With r retries at each of d layers, one request can become (r + 1)^d sends, and the multiplier peaks exactly when the dependency is down. Derive it, simulate it, and see what a shared breaker changes.12 min readcircuit breakerretry amplificationReserve an Agent's Spending Before Each Request, Not After
A counter in one process cannot stop eight workers from spending the same last dollar. Bound each call's maximum charge, reserve it atomically in a shared ledger, settle from real usage, and test the race.12 min readagent cost controlinference-costRoll Back an Agent Release as a Whole Tuple, Not One File
Reverting the prompt alone can leave an old prompt talking to a new tool. Treat model, prompt, tools and config as one release tuple, roll back to a tuple you evaluated, and keep irreversible effects in their own ledger.7 min readagent releasesrollbackGive Every Agent Memory an Owner, a Source Revision and an Expiry Rule
A stored fact goes stale when time passes or when its source changes. Record who owns it and which revision it came from, select the current fact by rule rather than similarity, and escalate conflicts.7 min readagent-memorymemory-lifecycleCheck What a Citation Proves: Provenance Versus Entailment
An exact, byte-matched quote proves where text came from, not that it supports the claim. Test provenance and entailment separately, and compare exact match, NLI and an LLM judge.8 min readcitation verificationresearch agentsFind the Failing RAG Stage Before You Change the Prompt
Measured on SciFact with small open models: attribute each miss to retrieval, reranking, prompt assembly or generation, then change only the stage that failed. A targeted prompt fix took 107 correct to 151.10 min readRAG retrieval evaluationrecall-at-kTurn a Grading Policy Into a Test Table, Then Mutate the Grader
Write boundary cases for an eval grader from its policy, compute expected results by hand, then break the grader on purpose to prove every row can fail. Seven mutants, seven kills.9 min readevaluationmutation testingKeep Enough Trace Detail to Grade and Reproduce an Agent Run
A truncated agent transcript can look like a clean success. Record what a trial needs for grading and replay, mark truncation explicitly, and size how many transcripts to read.9 min readagent transcriptstrajectory reviewCapture Agent Trajectories for Evals Without Copying User Data
Agent traces are the raw material for evals, and production traces carry user data. Capture structure by default, keep content in a restricted store, test every serialization path with canaries, and bound leaks by sampling.8 min readagent tracesagent-evaluationCancel an Eval Run or Agent Job Without Misreporting What Ran
A canceled eval run still has requests in flight, bills for them, and leaves a biased partial score. Name the states, count the in-flight work with Little's law, and report only what the evidence supports.10 min readagent cancellationevaluation runsContinued on the next page.
To browse rather than follow: topics, all articles and all notes. To learn in order: courses and the book.



















