Recommended Reading Order
This book is the first of six that used to be one large “Agentic AI Engineering” book. Each is now self-contained and cross-links to its siblings instead of duplicating them — read in this order for the full learning journey, or jump straight to whichever book matches what you need right now:
- AI & LLM Foundations (this book) — the pre-agentic substrate and turning a raw model API into a dependable component.
- Agentic AI Engineering — agent cognition, memory, planning, tools, retrieval, and context engineering.
- Building & Evaluating Agents — single- and multi-agent systems, evaluation, and the framework landscape.
- Production Agent Systems — infrastructure, observability, reliability/security, performance/cost, and platform engineering.
- AI Architecture & System Design — the cross-cutting pattern catalog and enterprise system-design case studies.
- Agentic AI: Projects & Engineering Mastery — hands-on builds, Principal/Staff-level judgment, and the reference appendices.
AI & LLM Foundations
The pre-agentic substrate for Principal & Staff Engineers (L6/L7)
If this were a book, this page is the table of contents. The pre-agentic substrate: how we got from symbolic AI to transformers, and the vocabulary (tokens, embeddings, attention, foundation models) every later book assumes without re-explaining — then turning a raw model API into a dependable application component. Each chapter links out to the framework, platform, and SRE notes that already exist elsewhere in this wiki instead of duplicating them. Unwritten chapters are listed as stub rows, not empty files.
Parts
00 — Foundations of Modern AI
The pre-agentic substrate: how we got from symbolic AI to transformers, and the vocabulary (tokens, embeddings, attention, foundation models) every later Part assumes without re-explaining. Closes with the mathematical intuition — probability, sampling, and vector geometry — engineers use every day without necessarily having derived.
- Chapter 1. The Evolution of Artificial Intelligence — Traces the arc from symbolic AI and expert systems through statistical ML, deep learning, and the scaling-law-driven emergence of foundation models, framing why agentic AI is the current inflection point rather than a fresh discipline.
- Chapter 2. Machine Learning Fundamentals — Covers supervised vs. unsupervised vs. reinforcement learning, the bias-variance tradeoff, loss functions, and gradient descent as the fundamentals that still govern how modern LLMs are trained and fine-tuned.
- Chapter 3. Deep Learning Essentials — Covers neural network building blocks — layers, activation functions, backpropagation, regularization, and optimizers — as the substrate transformers are built on.
- Chapter 4. Transformer Architecture — Breaks down the encoder-decoder transformer — self-attention, multi-head attention, positional encoding, and feed-forward blocks — and why this architecture displaced RNNs and LSTMs.
- Chapter 5. Tokens, Embeddings & Attention — Explains how raw text becomes tokens, how tokens become dense embedding vectors, and how attention computes contextual relevance between them.
- Chapter 6. Context Windows & Tokenization — Covers tokenizer algorithms (BPE, WordPiece, SentencePiece), context window sizing and its quadratic attention-cost tradeoff, and practical strategies for working within a fixed context budget.
- Chapter 7. Foundation Models — Defines what makes a model foundational — pretraining scale, transfer learning, and emergent capabilities — and surveys major foundation model families.
- Chapter 8. Large Language Models — Covers the LLM training pipeline end to end — pretraining, supervised fine-tuning, and RLHF/DPO alignment — and the resulting capability, cost, and latency tradeoffs.
- Chapter 9. Reasoning Models — Covers chain-of-thought and inference-time compute scaling in reasoning models, and when the added latency and cost is actually justified.
- Chapter 10. The AI Ecosystem — Maps the current AI ecosystem — model providers, orchestration frameworks, vector databases, evaluation tooling, and inference infrastructure.
- Chapter 11. Probability, Sampling & Decoding — The math underneath every model call: output probability distributions, temperature and top-p/top-k sampling, why beam search lost to sampling for chat models, entropy as a live uncertainty signal, and KL divergence as the distance metric behind RLHF/DPO alignment.
- Chapter 12. Vector Geometry & Similarity — The geometric intuition behind embeddings — cosine similarity vs. Euclidean distance, why high- dimensional vector spaces behave counter-intuitively, and how this underlies every retrieval and memory chapter in this book.
01 — Language Models in Practice
Turning a raw model API into a dependable application component. See
3-references/AI/llm-engineering-layers.md for a working harness/context/prompt three-layer model
with real code — this Part covers the same ground at book depth.
- Chapter 1. Prompt Engineering Fundamentals — Covers the core levers of prompt construction — instruction clarity, few-shot exemplars, system vs. user role separation, and sampling controls.
- Chapter 2. Prompt Design Patterns — Catalogs reusable prompt patterns — chain-of-thought, ReAct, self-consistency, and role/persona framing.
- Chapter 3. Structured Outputs — Covers forcing an LLM into a validated schema and the failure modes, like schema drift, that break naive implementations.
- Chapter 4. Function Calling — Covers how models select and populate function signatures from natural language, and pitfalls like parameter hallucination.
- Chapter 5. Tool Calling — Extends function calling into multi-tool agent design — tool registries, tool-choice strategies, parallel vs. sequential invocation.
- Chapter 6. Streaming Responses — Covers server-sent events and token-streaming architectures, and how streaming interacts with structured-output validation.
- Chapter 7. Model Selection & Routing — Covers building a model router that picks among providers and tiers by task complexity, latency SLA, and cost.
- Chapter 8. Hallucination Management — Covers the mechanisms behind LLM hallucination and mitigation strategies like grounding via RAG and confidence-calibrated refusal.
- Chapter 9. AI Failure Modes — Surveys production failure modes beyond hallucination — prompt injection, context poisoning, tool-call loops, cascading errors in multi-agent chains.
- Chapter 10. Building Reliable LLM Applications — Covers the engineering practices that turn a probabilistic model call into a reliable system component.
Metadata
| Author | Amit Singh |
| Scope | ai-foundations |
Local graph
Linked from 25 notes
Notes — Library Index
The front page of the notebook — every book-shaped domain, the applied Projects and flat Inbox folders, and how they cross-link into one wiki instead of duplicating content across each other.
Agentic AI Engineering
A book-shaped table of contents for Agentic AI Engineering: where 'LLM application' becomes 'agent' — introduction to agentic AI, agent cognition, memory systems, planning & reasoning algorithms, tools & environment interaction, retrieval & knowledge systems, and context engineering. Book 2 of the AI Systems Engineering series.
Agentic AI: Projects & Engineering Mastery
A book-shaped table of contents for Agentic AI: Projects & Engineering Mastery: hands-on practitioner builds, Principal/Staff-level technical leadership, and the lookup appendices and vendor/framework reference notes for the whole series. Book 6 of the AI Systems Engineering series.
1. The Evolution of Artificial Intelligence
Traces the arc from symbolic AI and expert systems through statistical ML, deep learning, and the scaling-law-driven emergence of foundation models, framing why agentic AI is the current inflection point rather than a fresh discipline.
2. Machine Learning Fundamentals
Covers supervised vs. unsupervised vs. reinforcement learning, the bias-variance tradeoff, loss functions, and gradient descent as the fundamentals that still govern how modern LLMs are trained and fine-tuned.
3. Deep Learning Essentials
Covers neural network building blocks — layers, activation functions, backpropagation, regularization, and optimizers — as the substrate transformers are built on, explained from first principles for a staff-level interview bar.
4. Transformer Architecture
Breaks down the encoder-decoder transformer — self-attention, multi-head attention, positional encoding, and feed-forward blocks — and why this architecture displaced RNNs and LSTMs as the default for sequence modeling at scale.
5. Tokens, Embeddings & Attention
Explains how raw text becomes tokens, how tokens become dense embedding vectors, and how the attention mechanism computes contextual relevance between them — the three concepts most commonly conflated in interview answers.
6. Context Windows & Tokenization
Covers tokenizer algorithms (BPE, WordPiece, SentencePiece), context window sizing and its quadratic attention-cost tradeoff, and practical strategies — chunking, sliding windows, summarization — for working within a fixed context budget.
7. Foundation Models
Defines what makes a model foundational — pretraining scale, transfer learning, and emergent capabilities — and surveys major foundation model families and the positioning tradeoffs between them.
8. Large Language Models
Covers the LLM training pipeline end to end — pretraining, supervised fine-tuning, and RLHF/DPO alignment — and the resulting capability, cost, and latency tradeoffs an architect weighs when picking a model for production.
9. Reasoning Models
Covers chain-of-thought and inference-time compute scaling in reasoning models, how they differ architecturally and operationally from standard next-token LLMs, and when the added latency and cost is actually justified.
Related notes
Observability Engineering
A book-shaped table of contents for observability engineering: foundations through architecture, metrics, logging, tracing, profiling, OpenTelemetry, instrumentation, Kubernetes/cloud, data platforms, visualization, alerting, SRE integration, cost, security, platform engineering, AI-driven operations, and MAANG interview preparation — cross-linking existing prometheus/grafana-cloud/kubernetes/sre/platform-engineering notes instead of duplicating them.
Kubernetes
A book-shaped table of contents for Kubernetes: cloud-native foundations, the CKAD/CKA/CKS certification tracks, control-plane internals, platform tooling, multi-cluster architecture, and MAANG-level system design and interview prep — cross-linking the existing Prometheus, Observability, and Platform Engineering chapters instead of duplicating them.
Site Reliability Engineering: From Foundations to Internet-Scale Systems
The complete 184-chapter, 15-part Site Reliability Engineering curriculum — from Linux internals and distributed-systems theory through reliability engineering, observability, incident response, platform engineering, and Staff/Principal-level MAANG interview preparation, ordered the way SRE expertise actually develops rather than as a topic index.
Aptitude
A book-shaped table of contents for aptitude test prep: quantitative aptitude, logical reasoning, verbal ability, and mock-test strategy for the aptitude rounds that still gate MAANG-adjacent hiring pipelines.