A classifier's score, its probability, and the decision it makes are three different things, and the threshold is what links the last two. James, Witten, Hastie, and Tibshirani's Section 4.3 on logistic regression shows…

Notes
Short notes on building and checking AI applications, one idea, failure or check at a time.
Chi-Squared Test of a Dataset's Class Balance
Dec 3 · 2026Pearson's chi-squared statistic adds up, over categories, the squared gap between observed and expected counts divided by the expected count. The SciPy documentation for scipy.stats.chisquare begins "Perform Pearson's…
An optimizer turns gradients into parameter updates: plain SGD scales each gradient by one learning rate, while Adam also divides by a running gradient size. Kingma and Ba, in the Adam paper, describe stochastic…
Context Rot in Long-Running Agents
Dec 2 · 2026In this pencil demo, an agent starts with one starred rule in its notebook. New notes crowd the page until the rule is hard to spot. The agent sends an envelope without its required seal. That’s what context rot looks…
A categorical feature names a group, so a number standing in for it carries no size or order unless the groups truly have one. James, Witten, Hastie, and Tibshirani describe the standard fix in Section 3.3.1 of An…
Chi-Squared Feature Selection for a Classifier
Nov 30 · 2026Chi-squared feature selection scores each nonnegative count feature by how far its per-class totals sit from what class sizes alone would predict. The scikit-learn function chi2 is described as "Compute chi-squared…
The chain rule of calculus says a composed function changes at the product of each step's rate, with each rate taken at that step's own input. Goodfellow, Bengio, and Courville introduce it in Section 6.5.2 of Deep…
Chain-of-thought prompting helped larger models most
Nov 28 · 2026In standard few-shot prompting, each example pairs a question with its answer. In chain-of-thought prompting, each example also carries the reasoning between them: "a series of intermediate natural language reasoning…
SVM C Hyperparameter: Penalty or Budget
Nov 27 · 2026The letter C in a support vector machine is not one thing: in some libraries it is a penalty on margin violations, and in some books it is a budget for them, and the two point in opposite directions. When you read…
Decoding with a large model costs one forward pass per token, and the passes cannot overlap because each token depends on the last. Speculative decoding adds a cheaper draft model. It proposes γ tokens, and the large…
ResNet Residual Connections Explained
Nov 25 · 2026A residual connection adds a layer's input back to its output, so the layers only have to learn the difference from the input. He et al. introduced it to fix a problem they call degradation: as a plain network gets…
A model's capacity is its ability to fit a wide variety of functions, and the set of functions it is allowed to choose from, its hypothesis space, controls it. Goodfellow, Bengio, and Courville put it this way in…
Brier Score Grades a Classifier's Probabilities
Nov 23 · 2026The Brier score grades probability forecasts: for a yes-or-no outcome it is the mean squared gap between each forecast probability and what happened. In symbols, BS = (1/N) Σ (yᵢ − p̂ᵢ)², where yᵢ is 1 if the event…
Neural translation models of that time kept a vocabulary of about 30,000 to 50,000 words, but translation is an open-vocabulary problem. Sennrich, Haddow, and Birch encode rare words as sequences of subword units…
Boosting Fits Each New Model to the Residual Error
Nov 21 · 2026Boosting builds a model by adding one small model at a time, each fitted to what the current model still gets wrong, and it never goes back to change the earlier ones. Hastie, Tibshirani, and Friedman call the general…
Big O notation describes how a cost grows as the input gets large, as an upper bound, and it deliberately ignores constant factors and small inputs. Lehman, Leighton, and Meyer, in Mathematics for Computer Science, say…
The data-generating distribution is the single process that draws every training and test example, and a dataset is only one finite sample from it. Goodfellow, Bengio, and Courville set it up in Section 5.2 of Deep…
In high dimensions the nearest neighbors of a point are not near, because the same observations leave the space mostly empty: the curse of dimensionality. James, Witten, Hastie, and Tibshirani describe it in Section 3.5…
A cumulative distribution function gives the probability that a random variable is at or below a threshold, so the value at the threshold itself counts. Lehman, Leighton, and Meyer define it in Section 19.3 of…
Cross-entropy scores a classifier's forecast q against a target distribution p, as minus the sum of p times log q, and it is smallest when q equals p. Goodfellow, Bengio, and Courville define it in Section 3.13 of Deep…
Consistency of an Estimator in Machine Learning
Nov 15 · 2026An estimator is consistent when its estimates converge in probability to the true parameter as the amount of training data grows.
Adam Optimizer First Step Worked by Hand
Nov 14 · 2026Adam's first update moves each parameter by about the learning rate, for any gradient much larger than ε, once its moving averages are bias-corrected. Kingma and Ba correct them because the first moment m and the second…
Conditional probability is the chance of one event once you know another has happened: Pr[X | Y] is Pr[X and Y] divided by Pr[Y]. Lehman, Leighton, and Meyer, in Chapter 18 of Mathematics for Computer Science, write…
Reward Model Training From Pairwise Preferences
Nov 12 · 2026A reward function can be hard to write down and easy to judge by eye. Christiano et al. use that. A person watches two short clips of the agent and picks the better one. A reward model is then fit so that its scores…
Batch normalization rescales each activation over a mini-batch to mean zero and variance one, then lets the network learn its own scale and shift. Ioffe and Szegedy introduced it because the distribution of each layer's…
Bootstrap Estimates Standard Error From One Dataset
Nov 10 · 2026The bootstrap estimates how much a statistic would vary from sample to sample, using only the one sample you have and resampling it with replacement. James, Witten, Hastie, and Tibshirani introduce it in Section 5.2 of…
A mixture-of-experts layer sends each token to a few of its experts instead of all of them. A small learned router decides which. The Switch Transformer simplifies this to one expert per token: the router's softmax…
AdamW takes weight decay out of the gradient
Nov 8 · 2026For plain SGD, adding an L2 penalty λ/2·‖θ‖² to the loss and shrinking the weights by a factor each step are the same update. Many libraries therefore treat "weight decay" and "L2 regularization" as one setting. The…
Bag of words represents a document by how many times each token appears in it, and it discards the order the words came in. Jurafsky and Martin put it this way in their chapter on naive Bayes: "We represent a text…
Backpropagation is the method that computes the gradient of a loss with respect to every weight in a network, by applying the chain rule backward from the output to the inputs. That is all it does. Goodfellow, Bengio…
AIC scores a model by how well it fits and charges it for how many parameters it needed to get there, and the smallest score wins. Hirotugu Akaike defined it in 1974 as AIC = (−2) log(maximum likelihood) + 2(number of…
Accuracy is the share of a classifier's predictions that are right: correct predictions divided by all predictions, written Acc = (1/n) Σ 1{ŷᵢ = yᵢ}. It is the first number anyone reports, and the first one that can…
You give a model the beginning of a training passage. It misses the next 50 tokens. A colleague runs the same checkpoint with a longer prefix ending at the same place and recovers all 50 exactly. What changed between…
A classifier sends a case to a human when its confidence is below 80%. Its top prediction has been too confident. You fit one calibration parameter and the review queue grows, even though the predicted class on every…
What the square root in attention keeps steady
Nov 1 · 2026You widen an attention head from 64 to 256 dimensions. Even before the model has learned anything useful, its attention weights can become sharper. Why should the number of coordinates change which token looks relevant…
Self-Consistency Voting and the Likeliest Path
Oct 31 · 2026Imagine five possible solution paths for one problem. Their probabilities are 0.35, 0.25, 0.18, 0.12 and 0.10. The first path ends at 9. The next three reach 7 by different routes. The last ends at 4. Which answer would…
Scaling Model Size and Training Tokens Together
Oct 30 · 2026You can afford one dense pretraining run. Should you double the model size, double the number of training tokens, or double both? First write down what the budget holds fixed. A useful approximation for dense…
LoRA Rank Explained: What Rank 8 Buys an Adapter
Oct 29 · 2026A teammate proposes rank-eight LoRA for a 4,096-by-4,096 projection. They expect the layer to be 256 times cheaper to run. The number 256 is real. Which bill does it reduce? Freeze the original matrix W. For input x…
How many requests fit in the KV cache?
Oct 28 · 2026A serving team has 40 GiB left after loading the weights. Can it admit 32 simultaneous requests of 2,048 tokens each? For OPT-13B in FP16, you can answer before benchmarking a single kernel. During decoding, each layer…
Your preference-training dashboard shows a falling loss. Then you inspect a training pair and discover that the model assigns less probability to the preferred answer than its reference does. Is the implementation…
A benchmark asks for the second-largest distinct integer in a list with at least two distinct values. A model returns sorted(xs)[-2]. It passes on [1, 4, 9]. Before reading further, write the smallest test that…
Process Verifiers and Step-Level Reasoning Scores
Oct 25 · 2026Solve x² = 9 for the positive root. A candidate writes “divide both sides by x, so x = 9, hence x = 3.” A final-answer checker sees 3 and awards credit. A step labeler can stop at the first invalid inference. Dividing…
A teacher gives two valid answers equal probability. Your student can represent them both, but after training it gives the second answer probability 0.01. How costly is that mistake? It depends on whose answers you draw…
You sample two answers and keep the one your reward model likes best. Now you can afford 200 samples. What else have you given yourself 200 chances to find? An answer that exploits a mistake in the judge. Imagine the…
RL Evaluation Intervals and Interquartile Mean
Oct 22 · 2026Imagine eight normalized scores from an RL benchmark, sorted from worst to best. They are 0, 0.1, 0.2, 0.2, 0.4, 0.6, 0.7 and 12. Before reading on, double the best score in your head. How much better does the typical…
On 1,000 independent questions, model A gets ten more answers right than B. Before choosing a significance test, ask for the predictions. Two very different experiments fit that headline. | Questions on which only one…
Reading the Conceptual Reasoning Fellowship Posting
Oct 20 · 2026A posting tells you what a role needs, and it often tells you more about who the role is for than a job title does. Anthropic's Conceptual Reasoning Fellow posting is short, and one of its duties is a skill you can…
The bias-variance tradeoff says a model's expected test error at a point splits into three parts: variance, squared bias, and irreducible noise. In words, variance is how much the fit changes between training sets, bias…
Bias of an Estimator Explained With Sample Variance
Oct 18 · 2026The bias of an estimator is how far its average value sits from the thing it is trying to estimate: Bias[θ̂] = E[θ̂] − θ. It describes the whole procedure repeated over many possible datasets, and not one fitted number…
Gradient Clipping for Exploding Gradients Explained
Oct 17 · 2026Training recurrent networks has two known problems, vanishing and exploding gradients. The paper studies them analytically and geometrically, then proposes a simple fix for the exploding case: "a gradient norm clipping…
Bayesian Methods in Machine Learning: Pros and Cons
Oct 16 · 2026A Bayesian method states what you believe about a model's parameters before seeing data, as a prior, and then updates that belief into a posterior after seeing the data. Hastie, Tibshirani, and Friedman describe it in…
Bayes' theorem turns a probability you can measure into the probability you actually want: the chance of a hypothesis once you have seen some evidence. In symbols, P(A | B) = P(B | A) × P(A) / P(B). In their chapter on…
Bayes Error Sets the Floor for Any Classifier
Oct 14 · 2026Bayes error is the lowest test error any classifier can reach, and it is usually above zero, because the classes overlap in the data you have. James, Witten, Hastie, and Tibshirani define it in Section 2.2.3. The Bayes…
Nearly all deep learning algorithms are built from four parts: a dataset, a cost function, an optimization procedure, and a model. Goodfellow, Bengio, and Courville put it this way in Section 5.10 of Deep Learning…
Lottery Ticket Hypothesis and Winning Subnetworks
Oct 12 · 2026Pruning can remove more than 90% of a trained network's weights without hurting accuracy. The catch is that the sparse network is hard to train from the start. Frankle and Carbin ask whether the problem is the shape or…
Grouped-query attention shares key and value heads
Oct 11 · 2026During decoding, every new token must load the keys and values of everything before it. If each of H query heads has its own key and value head, that is a lot to load. Multi-query attention keeps a single key head and a…
Bagging vs Dropout: Two Ways to Average Many Models
Oct 10 · 2026Bagging and dropout are both ways of averaging over many models, but they build those models in different ways, and that changes what each can fix. Bagging resamples the training cases and trains a separate predictor on…
Human Agreement Before Trusting an LLM Judge
Oct 9 · 2026An LLM judge cannot give a stable quality signal if the people who wrote the rubric disagree about which model outputs should pass. OpenAI's evaluation guide lists disagreement among human experts as a challenge of…
LLM Model Upgrade Review and Regression Counts
Oct 8 · 2026A new model snapshot can raise your eval score and still break items that used to pass. OpenAI's prompt engineering guide says it directly: "Even different snapshots of models within the same family could produce…
Bagging fits B models to bootstrap samples of the training data and averages their predictions, written f̂_bag(x) = (1/B) Σ f̂_b(x) for a regression problem. The averaging only removes the part of the models' variance…
Your eval harness scores cases with an empty reference answer as correct, which inflates accuracy by the share of such cases. A fix arrives with a new test, and the test passes. That shows the fix and its own test…
Codex Stop Conditions for Unattended Runs
Oct 5 · 2026"Keep improving the eval harness" has no finish line, so an unattended run can wander until something outside it stops it. Give the job one bounded question with two allowed endings. Take a nightly check on a research…
ROC AUC is the area under a classifier's ROC curve, and it equals the probability that the classifier gives a randomly chosen positive example a higher score than a randomly chosen negative one. Tom Fawcett's…
API Key Handling in Shared Codex Skills
Oct 3 · 2026A Codex skill that launches an eval run against a hosted model needs an API key. The skill itself should never contain one. In a dark software factory, a shared skill is a station every agent and every clone can run…
A neural network's architecture is its overall structure, meaning how many units it has and how those units connect to each other. The weights are different. They are the numbers that training chooses for a given…
Mock Boundaries in Eval Harnesses
Oct 1 · 2026A mocked model client returns exactly what you told it to: well-formed JSON, every field present, no errors. The real API also returns responses cut off at the token limit, refusals and rate-limit errors. If your eval…
Reproducibility Environment Pinning for ML Results
Sep 30 · 2026Two people can run the same eval script on different library versions and argue about a number neither can reproduce. Reproducing results is the daily work of a research engineer, and a work sample that says "I pinned…
Reproducing a Results Table From a Fresh Git Clone
Sep 29 · 2026A results table that only reproduces on your laptop depends on something you never wrote down: an exported variable, a dataset in your home directory, a package installed by hand six weeks ago. Anyone who tries to run…
Row Counts Before Trusting a Dataset Pull
Sep 28 · 2026You ask Claude Code to pull last month's eval runs from your tracker through an MCP server, or to page through an API for a dataset. The file it writes is valid JSON, neatly formatted, and holds only the first page…
Shell Test Fixtures With Spaces in Run Names
Sep 27 · 2026A results script that aggregates runs/*.jsonl works on clean names. Sweeps don't always produce clean names: lr 3e-4.jsonl, a file that starts with a dash, a quote in a config label. If the script splits on spaces, or…
Logged-Out Path Test Before Polishing Plots
Sep 26 · 2026A notebook can produce clean figures for you and fail on its first cell for anyone else. The difference is usually state you carry and a new reader does not: an API key exported in your shell, a model cache on disk, a…
Date Cutoff Tests for a Contamination Filter
Sep 25 · 2026One common way to reduce contamination in a coding or math eval is a date filter: keep only problems published after the model's training cutoff. That filter is a calendar boundary, and calendar boundaries break in…
Claude Data Prep Row Count Check
Sep 24 · 2026After a crash, someone reruns the eval-set builder. If the script appends instead of replacing, the test set now holds every example twice, and nothing fails. That quietly changes your error bars. A 95% interval on an…
Citation Checker Test: Support Versus Topic Match
Sep 23 · 2026A research agent writes a related-work paragraph: "Method X improves GSM8K accuracy by 4 points [3]." Source [3] is about Method X, and it mentions GSM8K. It may still not say that. An HTTP 200 and a shared keyword are…
Lost in the Middle: Long-Context Position Effects
Sep 22 · 2026A longer context window is only useful if the model uses what is in it. Liu et al. test that with a controlled question-answering task built from NaturalQuestions-Open: each input holds k documents, exactly one of which…
LLM Grader Prompt Output Size and Evidence
Sep 21 · 2026An LLM grader in an eval pipeline often writes a paragraph of rationale for every item. Across a few thousand items, that paragraph is most of your wait, and most of it goes unread. OpenAI's latency guide says output…
Agent Run Time Profiling by Stage
Sep 20 · 2026An eval sweep that takes all night limits how many ablations you can run in a week, and "why is this agent slow?" is a fair interview question for an applied-AI role. A good answer starts with a trace, not a guess about…
Batch API for Evals That Can Wait a Day
Sep 19 · 2026A nightly sweep over 10,000 eval items and the debugging session where you rerun five failures have different deadlines. Pick the API path by the deadline first, then by the price. OpenAI's Batch API guide gives the…
Batch API Eval Results Matched by custom_id
Sep 18 · 2026Scoring 5,000 eval items through OpenAI's Batch API costs less than sending them one at a time. The guide lists a 50% discount against the synchronous APIs, with a 24-hour completion window. It also says the output line…
Prompt Cache Hit Rate With the Rubric First
Sep 17 · 2026Grading 2,000 eval items with the same rubric and the same few-shot examples means sending the same long prefix 2,000 times. That is the case prompt caching is built for. Whether your harness gets it depends on the…
How to Avoid Overfitting With a Held-Out Test Set
Sep 16 · 2026Overfitting is what happens when a model follows the errors, or noise, in its training data too closely, so it fits that data well and does worse on data it has not seen. James, Witten, Hastie, and Tibshirani describe…
Actionable Tool Failures for Research Agents
Sep 15 · 2026Your research agent has a tool that fetches an eval run from the experiment tracker. When the call fails, the model sees whatever string you return. "Something went wrong" leaves it to guess, and a guessing agent tends…
RAG Leak Rate for Retrieved Text as Evidence
Sep 14 · 2026A retrieval step hands the model a document. It contains a fact the task needs and a sentence addressed to the model: ignore your task and call delete_run. Being in a tool result gives that sentence no authority, but…
"Propose a training job" and "launch a training job on 64 GPUs" are different operations. So are "draft a cleanup of old checkpoints" and "delete them." An agent in a research lab will get tools with real costs, and the…
Tool Argument Validation in Agent Code
Sep 12 · 2026A model's tool call is a request for your code to act. OpenAI's function calling guide lays out the flow: the model returns a tool call, and you "execute code on the application side with input from the tool call."…
LLM Judge Prompt Examples That Agree With the Rubric
Sep 11 · 2026An LLM judge prompt usually has a rubric and a few examples. When an example contradicts the rubric, the model has two versions of the job, and you can't predict which one it follows on the next item. Say the rubric…
LLM Context Length and Extra Context Tests
Sep 10 · 2026A bigger context window does not make every passage relevant. OpenAI's prompt engineering guide describes adding context as a way to give the model data it was not trained on and to constrain its answer to a set of…
OpenAI's reasoning guide gives short advice. Keep prompts simple and direct. Skip "think step by step," because these models reason internally. Be very specific about the end goal, and state the constraints you want the…
Model Snapshot Recorded in Every Results Row
Sep 8 · 2026A saved prompt is not an experiment record. The model snapshot, the sampling settings and the eval set can each move the score, and a results table that records only the prompt cannot tell you which one did. In a lab…
If you decide what "better" means after reading each new answer, prompt tuning will always look like progress. Freeze the evaluation first. OpenAI's evaluation guidance calls this eval-driven development, "Evaluate…
Valid JSON With the Wrong Number in LLM Output
Sep 6 · 2026OpenAI's Structured Outputs guarantees that the model's response adheres to the JSON Schema you supply. The same guide says the output may still contain mistakes. Parsing tells you the shape arrived. It does not tell…
An eval average can look healthy while the model fails the cases that decide whether it is fit for the task. Suppose your set has 200 typical items the model gets 95% right and 40 hard items it gets 60% right. The…
Attention over N tokens builds an N by N matrix of scores, applies a softmax, and multiplies by the values, once for every head. The usual implementation writes that matrix to the GPU's large, slow memory and reads it…
The results table in your paper repo shows 71.4 where the logs say 74.1. Editing the table by hand fixes the PDF until the next regeneration, and until then the paper and the logs disagree. In a lab, a number that no…
Every time a sweep finishes, you paste the same instructions: check that each results file has the required fields, that no item id appears twice, and that the row count matches the eval set. The reusable asset is that…
A pipeline of five steps that each pass a bad artifact along 5% of the time delivers a clean result only 0.95⁵ ≈ 0.77 of the time. Nearly one night in four, the morning summary would rest on something broken. Chapter 3…
Codex Migration Pilot on Two Files With Diffs
Aug 31 · 2026You need to move 40 experiment configs to a new format: a renamed field, a new default, a changed prompt-template path. It is mechanical, so it is tempting to hand Codex the whole directory. Prove it on two files first…
Codex Skill Refusal Examples for Publishing
Aug 30 · 2026A skill that builds a results table from eval logs looks excellent on the request it was written for. The nearby request is the real test: "build the table and push it to the team leaderboard." A trigger test asks…
A position vector added to the input tells each token where it is. Attention, though, needs to know how far apart two tokens are. Rotary embeddings give attention that directly. Take a query or key vector and group its…
Ridge regression is least squares with a price on large coefficients, and the strength of that price is the parameter called alpha. It finds the coefficients that minimize the squared error plus α times the sum of the…
Codex Repo Write Access Without Network Access
Aug 27 · 2026Fixing a bug in an eval script needs write access to the repository. It does not need the network. But if the script's tests call a paid model API, or download a benchmark from a hub on first run, a routine fix can…
Agent Code Review Rules for Experiment Invariants
Aug 26 · 2026"Review carefully" gives a code reviewer nothing to prioritize. An invariant does. In research code, the invariants are the rules that keep a number honest: no eval item appears in the few-shot pool; items that failed…
A language model that answers from its own weights cannot easily update what it knows or show where an answer came from, even when the answer is right. Lewis et al. add a retriever: for a question x, a dense index…
Codex Working Directory in Scheduled Runs
Aug 24 · 2026A reviewer asks where a number came from. The answer you want is a commit and a command. A nightly eval that runs Codex from cron or CI starts wherever the scheduler starts, so relative paths such as results/ can…
Anscombe's quartet is four small datasets that share the same means, the same regression line, and the same correlation, yet look completely different when you plot them. Frank Anscombe published them in 1973 to show…
Codex Final Result Parsing and Progress Streams
Aug 22 · 2026A sweep driver calls codex exec once per config and builds a results table. If it parses everything the command prints, two things go wrong. A progress line lands in a results cell, or a failed config leaves no row and…
Codex Worktrees and Files Git Doesn't Carry
Aug 21 · 2026Codex ran your ablation in a separate worktree and reports a two-point gain. Before that number goes in a results table, to a teammate or into the trash with the worktree, check what it depended on that Git does not…
A statement holds almost everywhere when the places where it fails form a set of measure zero, which means the exceptions take up no room. Sheldon Axler defines it in his Definition 3.27: if (X, S, µ) is a measure…
Which AGENTS.md Files Did Codex Load?
Aug 19 · 2026Before a model can follow a rule, the rule has to be in its context. Chapter 21 treats that context as a budget assembled from parts; for Codex, the instruction part is built by a documented walk. So when Codex ignores…
Unrequested Changes Made by a Coding Agent
Aug 18 · 2026You asked an agent to fix an axis label on a results plot. The diff also switched the F1 score from macro to micro averaging, because the agent read it as a cleanup. On an imbalanced label set, those two averages can…
Blank Eval Score Versus Zero in Claude Instructions
Aug 17 · 2026In an eval results table, a blank score can mean the run timed out, the API returned an error or the grader crashed. A zero means the model answered and was wrong. Merging the two changes the headline number, and a…
Cost per Accepted Result Instead of Cost per Token
Aug 16 · 2026A cheaper model, or a cheaper Claude Code setup, can cost more per result you keep. A call or a session whose output you throw away cost money and bought nothing. The number to compare is cost per accepted result, where…
Claude Code Local Overrides in a Shared Repo
Aug 15 · 2026A research repo shared by four people needs the same permissions and hooks for all of them. It does not need your model override, the path to your scratch disk or the approval you gave a one-off command. The same holds…
Claude Code Hook Failure Behavior Testing
Aug 14 · 2026Say you write a PreToolUse hook so Claude Code can never edit data/test/, the held-out split your reported numbers depend on. The hook works on the case you tried. Does it hold on the cases you didn't? The hooks…
MCP Server Tool List Access Review
Aug 13 · 2026You connect an MCP server for your experiment tracker so the agent can read past runs. The same server may also expose tools that tag, overwrite or delete runs. The agent now has every tool on that list, whatever your…
Does Bash(uv run *) Allow Too Much in Claude Code?
Aug 12 · 2026An allow rule is a threat model in one line. Before you save Bash(uv run *) so Claude Code can run experiments without prompting, write down the worst command it admits. Claude Code's permission rules match command…
Reviewer Build Environment Testing
Aug 11 · 2026Your eval passes in the virtual environment you have been editing for three weeks. That environment holds packages you installed by hand, a cached dataset and an API key exported in your shell. The person who reruns…
Tracing One Failed Eval Item Through the Harness
Aug 10 · 2026Your eval run finished, the score dropped four points, and the log has a hundred warnings. The loudest one is rarely the cause. Start with one item that was scored wrong and follow it through every stage. An eval…
Agent File Rename Mapping Preview
Aug 9 · 2026Renaming 300 run directories into a clean model_lr_seed scheme is easy to ask for and hard to undo when two runs collapse into one name. lr=1e-3 and lr=0.001 are the same number written two ways, and a sweep launched by…
Failing Eval Fixtures for Claude Code Fixes
Aug 8 · 2026"The accuracy looks too high" gives Claude Code nothing it can check. A three-row fixture does. Suppose the eval set was merged from two shards and some examples appear twice. The scorer averages over rows. Build the…
An eval results CSV carries meaning a cleanup script can erase. Item ID 00127 is a string, not the number 127. A blank score means the item was not run; a 0 means it ran and failed. A model output with a comma inside…
You ask if the change is done. The agent says yes. You rerun the eval, and it isn't. The Claude Code best-practices guide names the position you are in: without a check Claude can run, "you become the verification loop…
The Two-Correction Rule in Claude Code, Tested
Aug 5 · 2026The Claude Code best-practices guide gives a specific threshold: "If you've corrected Claude more than twice on the same issue in one session, the context is cluttered with failed approaches." Its fix is to run /clear…
CLAUDE.md Pruning and Adherence Tests
Aug 4 · 2026Three hundred lines of instructions, and Claude still ignores the rule about where results files go. So you add the rule again in capitals. It still slips. The Claude Code best-practices guide has a direct diagnosis…
Subagent Codebase Discovery in Claude Code
Aug 3 · 2026Finding where an unfamiliar research repo computes pass@k, or where it filters the eval set before scoring, can take dozens of file reads before you reach the two functions that matter. If all that reading happens in…
A 1.3-billion-parameter model is preferred to one with 175 billion parameters. Before explaining how the smaller model won, finish the sentence. Preferred by whom, on which prompts, against which version of the larger…
"Can you build an eval for tool-use regressions?" sounds like one task. It hides a dozen decisions: which model and snapshot, what counts as a pass, how many items, what a false alarm costs, what is out of scope…
Claude Code Hooks for Number-Critical Checks
Jul 31 · 2026A line in CLAUDE.md such as "rerun the scorer tests after editing metrics.py" is followed at some rate. You have not measured that rate, and measuring it would take dozens of sessions. Until you do, every number…
The Stop Hook in Claude Code and Its Turn Cap
Jul 30 · 2026The session reports that the experiment code is done. The smoke test is red. A Stop hook turns that gap into something the session cannot talk past, within a limit you should know before you rely on it. Per the Claude…
Agglomerative clustering builds a tree out of a dataset from the bottom up. Begin with every observation as its own cluster. Find the two clusters that are least dissimilar, fuse them, and record the dissimilarity as…
Adjusted R² is the usual R² with a charge for every predictor you add. For a least squares model with an intercept and d predictors fit on n observations, James, Witten, Hastie, and Tibshirani write it as 1 − [RSS/(n −…
Agent Teams Cost in Claude Code Plan Mode
Jul 27 · 2026The slug of this note says agent teams cost seven times more. The documented claim is narrower, and the difference matters when you plan compute or explain a budget. Anthropic's cost guide says agent teams use…
You need to migrate 200 experiment configs to a new schema, or move 200 eval tasks onto a new harness API. Claude Code's best-practices guide describes the fan-out pattern: generate a task list, loop claude -p over it…
You keep typing the same experiment recipe: train with this config and seed, evaluate on the fixed 200-case subset, write the results with the commit hash. A reusable skill saves retyping it, and a repo whose…
The slug says run cheap subagents and reserve Opus for the hard part. That is a reasonable hypothesis, not a rule. Finding the file that defines a config key and explaining why a loss curve diverges at step 3,000 both…
Compaction in Claude Code and What It Keeps
Jul 23 · 2026Three hours into chasing a loss spike, you hold ten facts that matter: the seed that reproduces it, the step where it starts, the config hash, the learning-rate change you ruled out, and the commands already run. Then…
Git Worktrees for Parallel Experiments
Jul 22 · 2026You want two agents at once: one refactoring the data loader, one adding an ablation flag. Separate git worktrees give each its own directory and branch, so their edits cannot overwrite each other. Claude Code has this…
LLM Code Review With a Second Model
Jul 21 · 2026Measuring one reviewer means its recall on planted bugs and its precision on real findings. This note asks a different question: does a second reviewer catch what the first one misses? Adding a second model family to…
Checking Agent-Made Plots Beyond the Exit Code
Jul 20 · 2026Claude Code edits the script that draws your results figure. It exits 0. The figure can still be wrong: error bars missing, a legend covering the curve you're discussing, a y-axis that starts at 0.6 and turns a 2-point…
Pointing an Agent at the Exact File and Revision
Jul 19 · 2026Your eval reports 0.71 on a benchmark and the paper reports 0.78. You already suspect the answer normalization in eval/metrics.py, and you have one case where your score and the paper's reference implementation…
Auto Mode vs Sandbox in Claude Code: What Stops What
Jul 18 · 2026An agent running your eval harness reads untrusted text all day: benchmark prompts, scraped pages, other models' outputs. The same machine often holds API keys and unreleased datasets. Before you let it run unattended…
Testing the Commands Claude Code's /init Wrote
Jul 17 · 2026/init drafts a starter CLAUDE.md from the repository; the memory guide says that if one already exists, it suggests improvements instead of overwriting it. Read the draft as two kinds of lines, because each needs…
When to Use Plan Mode if a Change Moves Eval Numbers
Jul 16 · 2026A one-line change to the dedup key between your train and test splits can move every number in the results table. A 200-line refactor of the plotting code usually moves none. Diff length is a poor guide to consequences…
Side Questions in Claude Code and Their Cost
Jul 15 · 2026In a long agent session, every turn you add stays in the context the agent reasons from for the rest of the run. In a dark software factory, where agents run long tasks unattended, keeping that context clean is part of…
AdaBoost turns a crowd of weak classifiers into one strong one by training them in sequence and, after every round, telling the next classifier where the last one failed. A weak classifier is only slightly better than a…
Session Resume and Rewind in Claude Code
Jul 13 · 2026Claude Code has two ways back into earlier work, and neither returns the repo to the state your results came from. Resume brings back the conversation. Per the session documentation, claude --resume ablate-lr restores…
Piping a Failing Run's Log Into Claude Code
Jul 12 · 2026A training run died overnight at step 41,000. Your paraphrase of the traceback ("something about shapes") is less useful than the traceback. The CLI reference shows piped content going straight into a non-interactive…
Claude Agent SDK for Owning the Run
Jul 11 · 2026Running an agent by hand from a terminal is how you try an idea. Running it over 200 eval tasks every night is an experiment, and an experiment needs what a terminal session does not give you: a transcript per task, a…
Model Code Reviewer Recall and Precision, Measured
Jul 10 · 2026Claude Code ships /code-review as a bundled skill. The commands reference says it reviews "the current diff, or a PR number, branch, or path you pass, for correctness bugs." The best-practices guide recommends the same…