Read alongside

The library

The book is written in its own words. These are the sources it leans on. Open-licence sources can be quoted with credit; the rest are summarised in our words and linked, never copied.

Open licence

Vendored pages

Full pages from the open-licence sources, fetched at a pinned commit and shown with author, licence and a link to the original. Run npm run setup to fetch them.

AI Agent book (English edition) Bojie Li · Apache-2.0 · 11 pages · dbc046e
12-Factor Agents HumanLayer (Dex Horthy) · CC BY-SA 4.0 (text), Apache-2.0 (code) · 13 pages · d20c728

Share-alike: this text is licensed CC BY-SA 4.0. Anything adapted from it must credit the author and be released under the same licence. Code samples are Apache-2.0.

Hugging Face Agents Course Hugging Face · Apache-2.0 · 14 pages · 9b3d6b3
Hugging Face MCP Course Hugging Face · Apache-2.0 · 8 pages · dbfa79b
Hugging Face LLM Course Hugging Face · Apache-2.0 · 15 pages · 8b893f0
Prompt Engineering Guide DAIR.AI · MIT · 12 pages · 5767372
GraphRAG documentation Microsoft · MIT · 9 pages · 34b2b67
AI Agents for Beginners Microsoft · MIT · 3 pages · 4bcf574

Best sources, chapter by chapter

01 What AI Engineering Is
Chip Huyen Ch1 ; applied-llms.org applied-llms.org
02 Text as Numbers: Tokenization
CS336 Lecture 1 and Assignment 1 ; Karpathy Zero to Hero karpathy.ai/zero-to-hero.html ; mlabonne §1
03 Embeddings and Vector Space
SLP3 web.stanford.edu/~jurafsky/slp3 ; Chip Huyen Ch3 "Introduction to Embedding" ; Sentence-BERT arxiv.org/abs/1908.10084
04 Language Modeling and Sampling
Chip Huyen Ch2 "Sampling" and Ch3 ; mlabonne §1
05 Transformer Intuition
CS336 Lectures 2–4 ; Karpathy ; Raschka github.com/rasbt/LLMs-from-scratch ; Illustrated Transformer jalammar.github.io/illustrated-transformer ; CS224N web.stanford.edu/class/cs224n
06 Pretraining, Data and Scaling
CS336 Lectures 5–9, 13–14 and Assignments 2–4 ; Chip Huyen Ch2 ; HF Ultra-Scale Playbook huggingface.co/spaces/nanotron/ultrascale-playbook
07 Post-Training and Alignment
CS336 Lectures 15–17 and Assignment 5 ; mlabonne §3–5 ; InstructGPT arxiv.org/abs/2203.02155 ; DPO arxiv.org/abs/2305.18290
08 Reasoning Models and Test-Time Compute
Chip Huyen Ch2 "Test Time Compute" ; mlabonne "Test-Time Compute" ; Berkeley F24 Denny Zhou ; DeepSeek-R1 arxiv.org/abs/2501.12948 ; Lilian Weng "Why We Think" lilianweng.github.io/posts/2025-05-01-thinking
09 Fine-Tuning in Practice
Chip Huyen Ch7–8 ; mlabonne §3–4, §7 ; LoRA arxiv.org/abs/2106.09685 ; QLoRA arxiv.org/abs/2305.14314
10 Inference Mechanics
Chip Huyen Ch9 ; CS336 Lecture 10 ; mlabonne LLM Engineer §6 ; PagedAttention arxiv.org/abs/2309.06180 ; kipply kipp.ly/transformer-inference-arithmetic ; "How to Scale Your Model" jax-ml.github.io/scaling-book
11 Serving, Model Selection and Economics
Chip Huyen Ch4 and Ch10 ; mlabonne "Running/Deploying LLMs" ; Anthropic "Confidential Inference" ; RouteLLM arxiv.org/abs/2406.18665
12 Prompting Fundamentals
Chip Huyen Ch5 ; FSDL "Learn to Spell" ; Berkeley F24 DSPy ; Anthropic prompt docs docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview ; Lost in the Middle arxiv.org/abs/2307.03172
13 Structured Output
Chip Huyen Ch2 "Structured Outputs" ; mlabonne ; OpenAI Cookbook structured-output eval ; Outlines arxiv.org/abs/2307.09702
14 Multimodal and Realtime Voice
Chip Huyen Ch6 "RAG Beyond Texts" ; mlabonne "Multimodal" ; Latent Space Vision/Voice sections (V, headings only).
15 Information Retrieval Foundations
Manning *Introduction to IR* nlp.stanford.edu/IR-book ; SLP3 ; Chip Huyen Ch6 ; DPR arxiv.org/abs/2004.04906 ; ColBERT arxiv.org/abs/2004.12832
16 Vector Search and Indexing
mlabonne "Vector Storage" ; HNSW arxiv.org/abs/1603.09320
17 RAG Pipelines
Chip Huyen Ch6 ; mlabonne RAG ; FSDL askFSDL ; RAG paper arxiv.org/abs/2005.11401 ; Anthropic Contextual Retrieval anthropic.com/news/contextual-retrieval
18 Advanced and Agentic RAG
mlabonne "Advanced RAG" ; Berkeley F24 Jerry Liu ; Anthropic multi-agent research system ; OpenAI Cookbook file and web search ; PromptLayer
19 Evals I: Methodology and Error Analysis
Hamel Evals FAQ ; Chip Huyen Ch3–4 ; CS336 Lecture 12 ; Anthropic "infrastructure noise" ; Hamel "Your AI Product Needs Evals" hamel.dev/blog/posts/evals
20 Evals II: Judges, RAG/Agent Evals and Continuous Evaluation
Hamel FAQ ; Chip Huyen Ch3 "AI as a Judge" ; Anthropic "Demystifying evals for AI agents" and "Eval awareness" ; Berkeley F25 Agent Evaluation ; OpenAI Cookbook tools-evaluation ; "Who Validates the Validators?" arxiv.org/abs/2404.12272 ; τ-bench arxiv.org/abs/2406.12045
21 Tool Use / Function Calling
Anthropic "Writing effective tools" and "Advanced tool use" ; Chip Huyen Ch6 "Tools" ; OpenAI Cookbook function calling ; Toolformer arxiv.org/abs/2302.04761
22 The Agent Loop and Architectures
Anthropic "Building effective agents" anthropic.com/engineering/building-effective-agents , plus the two harness posts ; Berkeley F24 Shunyu Yao and F25 Yann Dubois and Clay Bavor ; Chip Huyen Ch6 ; ReAct arxiv.org/abs/2210.03629 ; Lilian Weng lilianweng.github.io/posts/2023-06-23-agent ; 12-factor agents github.com/humanlayer/12-factor-agents
23 Memory
Anthropic "The components of agent memory" ; Chip Huyen Ch6 "Memory" ; mlabonne ; MemGPT arxiv.org/abs/2310.08560 ; Generative Agents arxiv.org/abs/2304.03442
24 Planning and Reasoning in Agents
Chip Huyen Ch6 "Planning" ; Berkeley F24 Denny Zhou and Yuandong Tian ; Tree of Thoughts arxiv.org/abs/2305.10601 ; Reflexion arxiv.org/abs/2303.11366
25 Multi-Agent Systems
Anthropic multi-agent research system and parallel-Claudes C compiler ; Berkeley F25 Noam Brown and Oriol Vinyals ; Berkeley F24 AutoGen ; OpenAI Cookbook Agents SDK
26 MCP and Agent Protocols
MCP spec modelcontextprotocol.io/specification ; Anthropic "Code execution with MCP", "Desktop Extensions", "Agent Skills" ; mlabonne "Agent Protocols" ; A2A a2a-protocol.org .
27 Context Engineering
Anthropic "Effective context engineering" ; Chip Huyen Ch10 "Enhance Context" ; Lost in the Middle ; PromptLayer, "context engineering" as an interview topic .
28 Coding and Computer-Use Agents
Anthropic Claude Code best practices, harness posts, auto mode, source control ; Berkeley F24 Graham Neubig ; SWE-bench arxiv.org/abs/2310.06770 ; OSWorld arxiv.org/abs/2404.07972
29 Guardrails and Safety
Chip Huyen Ch10 "Guardrails" ; Hamel FAQ "Production" ; Berkeley F24 Ben Mann and Dawn Song
30 Observability
Chip Huyen Ch10 "Monitoring and Observability" ; Anthropic postmortem and quality-report posts ; OTel GenAI opentelemetry.io/docs/specs/semconv/gen-ai ; OpenAI Cookbook trace-based improvement loop ; roadmap.sh FAQ names AI observability .
31 Cost and Latency Engineering
Chip Huyen Ch4, Ch9, Ch10 ; Anthropic prompt caching docs docs.anthropic.com/en/docs/build-with-claude/prompt-caching ; RouteLLM .
32 Deployment and LLMOps
Chip Huyen Ch10 ; FSDL LLMOps and "Launch in an Hour" ; mlabonne "Deploying" ; Anthropic "Scaling Managed Agents" ; Chip Huyen "Building a GenAI Platform" huyenchip.com/2024/07/25/genai-platform.html
33 Security: Prompt Injection and Agent Security
Chip Huyen Ch5 "Defensive Prompt Engineering" ; mlabonne "Securing LLMs" ; Berkeley F25 Safety and Security ; Anthropic "Beyond permission prompts", "How we contain Claude", auto mode ; Simon Willison simonwillison.net/series/prompt-injection ; Greshake et al. arxiv.org/abs/2302.12173 ; CaMeL arxiv.org/abs/2503.18813 ; OWASP genai.owasp.org/llm-top-10
34 Product UX for AI and the Feedback Loop
Chip Huyen Ch10 "User Feedback" ; FSDL "UX for Language User Interfaces" ; Google PAIR pair.withgoogle.com/guidebook ; Microsoft HAX microsoft.com/en-us/haxtoolkit/ai-guidelines .
esc

Narrow with repo:jm layer:eval q:naive mine · ↑↓ to move, enter to open