Learning paths
Building with large language models
Read these guides in order to go from how a language model works to serving and evaluating one in a real product.
Stage 1: How the models work
- Generative AI and LLMs
A practical map of generative AI and large language models: how LLMs work, retrieval and vector databases, evaluation, observability, safety and serving. - GPT architecture
The GPT architecture is a decoder-only transformer trained to predict the next token. Learn its layers, causal attention, pre-training and why it scales. - Embeddings
Embeddings are numeric vectors that capture the meaning of text, images or records so similar items sit close together. Learn how they power search and RAG. - Reasoning models
Reasoning models think step by step before answering, spending more compute at inference time on harder problems. Learn how they work and when to use them.
Stage 2: Prompting and context
- Prompt engineering
Prompt engineering is writing clear instructions, examples and formats so language models produce reliable results. Learn the techniques that work. - Context engineering
Context engineering is the practice of deciding exactly what information, instructions, tools and memory go into a model's context at each step of an AI system. - Structured outputs
Structured outputs make a language model return data that matches a JSON Schema. Learn constrained decoding, schema design, validation and when to use it.
Stage 3: Retrieval
- Retrieval-augmented generation (RAG): from naive to agentic
How retrieval-augmented generation works, why naive RAG fails, and how advanced, graph, and agentic RAG fix it, with evaluation. - pgvector
pgvector adds a vector type and similarity search to PostgreSQL, with HNSW and IVFFlat indexes. Learn when keeping vectors in Postgres is the right choice. - Qdrant
Qdrant is an open-source vector search engine written in Rust, known for payload filtering, quantization and hybrid dense-sparse search. Learn how it works.
Stage 4: Adapting a model
- Fine-tuning
Fine-tuning adapts a pretrained model to your task by training it further on your data. The full map: full tuning, LoRA, QLoRA, SFT, RLHF, DPO and RAG. - LoRA
LoRA fine-tunes large models by training small low-rank update matrices while the base weights stay frozen. Learn how it works, when to use it, and its limits. - DPO
DPO explained: how direct preference optimization aligns language models from chosen and rejected answers without a reward model, with math, code and…
Stage 5: Serving and evaluating
- vLLM
vLLM is an open-source engine for fast, memory-efficient LLM inference using PagedAttention and continuous batching, with an OpenAI-compatible server. - KV cache
The KV cache stores attention keys and values from earlier tokens so a language model does not recompute them for each new token, trading memory for speed. - Prompt caching
Prompt caching stores the computed state for the start of a prompt so later requests with the same prefix skip that work, cutting cost and latency. - LLM routing
LLM routing sends each request to the most suitable model, using rules, classifiers, learned routers or cascades, to balance quality against cost and speed. - LLM-as-judge
LLM-as-judge uses a language model to grade AI outputs against a rubric. Learn grading modes, known biases, calibration against humans and when to trust it. - The new LLM serving stack: cache-aware routing, continuous batching and expert pruning
Buoyant's Kinference, Fireworks Forge and AWS research on MoE expert pruning show where LLM serving costs now go. How KV caches, routing and batching work.
How to use this path
Read the steps in order; each guide links onward to related topics, so you can go deeper wherever you need to. If you already know a stage, skip to the next one. All learning paths are listed on Learning paths.