Phase 1Start here

AI Fundamentals

  1. 01
    8 min read

    What Is an LLM and How Does It Actually Work?

    Move past the 'magic box' misconception and understand LLMs as probabilistic prediction engines through the lens of an engineer.

  2. 02
    12 min read

    Tokens, Context Windows, and Why They Matter

    Understand what an LLM actually sees, how text becomes tokens, and why context windows become an engineering constraint in production AI systems.

  3. 03
    24 min read

    Embeddings Explained: The Building Block Behind Semantic Search

    Why keyword search misses questions phrased differently from your docs, how embeddings turn meaning into vectors you can compare, and where similarity search quietly gets things wrong.

  4. 04
    17 min read

    Vector Databases Explained: What Problem Are They Solving?

    Why comparing a query with every vector stops scaling, how indexes like HNSW trade a little accuracy for a lot of speed, and the filtering trap that a vector database exists to handle.

  5. 05
    18 min read

    Prompt Engineering: Beyond Writing Better Prompts

    Why "you are a world-class expert" and "never make anything up" didn't fix a support assistant, what did, and how to test a prompt like the interface it really is, with measured results from two local models.

  6. 06
    15 min read

    Temperature, Top-P, and Other LLM Parameters Explained

    What temperature, top-k, top-p, min-p, seeds, max tokens, and stop sequences actually do, checked against a real model's token choices, and why temperature 0 made a support assistant consistent but not correct.

  7. 07
    14 min read

    Structured Outputs: Making LLMs Produce Reliable Data

    Asking for JSON, JSON mode, and schema-enforced structured outputs, measured on the same support assistant: what a schema guarantees, what it doesn't, and what your code still has to check.

  8. 08
    15 min read

    Function Calling and Tool Use in LLMs

    How a model asks to call a function, why that request is just structured output, and what goes wrong when the output can do something: measured on a support assistant with refund and email tools.

  9. 09
    16 min read

    Why LLMs Hallucinate, and What Engineers Can Do About It

    Why language models produce confident, specific, wrong answers, the kinds of hallucination our own experiments caught, and the engineering that catches them: decline paths, grounding, checks in code, and evaluations that reward 'I don't know'.

  10. 10
    14 min read

    How LLM Inference Works

    What happens between sending a prompt and receiving the answer: prefill, decode, the KV cache, and prompt caching, measured on a local model, and what they mean for latency, memory, and cost.

Phase 2

AI Applications

  1. 11
    12 min read

    Building Your First LLM-Powered Application

    The model is one component, not the product. The same model as a three-line passthrough and inside a small application, on ten realistic inputs a support assistant might receive, and the layers that decide what users actually see.

  2. 12
    18 min read

    RAG Explained: How AI Systems Work With Your Data

    Retrieval-augmented generation, measured: the same support assistant answers 30 questions with the whole help center in the prompt and with only the articles retrieval picks, showing what fits, what it costs, and what still breaks.

  3. 13
    16 min read

    RAG vs Fine-Tuning: When Should You Use Which?

    A real fine-tune against retrieval, on the same small model and the same questions: what each one actually teaches, what happens when a fact changes, and how to decide which one a problem needs.

  4. 14
    18 min read

    Designing a Production-Ready RAG Pipeline

    The same RAG assistant, with a pipeline around it: a versioned index, one deadline per request, a relevance gate, and a trace for every request. Then we break it on purpose and measure what each piece does.

  5. 15
    15 min read

    Chunking Strategies for RAG: What Actually Matters?

    Five long documents, nine ways to split them plus a whole-document baseline, and one fair comparison: does the passage that answers the question reach the model, within the same token budget? Then: do better chunks give better answers?

  6. 16
    14 min read

    Retrieval Strategies: Vector Search, Keyword Search, and Hybrid Search

    The same chunks, the same token budget, five ways to rank them: vector search, two flavours of BM25, and two hybrids. What each one finds that the others miss, and what combining them costs.

  7. 17
    12 min read

    Reranking: Improving Retrieval Quality

    Finding candidates and choosing the best of them are different problems. A second stage that reads the question and each candidate together: what it fixed, what it broke, what it can never recover, and what it costs.

  8. 18
    19 min read

    Building Reliable LLM Pipelines

    When one model call becomes several in a row, the system needs state, checks, retries, and a plan for failure. A measured look at how errors compound, what checks between steps catch and miss, what retries fix, and what a crash costs.

  9. 19
    16 min read

    Streaming LLM Responses: Why and How

    Streaming shows a reply while it is being written, but only if every step between the model and the screen passes it on. Measured on a local model: when the first words appear, how a buffering proxy erases that, what happens when the user leaves, and what checks on streamed text show or withhold.

  10. 20
    23 min read

    Managing Conversation State in AI Applications

    A model keeps no conversation between calls. Measured on a local model: what resending the history costs, how an oversized conversation is silently truncated, and which facts survive four conversation-state strategies.

Phase 3

AI Agents

  1. 21
    23 min read

    What Is an AI Agent?

    A practical engineering definition, built from a real trace: a support assistant whose code already ran an agent loop, and a question that needed several steps it never took. What an agent is made of, what handing the next step to a model costs, and when you don't need one.

  2. 22
    11 min read

    LLM Applications vs AI Agents: What's the Difference?

    The same refund question answered by an application and by an agent: where the boundary between them falls in real systems, why it can run between two decisions in the same workflow, and what changes when control moves from your code to the model.

  3. 23
    16 min read

    Tools, Function Calling, and the Foundation of AI Agents

    To an agent, a tool is everything it reads: a description, a schema, a result, an error, and the prompt template that presents them. The same agent, measured with three toolsets: what changed when the tools' results got richer, and when a decision moved into a tool.

  4. 24
    13 min read

    Agentic Workflows: When Should an LLM Control the Flow?

    The same support assistant as a fixed workflow, an agent, and a hybrid of the two, measured on twelve questions: what each control flow got right, what it cost, and why the hybrid never got to use its agent.

  5. 25
    16 min read

    Single-Agent vs Multi-Agent Systems: What Does Another Agent Add?

    The same support assistant as one agent, as a manager with two specialist agents, and as an agent with a reviewer, measured on twelve questions: what each extra agent added, what it lost in the handoff, and what it cost.

  6. 26
    15 min read

    Memory in AI Agents: What Does an Agent Actually Need to Remember?

    The same support assistant with no memory, full transcripts, summaries, or structured notes of earlier conversations, measured on ten questions: what memory helped with, what it got wrong, and what happened when it disagreed with the current records.

  7. 27
    27 min read

    Planning, Reasoning, and Execution in AI Agents: Who Decides the Steps, and When?

    The same support assistant with a fixed workflow, a step-by-step agent loop, a plan written up front, and a plan revised after each batch of tool results, measured on nine support requests, from one step to several: where planning failed, where reasoning failed despite the right evidence, and what replanning cost.

  8. 28
    26 min read

    Building AI Agents With State and Workflows

    The same refund assistant as an agent loop whose task progress lives only in its message list, and as a state machine whose case record is owned by code, measured on six scenarios and a crash: which refunds each one made, what its replies claimed, and where a restarted run picked up.

  9. 29
    23 min read

    Human-in-the-Loop AI Agents: When Should an Agent Stop and Ask?

    The support assistant gets a refund tool that only runs after a person approves it. What the pause has to save, what the reviewer needs to see, what happens when nobody answers, and, measured on eight requests, what the checkpoint caught and what the agent told the customer while it waited.

  10. 30
    33 min read

    Why AI Agents Fail: Common Failure Modes and Design Patterns

    An agent fails at its boundaries: the request, the model's decisions, tool execution, reading results, controlling the run, side effects, and what it reports. The failures from this series, sorted by boundary, then measured: 543 recorded conversations replayed through the guards earlier articles recommended, to see what each would have stopped, what correct work it would have stopped too, and which failures pass every one.

Phase 4

Production AI

  1. 31
    22 min read

    What Changes When an AI Prototype Goes to Production?

    A prototype proves an idea can work; production makes it safe to depend on. One support assistant in three versions: a passthrough, a small application that owns its failures, and the questions that application still can't answer, found by nine probes run against it. What changes is who is responsible for what.

Outside the series

AI Tooling

Hands-on notes on specific AI tools and frameworks, such as LangChain, LangGraph, and Langfuse.

  1. 16 min read

    LangChain: What It Gives You and What It Hides

    A logging proxy between LangChain and Ollama, and every request compared with the same call written by hand: what ChatOllama sends, what it silently drops or ignores, what structured output does when the reply is wrong, what it does on errors, and what the abstraction costs.

  2. 14 min read

    Langfuse: Tracing and Evaluating an LLM Application

    A small LLM application traced with a self-hosted Langfuse, and every claim checked by reading the data back: what a trace contains, what tracing costs per request, what happens to your application and your traces when Langfuse is down, how evaluation scores are stored, and which masking hook actually masks.

  3. 20 min read

    LangGraph in Practice: A Text-to-SQL Agent You Can Measure

    A Text-to-SQL agent built with LangGraph and measured on 30 questions with known answers: what its repair loop fixed (nothing), what kept the database safe, and what LangGraph itself adds: streaming, human approval, checkpoints, and a recursion limit.

  4. 14 min read

    MCP: Giving a Model Your Own Tools and Data

    An MCP server for a delivery fleet, a host that connects it to small local models, and every JSON-RPC message recorded: what the protocol standardises and what it leaves to you, how often the models used the tools correctly, what an injected instruction did, and what each transport costs.

  5. 15 min read

    Ollama for Development: Running Local Models Reproducibly

    Temperature 0 and a fixed seed don't make a local model's replies reproducible on their own. Measured with Ollama and two small models: how hardware, concurrent requests, the prompt cache, and context limits change replies, and how one endpoint silently cut a long request.

  6. 20 min read

    OpenUI: Letting a Model Answer With an Interface

    OpenUI gives a model your components and a compact language to arrange them. Measured with two small local models against schema-constrained JSON: what the token saving really is, how often the replies are valid, what the parser accepts without a word, and when streaming helps.