Part 4: Building with them

The goal of this part is production systems rather than demos.

Under construction

This arc is being written. The list below is what it will cover, and it may still change.

  1. Embeddings and retrievalEmbedding models, vector similarity, and vector databases. Retrieval augmented generation built up from the actual problem it solves. Chunking strategies, hybrid search, reranking. Why naive RAG demos work and naive RAG products do not.
  2. Tool use and agentsFunction calling as a mechanism rather than a feature. The loop underneath every agent framework, written out in about thirty lines so you can see there is no magic in it. Planning, error recovery, and why agents fail in the middle rather than at the start.
  3. Running modelsMemory arithmetic: how to work out whether a model fits on your hardware before downloading 40 GB. Quantization and what precision you actually lose. KV caching, batching, and throughput. Running models locally, and when that beats an API on cost.
  4. Failure modesHallucination explained mechanically rather than as a mystery. Prompt injection and why it is a structural problem rather than a bug to be patched. Cost and latency budgets. Monitoring a system whose output you cannot check with an assertion.