llm
36 lessons tagged llm: free, quiz-checked micro-lessons.
Loop engineering: verification, orchestration, and anti-patterns
Make loops trustworthy. Adversarial verification panels, sub-agent orchestration, loop-until-dry for unbounded discovery, loop-until-budget for paid depth, multi-modal sweeps with diverse prompts, eval-driven cap selection, and the five anti-patterns — silent caps, infinite plans, drift, premature termination, thrashing — that ship to prod more than they should.
Loop engineering in production: state, errors, and budgets
Once an agent loop runs past a few iterations the failure surface shifts: state bloats, tool calls fail in three distinct ways, retries multiply if you stack them wrong, and unbounded budgets rack up four-figure bills overnight. The state, errors, and budgets you need to make the loop survive contact with reality.
Loop engineering basics: the agent control loop
How LLM agents actually run: the iterative prompt-action-observation loop, the ReAct shape, the smallest tool-calling loop in twelve lines, why you always stack three termination layers, what the model sees on iteration N, and when a single prompt is the better answer.
LLM Observability with OpenTelemetry: GenAI Semantic Conventions
Master the OTel GenAI semantic conventions — gen_ai.* attributes, span structure for prompts/completions/tools, sampling strategies, and cost attribution — and understand why standardizing across LangSmith, Phoenix, Datadog, and Grafana matters for production AI systems.
RAG Evaluation in Production: Metrics, Tools, and Cadence
Learn how to systematically evaluate Retrieval-Augmented Generation systems in production using RAGAS, TruLens, and Phoenix — covering golden sets, retrieval drift, embedding drift, and cost-aware eval scheduling.
RL in Reasoning Models: How o1, DeepSeek-R1, and Friends Think
A deep look at how reinforcement learning on chains-of-thought powers o1, DeepSeek-R1, Claude reasoning, and Gemini Thinking — covering GRPO, MCTS-style search, test-time compute scaling, and distillation into smaller models.
Direct Preference Optimization: DPO, IPO, KTO, and SimPO
A deep dive into DPO (Rafailov et al. 2023) and its successors — how they reformulate RLHF as a classification problem, the math behind the implicit reward, and where each variant wins or loses against PPO-based pipelines.
Reinforcement Learning in 2026: Where It Ships and Where It Stalls
An honest map of RL in 2026 — the domains where it actually reaches production (LLM post-training, robotics policies, ad bidding, RLHF, reasoning models) and the places where it still cannot reliably cross the lab-to-deployment gap.
LLM Inference Internals: KV Cache, Sampling, and Serving at Scale
A deep dive into how large language models actually run in production — why prefill is fast and decode is slow, how the KV cache works, sampling strategies like temperature and top-p, speculative decoding, and continuous batching with vLLM.
LLM Post-Training: SFT, RLHF, DPO, and Modern Alignment Recipes
A deep dive into how raw pretrained language models become helpful assistants — from supervised fine-tuning on curated demonstrations, through reward modeling and PPO-based RLHF, to modern direct alignment methods like DPO and the recipes used in Llama 3, Llama 4, and DeepSeek.
LLM Scaling Laws: From Kaplan to Chinchilla and Beyond
How two landmark papers — Kaplan et al. 2020 and DeepMind's Chinchilla 2022 — rewrote our understanding of compute-optimal training, why the industry now deliberately overtrains models, and how inference costs flip the math entirely.
Modern LLM Architectures: From Decoder-Only to Mixture-of-Experts
A deep tour of the architectural choices powering today's large language models — decoder-only Transformers, encoder-decoder designs, grouped-query attention, RoPE positional embeddings, and mixture-of-experts routing — with concrete numbers and trade-offs.
LLM Pretraining: Data, Loss, and What Actually Happens
A deep dive into how large language models learn from raw text: the next-token prediction objective, cross-entropy loss, the messy reality of web data curation (Common Crawl, dedup, quality filters), and the lineage from The Pile to FineWeb.
Context Engineering for Long-Running Agents
How to manage, compress, and strategically fill the context window in long-horizon agents — covering summarization checkpoints, scratchpad memory, retrieval injection, prompt caching, and compaction triggers.
Tool Use Patterns: Schema Design, Structured Output, and Validation Loops
A deep dive into designing tool schemas that LLMs actually call correctly — covering parameter naming, description quality, structured output via response schemas, output parsing, and error message design that drives self-correction.
Designing a Production Agent Harness
Move beyond toy ReAct loops. Learn how to build a production-grade agent harness with a robust control loop, tool registry, schema validation, retry logic, token budgets, abort signals, and a persistent journal that survives crashes.
Model Context Protocol: The Open Standard for AI Tool Integration
A deep dive into MCP — Anthropic's open protocol for connecting LLMs to external tools, data, and prompts. Covers JSON-RPC transport layers, the three core primitives, capability negotiation, and how to build a working server from scratch.
Evaluating RAG Pipelines with RAGAS
A rigorous guide to measuring RAG quality using RAGAS metrics — faithfulness, answer relevancy, context precision, and context recall — plus how to build a golden dataset and recognize where automated metrics fall short.
Agentic RAG: Self-RAG, CRAG, and Multi-Hop Reasoning
Go beyond naive RAG pipelines. Learn how Self-RAG, Corrective RAG, and retrieval-as-tool patterns let an LLM decide when, what, and how many times to retrieve — enabling reliable multi-hop reasoning over complex knowledge bases.
HippoRAG and RAPTOR: Hierarchical and Memory-Style RAG
Deep dive into two advanced RAG architectures — HippoRAG's hippocampal-inspired knowledge graph indexing and RAPTOR's recursive summarization tree — and why both dramatically outperform flat vector retrieval on multi-hop questions.
GraphRAG: Knowledge-Graph Augmented Retrieval
Go beyond dense-vector search: learn how Microsoft GraphRAG extracts entities, builds a knowledge graph, clusters it with the Leiden algorithm, and serves both local and global queries with community summaries — delivering answers that classic RAG cannot.
RAG Query Rewriting: HyDE, Multi-Query, Decomposition, and Step-Back
Master four advanced query rewriting techniques that dramatically improve RAG retrieval quality: Hypothetical Document Embeddings, multi-query expansion, query decomposition, and step-back prompting. Learn when to reach for each and how to implement them.
RAG Chunking Strategies: From Fixed-Size to Late Chunking
A deep dive into how you split documents for retrieval-augmented generation — fixed-size, recursive, semantic, hierarchical, and late chunking — with concrete trade-offs and code for each approach.
GitHub Copilot: Niche Power Features You Probably Aren't Using
You already let Copilot autocomplete your code. This lesson dives into the underused power features: chat participants, slash commands, Copilot Edits, agent mode, custom instructions, prompt files, the model picker, MCP servers, and Copilot Spaces.
Interpreting LLM Benchmarks: What MMLU, GPQA, and SWE-bench Actually Measure
A field guide to the LLM benchmarks practitioners cite in 2026 — what each one measures, where it's saturated, where contamination risk is high, and why benchmark gains rarely transfer to your task without your own eval.
LLM Pricing and Latency: What Actually Drives Cost
How frontier LLM costs and latency actually work in 2026 — input vs output token asymmetry, prompt caching, batch API discounts, TTFT and tokens-per-second, reasoning-model amplification, and when self-hosting breaks even.
Choosing the Right LLM for Your Use Case
A practical decision framework for picking an LLM in 2026 — define the task, build an offline eval, measure quality + latency + cost on real candidates, and avoid the classic trap of optimizing for benchmarks instead of your task.
Open Weights vs Closed APIs: The Real Tradeoffs
An honest look at the open-weights vs closed-API choice for LLMs in 2026 — covering data privacy, cost at scale, fine-tuning, latency, regulatory concerns, and the gap in raw capability per dollar.
Comparing LLM Capabilities: Reasoning, Code, Math, Multimodal
A capability-by-capability tour of frontier LLMs in 2026 — which models are strong at reasoning, code, math, long-context, multilingual, multimodal, and tool use, with hedged comparisons instead of point-estimate benchmark wars.
The LLM Landscape in 2026: Who Makes What
A practitioner's map of the major frontier-model labs as of early 2026 — who they are, what they ship, which models are open vs closed, and how the field has split into general-purpose chat and reasoning families.
Prompt injection: the security flaw at the heart of LLM apps
Why LLM apps are uniquely vulnerable to attacks delivered as plain text, the difference between direct and indirect injection, and the defences that actually help (plus the ones that don't).
Multimodal AI: text, images, audio, video in one model
What "multimodal" actually means once you get past marketing copy. How modern models like GPT-4o, Gemini, and Claude blend modalities, and the design trade-offs (early vs late fusion, native vs adapted) you'll meet when building with them.
Agentic AI: from chatbots to tool-using agents
What separates an agent from a plain chatbot, the perceive-think-act loop they all share, and how to design one that doesn't loop forever or burn through your token budget.
Mastering Retrieval-Augmented Generation (RAG)
Explore Retrieval-Augmented Generation (RAG), a powerful technique that enhances Large Language Models (LLMs) by grounding their responses in external, up-to-date, and domain-specific information, mitigating hallucinations and improving factual accuracy. This lesson covers its core components, workflow, and practical considerations.
LangChain: Building Your First LLM Application
A beginner's guide to LangChain, the popular framework for composing applications with Large Language Models. Learn the core concepts of Models, Prompts, and Chains, and build a simple application using the LangChain Expression Language (LCEL).
LangSmith: Tracing & Evaluating Your LLM Applications
Dive into LangSmith, the developer platform for building and evaluating robust Large Language Model (LLM) applications. Learn how to trace execution paths, debug complex chains, and rigorously evaluate your LLM's performance to ensure reliability and quality.
