Chapters
7 chapters covering everything from basics to production DSPy.
Don't Panic
Stop prompt engineering. Start programming. Your first working DSPy program.
The Restaurant at the End of the Pipeline
Build a multi-step Lead Intelligence Engine. Module composition, Pydantic outputs, and why pipelines beat single prompts.
Life, the Universe, and Retrieval
RAG done right. Build a knowledge-grounded QA system with DSPy's retrieval modules.
The Babel Fish — Optimizers Demystified
Stop hand-writing prompts. Let DSPy's optimizers find better ones automatically.
So Long, and Thanks for All the Prompts
Build autonomous agents with tool use, ReAct loops, and multi-agent coordination.
Mostly Harmless (in Production)
Scaling, observability, caching, and battle scars from real production DSPy deployments.
The Answer Is 42 (Tokens)
Advanced patterns: multimodal, custom metrics, fine-tuning, and what comes next.
The Infinite Improbability Context
Context rot is real. RLMs let the LLM explore massive documents like a detective, not drown in them. Build a Contract Intelligence Engine.