Concept library
42 deep-dives across 8 categories. Each concept covers mental model, formal definition, concrete code example, common misconception, red flags if skipped, and primary citations (RFC / paper / vendor docs).
Foundations
0/8 authoredTokens & tokenization
The unit LLMs actually see — and how to count them before your bill hits.
Context window
How much the model can 'see' at once — and what fills it silently.
Temperature & sampling
Why the same prompt gives different outputs — and how to control randomness.
Streaming responses
Why every good LLM UI streams — and the mechanics behind it.
Chat Completions vs Responses APIs
The two API shapes and when each applies (OpenAI's 2024 API split, Anthropic Messages, Gemini generateContent).
Rate limits — TPM, RPM, and 429s
How LLM providers meter you — and the client-side patterns that survive throttling.
Transformer architecture (in 15 minutes)
Attention, KV cache, autoregressive decoding — the minimum theory for a builder.
Embeddings — vectors that mean something
Why 'king - man + woman = queen' is real math — and how you use it in production.
Prompting
0/6 authoredSystem prompts
Persona, constraints, output shape — the seat of the model's behavior.
Zero-shot vs few-shot prompting
When examples earn their tokens — and when they poison your output.
Chain-of-thought prompting
Wei et al. 2022 — the two-word trick that unlocked reasoning.
Structured outputs & JSON mode
How production systems get exact-shape output every time.
Function calling / tool use
The primitive that turns an LLM into an agent.
Prompt versioning & A/B testing
Prompts are code — version, deploy, roll back, evaluate.
RAG
0/6 authoredChunking strategies
Fixed-size, semantic, hierarchical — the choice that makes or breaks retrieval.
Vector search & approximate nearest neighbors
HNSW, IVF, ScaNN — the algorithms that make similarity search fast.
Hybrid search (dense + sparse)
Why pure vector search fails — and how BM25 + embeddings + reciprocal rank fusion win.
Reranking with cross-encoders
The second-pass model that turns 90% recall into 95% precision.
RAG — the full pipeline
Ingest → chunk → embed → index → retrieve → generate. Every step defended.
RAG evaluation (Ragas, faithfulness, answer relevance)
How to measure whether your RAG is actually working.
Agents
0/7 authoredReAct — Reasoning + Acting
Yao et al. 2022 — the loop that started the agent era.
Tool schemas & registration
How LLMs discover and invoke tools — and what breaks.
Agent memory — short-term, long-term, semantic
The memory layers a production agent actually uses.
Reflexion — self-critique loops
Shinn et al. 2023 — how agents learn from their own mistakes.
Planning & task decomposition
The step that separates a chatbot from an agent.
Multi-agent orchestration
Orchestrator + workers, hierarchical, market-based patterns.
Model Context Protocol (MCP)
Anthropic's 2024 standard for LLM ↔ tool interoperability.
Safety
0/5 authoredPrompt injection & OWASP AI Top 10
The attack surface every LLM app has — and defense-in-depth.
Data exfiltration via LLMs
When your prompt leaks your training data (or your customer data).
Guardrails — input + output filtering
Constitutional AI, NeMo Guardrails, Llama Guard — the guardian layer.
Hallucination detection
How to know when your model is confidently wrong.
PII & data residency
GDPR, HIPAA, and the compliance edges of building on foundation models.
Cost & ops
0/5 authoredLLM cost model — deriving $/query
The math to price your feature before you ship it.
Prompt caching (Anthropic, OpenAI)
The 10x cost lever most teams never turn on.
Batch API & async inference
50% discounts for non-real-time work.
Model routing (cheap fallback → expensive escalation)
The router that saves your bill without hurting quality.
LLM observability (traces, prompt logs, evals in prod)
You can't fix what you can't see — the tooling layer.
Multimodal
0/2 authoredMultimodal inputs — image, audio, PDF
How production systems handle non-text inputs.
Vision-language models (GPT-4o, Claude, Gemini vision)
The current state of the art in image reasoning.
Fine-tuning
0/3 authoredSupervised fine-tuning (SFT)
When to fine-tune, and how much data you actually need.
LoRA & QLoRA
The parameter-efficient techniques that make fine-tuning affordable.
DPO, RLHF, and preference tuning
How the models you use were aligned — and what you can do downstream.