Writing
How an agent harness works
ExplainerAn agent is a model plus a harness: everything around it that decides what it sees, what it can do, what it remembers and what you can check afterwards.
5 stepsHow agent loops work: the loops around the loop
ExplainerEvery agent runs a loop of model calls and tool calls. Loop engineering adds the loops around it: one that checks the work, one that starts runs, one that improves the agent, and rules for when each stops.
5 stepsHow agent graphs work: nodes, edges and safe cycles
ExplainerA graph makes an agent's control flow explicit: steps are nodes, allowed next steps are edges, and shared state moves along them. Here is my research agent drawn as one, and when not to draw one.
Nov 1, 2026When does LoRA fine-tuning beat a good prompt? I measured the crossover
ArticleA 1.5B model fine-tuned with LoRA against a larger model prompted with examples, on the same 100, 500 and 2,000 labeled examples. The prompt won easily at 100; at 2,000 the small model was 2 points behind, within noise, at 1/29 of the input.
Nov 1, 2026What actually stops prompt injection? I tested four defenses
ArticleI planted 36 injections in the documents a tool-using assistant reads. Undefended, 42% worked; a one-paragraph warning cut that to 6%. One fake policy update beat every defense I tested, and the strongest filter cost the answers.
5 stepsHow prompt injection works, and what actually stops it
ExplainerI planted 36 injections in a tool-using assistant's documents and measured four defenses, alone and together. A warning in the prompt stopped most of them; one fake policy update beat all of them; the safest designs cost answers.
Nov 1, 2026Does hybrid search plus reranking pay for itself? I measured my RAG pipeline
ArticleI took my RAG service apart stage by stage on 1,008 labeled questions. The biggest gain was a one-line tokenizer fix, the reranker reorders more than it finds, and hybrid fusion added nothing significant until BM25 was fixed, and even then only at depth 10.
5 stepsHow hybrid search and reranking work, measured on my RAG pipeline
ExplainerBM25, dense vectors, Reciprocal Rank Fusion and a cross-encoder, one stage at a time, with what each one added on 1,008 labeled questions.
Oct 31, 2026Does a four-agent loop beat a single LLM call? I measured it
ArticleOn 100 multi-hop questions, my research agent answered 86% correctly against 74% for one retrieve-and-answer call, at about 6× the calls. Where the gain comes from, where it loses, and what I'd change.
5 stepsHow an LLM request is served: prefill, decode and the KV cache
ExplainerWhy the first token is slow and the rest stream, what fills GPU memory, and how batching and quantization make serving cheaper.
5 stepsLong context or RAG? What models actually use
ExplainerMillion-token windows didn't make retrieval obsolete. Where models lose track of long prompts, what each approach costs, and how to choose.
5 stepsHow structured outputs work: constrained decoding
ExplainerWhy “reply in JSON” sometimes fails, how a schema becomes a mask over the model's next-token choices, and why valid JSON can still be wrong.
5 stepsHow RLHF works
ExplainerReinforcement learning from human feedback, stage by stage: demonstrations, comparisons, a reward model, PPO with a KL leash, and reward hacking.
5 stepsHow DPO works, and when to use it instead of RLHF
ExplainerDirect Preference Optimization turns RLHF's reward model and RL loop into one loss on preference pairs. The math, the trade-offs and when to choose it.
5 stepsHow to evaluate an LLM app
ExplainerTest cases, scoring, version comparisons and a release gate: measuring quality instead of guessing.
6 stepsHow RAG works
ExplainerRetrieval-augmented generation, step by step: from splitting documents to an answer with sources.
5 stepsHow AI agents work
ExplainerAn agent is a language model in a loop: plan, call a tool, read the result, decide again.
5 stepsHow MCP connects AI apps to tools
ExplainerThe Model Context Protocol, step by step: discovery, tool calls, and why one server works in every app.
5 stepsHow fine-tuning with LoRA works
ExplainerWhy LoRA trains a fraction of a percent of the weights and still adapts a model.
5 stepsHow transformers and attention work
ExplainerWhat happens inside a large language model: tokens, embeddings, attention and next-token prediction.
4 stepsHow embeddings and vector search work
ExplainerHow meaning becomes coordinates, and how a search finds the closest ones fast.
5 stepsHow neural networks learn
ExplainerForward pass, loss, backpropagation and gradient descent, drawn one step at a time.
5 stepsHow diffusion models generate images
ExplainerImage generators learn to remove noise, then start from pure noise and clean it up step by step.
5 stepsHow a web request is served
ExplainerLoad balancing, caching and the database: the path most web requests take.
5 stepsHow database indexes work
ExplainerWhy an index turns a full table scan into a few reads, and what it costs on every write.
5 stepsHow Docker containers work
ExplainerDockerfile, layers, caching, containers and registries: how one image runs the same everywhere.
Other notes
General problem-solving methods and a talk summary, outside the main AI set.
How to break down a big problem
ExplainerSplit a vague problem into parts that add up to the whole, until each part is small enough to check and fix.
5 stepsHow to find the root cause of a problem
ExplainerAsk why, answer with facts, and keep going until you reach a cause you can change, so the problem doesn't come back.
5 stepsHow to find what broke by halving
ExplainerWhen something worked before and doesn't now, test the middle and throw away half the suspects each time.
5 stepsHow to find the bottleneck
ExplainerA process runs only as fast as its slowest step. Find that step, improve it, then look for the next one.
5 stepsHow to decide what to fix first
ExplainerCount the problems, sort them, and you usually find a few causes behind most of the trouble.
5 stepsHow to solve problems with small experiments
ExplainerGuess, test small, measure and adjust. Many cheap loops find a good answer faster than one big plan.
6 stepsHow AI is changing software development
ExplainerFrom autocomplete to agents that ship whole features: specs, conducting, context and loops, how models run, and keeping agents safe.