Skip to content
Short form
Prof Rod Avatar

Notes

Short notes on building and checking AI applications, one idea, failure or check at a time.

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…

machine-learningstatistics

Pearson'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…

machine-learningstatistics

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…

machine-learningoptimization

In 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…

agentscontext-management

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…

machine-learningstatistics

Chi-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…

machine-learningstatistics

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…

machine-learningcalculus

In 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…

promptingreasoning

The 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…

machine-learningsvm

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…

inferencedecoding

A 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…

deep-learningimage-classification

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…

machine-learninggeneralization

The 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…

machine-learningevaluation

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…

tokenizationtranslation

Boosting 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…

machine-learningensembles

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…

algorithmsmachine-learning

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…

machine-learningstatistics

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…

machine-learningstatistics

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…

machine-learningstatistics

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…

machine-learninginformation-theory

Adam'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…

optimizationdeep-learning

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…

machine-learningstatistics

A 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…

reinforcement-learningpreferences

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…

deep-learningimage-classification

The 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…

statisticsresampling

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…

mixture-of-expertstraining

For 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…

optimizationtraining

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…

nlptokenization

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…

deep-learningbackpropagation

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…

machine-learningmodel-selection

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…

machine-learningevaluation

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…

privacylanguage-models

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…

calibrationevaluation

You 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…

transformersattention

Imagine 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…

reasoningdecoding

You 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…

scaling-lawspretraining

A 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…

fine-tuningtraining

A 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…

inferenceserving

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…

post-trainingpreference-learning

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…

evaluationcode-generation

Solve 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…

reasoningverification

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…

trainingdistillation

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…

alignmentreward-models

Imagine 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…

evaluationreinforcement-learning

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…

evaluationstatistics

A 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…

anthropicfellowships

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…

machine-learningstatistics

The 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…

statisticsestimation

Training 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…

trainingrecurrent-networks

A 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…

machine-learningprobability

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…

machine-learningprobability

Bayes 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…

machine-learningprobability

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…

deep-learningoptimization

Pruning 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…

pruningtraining

During 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…

transformersattention

Bagging 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…

machine-learningensembles

An 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…

openaievaluation

A 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…

openaievaluation

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…

machine-learningensembles

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…

codexcode-review

"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…

codexautomation

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…

machine-learningevaluation

A 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…

codexskills

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…

deep-learningneural-networks

A 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…

claude-codetesting

Two 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…

claude-codedependencies

A 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…

claude-codeconfiguration

You 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…

claude-codedata-quality

A 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…

claude-codefile-operations

A 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…

claude-codeauthentication

One 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-codescheduling

After 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…

claude-codereliability

A 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…

openaievaluation

A 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…

long-contextretrieval

An 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…

openailatency

An 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…

openailatency

A 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…

openaibatch-processing

Scoring 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…

openaibatch-processing

Grading 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…

openaiprompt-caching

Overfitting 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…

machine-learningevaluation

Your 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…

openaitool-calling

A 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…

openaitool-calling

"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…

openaitool-calling

A 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."…

openaitool-calling

An 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…

openaiprompting

A 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…

openaiprompting

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…

openaiprompting

A 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…

openaievaluation

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…

openaievaluation

OpenAI'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…

openaistructured-output

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…

openaievaluation

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…

transformersattention

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…

codexcode-review

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…

codexskills

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…

codexautomation

You 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…

codextesting

A 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…

codexskills

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…

transformersattention

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…

machine-learningregression

Fixing 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…

codexpermissions

"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…

codexcode-review

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…

retrievallanguage-models

A 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…

codexautomation

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…

statisticsdata-visualization

A 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…

codexautomation

Codex 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…

codexworktrees

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…

machine-learningmathematics

Before 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…

codexinstructions

You 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…

claude-codecode-review

In 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…

claude-codedata-quality

A 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-codecost

A 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-codeconfiguration

Say 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…

claude-codehooks

You 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…

claude-codemcp

An 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…

claude-codepermissions

Your 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…

claude-codeverification

Your 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…

claude-codedebugging

Renaming 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…

claude-codefile-operations

"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…

claude-codetesting

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…

claude-codedata-quality

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…

claude-codeverification

The 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-codecontext

Three 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…

claude-codecontext

Finding 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…

claude-codecontext

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…

post-trainingalignment

"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-codepractice

A 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…

claude-codeverification

The 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…

claude-codeverification

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…

machine-learningclustering

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 −…

machine-learningregression

The 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…

claude-codeeconomics

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…

claude-codepractice

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…

claude-codepractice

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…

claude-codeeconomics

Three 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…

claude-codecontext

You 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…

claude-codepractice

Measuring 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…

claude-codeverification

Claude 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…

claude-codeverification

Your 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…

claude-codecontext

An 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…

claude-codesecurity

/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…

claude-codesetup

A 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…

claude-codepractice

In 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…

claude-codecontext

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…

machine-learningboosting

Claude 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…

claude-codepractice

A 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-codepractice

Running 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…

claude-codepractice

Claude 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…

claude-codeverification