#ai-foundations
25 posts tagged “ai-foundations”.
-
Sixty lines, no framework: a loop with a step budget, an approval gate before anything irreversible, and its reasoning printed each turn. Then the ways it actually went wrong at step four, and which of them the budget and the gate caught.
-
Tests where the assertion is not equality but good enough. A twenty-case eval harness that fails the build on a real regression, why retrieval and generation have to be scored separately, and where a model judging a model quietly lies.
-
A real fine-tune on a small local model, with the same ten prompts before and after. Why it teaches a manner rather than facts, what the attempt to teach it a fact actually produced, and the local-versus-API decision on privacy and cost.
-
An ordinary service with one non-deterministic dependency. Streaming and perceived latency, the two cost levers that actually matter, retries and logging, a cost ceiling that trips, prompt injection against a service rather than an editor, and what you may legally send to an API.
-
What to measure if you want to know whether an agent is helping: time to a reviewable change, rework rate, token spend, and the kinds of task where it reliably costs more than it saves. A two-week method, and the reason the best-funded attempt at this question could not keep its control group.
-
Which settings belong to the repository and which to the person, who maintains the shared skills once the person who wrote them moves on, how to onboard someone in an afternoon, and why most adoption failures are social rather than technical.
-
An AI coding tool is a loop around a model that can only produce text. What gets assembled and sent, what comes back, who runs the tools, and why the whole thing goes round again — shown in about forty lines of code you can run yourself, against a real repository.
-
The model never runs anything. It emits a structured request, your harness decides whether to honour it, and the result comes back as more text. What a tool definition really is, why a vague description produces wrong calls, and what happens when a tool fails.
-
What the Model Context Protocol actually is, in plain words: the problem it solves, what a server offers, which side your editor is on, what local and remote transports really change, and what crosses the wire — shown on a real handshake.
-
A hundred lines, two read-only tools, connected to a real editor with every message logged. Writing a tool description the model reads correctly, checking the server before you trust it, and why read-only over stdio is the sane default.
-
The protocol says plainly that it cannot enforce security at its own level — so the host must. The attack classes the specification names, in plain words, and a short list of what to actually check before you install somebody else's server.
-
Your message is the smallest part of what gets sent. The assembly order of a real request, why an instruction file is advice the model weighs rather than a rule the system enforces, and what compaction throws away.
-
The difference between asking an agent not to and actually stopping it. Permission prompts, allowlists, deny rules, sandboxes and hooks — which of them depend on your judgement in the moment, and which hold when text in a file tells the agent to do something else.
-
A skill is a folder, not a prompt, and its name and description together are the only thing deciding whether it ever runs. Why loading on demand is a context decision rather than tidiness, and what happens when two skills describe themselves the same way.
-
A subagent is a fresh context with a narrow brief, and that — not parallelism — is the reason to use one. What it can and cannot see, when fanning out saves a long session, and when it just pays to read the same files four times.
-
One real piece of work from first prompt to landed commits, with every mechanism from the two tracks labelled where it fires — what entered context on turn one, what a tool call actually returned, why compaction never bit in seven and a half hours, and the turn where a correct command destroyed a file nobody was thinking about.
-
A language model does one thing: given some text, guess what comes next. What a token is, why the model never looks anything up, what temperature changes, and why it cannot count the letters in a word — with the probabilities printed from a real model.
-
Hallucination is not a bug in the model — it is the mechanism working exactly as designed. What temperature and top-p actually do to the guess, why 'I don't know' is rare, and which of the usual fixes genuinely help, shown on the same question asked five times.
-
A model remembers nothing between turns — your whole conversation is resent every single time. Why that makes a long session slow and expensive, what 'it forgot' really means, and what actually falls out of the window, measured on a real conversation.
-
A model that has only read the internet does not answer questions — it continues text. What pretraining gives you, what post-training adds, why a system prompt works at all, and where the knowledge cutoff comes from, shown on a base model and its instruction-tuned sibling.
-
What a vector actually is, built by hand on ten sentences so you can watch similarity work. Then retrieval in thirty lines with no vector database — and the same code broken on purpose with a bad chunk size, producing a confidently wrong answer.
-
Parameters, context length, price per million tokens, tokens per second, and what a reasoning model actually changes. How to read a benchmark score without being misled, and one real task costed across three models.
-
Four short series explaining how these systems actually work — what the model is doing, what your coding tool is doing around it, how to work with it day to day, and how to ship it in your own product. Which one to read depends on what surprised you.
-
Every snippet in the AI Foundations series runs on an ordinary laptop with no GPU, no API key and no cloud account. Here is the ten-minute setup, what gets downloaded, where it lands, and how to get the disk space back.
-
Seventy words you need before any other AI writing makes sense — token, context window, embedding, context engineering, tool call, MCP, agent, eval, prompt injection and the rest — each in one sentence with one concrete example, grouped by the thing you are trying to understand.