av / dives
source about me

AI Engineering: Deep Dives

A series of hands-on, build-it-from-scratch courses for learning to build with LLMs. Each one is a standalone repository you walk through: every concept is a small, runnable Python script, every section ends with something to run, and the first runnable thing in most repos is offline and free. No frameworks, no magic and just enough code to see how each piece works.

They share one house style: provider-agnostic where it makes sense (OpenAI or Claude, often a local model too), offline-first examples, a real capstone, and an EXERCISES.md with predict-then-run prompts. Assumes only basic Python.

The core pathdo these in order
01

OpenAI API

You send a list of messages. You get back a message. Everything else is detail on that request.

02

Claude API

The same idea, the Anthropic way: content blocks, tool use, and extended thinking.

03

Prompt Engineering

Shape what the model does with how you ask: zero/few-shot, chain-of-thought, roles, structure.

04

RAG

A model can only answer from what is in its context window. RAG is the discipline of putting the right text there.

05

Evals

If you cannot measure it, you cannot improve it: turn quality into a number you can rerun.

06

Agents

An agent is a loop: the model picks a tool, you run it, you feed the result back, until it is done.

07

Prompt Injection & Guardrails

Treat everything the model reads and writes as untrusted: contain the blast radius.

08

Production

The model call is one line. Production is the dozen lines around it that make it safe, cheap, observable, and reliable.

Bonus divesstandalone, each notes where it slots in
BONUS

Agent Harnesses

Once you have hand-written the loop, most agent work is building on a harness: hooks, permission policies, sandboxing, subagents, and headless runs.

Slots in after Agents (6)
BONUS

Context Engineering

The model only knows what is in its context window, so manage it: conversation memory, compaction, long-term recall, and what to drop when it will not all fit.

Slots in after Agents (6), pairs with RAG (4)
BONUS

Multimodal

A multimodal model takes more than text: images and audio. Put the right modality in the right slot, and mind the token cost.

Slots in after the API dives (1-2), pairs with RAG (4)
BONUS

Realtime Voice

Conversational voice is a low-latency, full-duplex loop: stream audio both ways, handle interruption, and choose a pipeline vs a speech-to-speech model.

Slots in after Multimodal, the API dives (1-2)
BONUS

Fine-tuning

Fine-tuning changes how a model behaves, not what it knows: teach behavior by example, then prove it beat your baseline.

Slots in after RAG (4) + Evals (5)
BONUS

MCP

The Model Context Protocol: hand an LLM tools, data, and prompts from a separate process. Write the server once, any client can use it.

Slots in after Agents (6)
BONUS

Local Models

An open-weight model on your machine speaks the same OpenAI API, so local is mostly an ops choice: privacy, cost, control.

Slots in after the API dives (1-2), pairs with Fine-tuning
BONUS

Observability

A prototype is judged once; a production system is judged continuously. Watch quality as a trend: drift, silent regressions, and alerting that does not cry wolf.

Slots in after Production (8), pairs with Evals (5)
BONUS

Professional Tools

Volume 2: rebuild each from-scratch primitive with the tool professionals actually reach for, and measure both on the same eval.

Slots in after everything (you need the primitives first)
Capstoneeverything at once
END

Capstone: askrepo

One codebase Q&A tool built across eight eval-gated stages, from a first retrieval pass to a hardened, observable app.

Referencethe shared docs