ManningBooks

ManningBooks

Devtalk Sponsor

Building LLM Applications with DSPy (Manning)

Building LLM Applications with DSPy introduces DSPy best practices you can adopt to create reliable, production-ready systems through proper task definition, evaluation, and optimization. Practical to the core, this book helps you construct a full professional portfolio of AI applications, including an LLM-based classification system, a summarizer, and RAG-based application.

Serj Smorodinsky and William Brett Kennedy

If you’ve built anything serious with LLMs, you’ve probably hit the same wall: the first prompt works surprisingly well, the fifth prompt works worse in a new way, and a week later a model update or dataset shift makes yesterday’s “perfect” wording look fragile. This book is about moving past that cycle.

DSPy gives you a different way to build LLM applications. Instead of hand-writing and endlessly tweaking prompts, you define the task in Python: inputs, outputs, evaluation metrics, modules, and training examples. DSPy then generates and improves prompts through systematic testing.

The book walks through that workflow from the ground up:

  • how prompt programming differs from prompt engineering

  • how DSPy signatures, modules, predictions, examples, metrics, and evaluators fit together

  • how to build an intent classifier with the ATIS airline dataset

  • how to evaluate LLM programs with custom metrics and DSPy’s Evaluate

  • how to test accuracy, consistency, per-class performance, and cost

  • how to improve prompts with optimizers such as LabeledFewShot, BootstrapFewShot, BootstrapFewShotWithRandomSearch, KNN, COPRO, MIPROv2, SIMBA, GEPA, and Ensemble

  • how to think about train, validation, development, and test sets for LLM applications

One of the strongest parts of the book is that it treats LLM work like software and machine learning work, not like prompt folklore. You start with a baseline. You measure it. You improve it. You compare models and modules. You save the best program. You can re-run the process when models change.

The examples are practical: classification, summarization, LLM-as-a-judge, RAG, agentic RAG, and chatbots. The early chapters assume no DSPy background, but the material quickly gets into the parts developers care about when building production systems: evaluation design, optimizer choice, prompt drift, model switching, caching, rate limits, token costs, and debugging prompt history.

Serj Smorodinsky is a DSPy contributor and AI engineer with deep experience in NLP, chatbots, RAG systems, agentic workflows, and LLM evaluation. Brett Kennedy brings decades of software and data science experience. That mix shows in the book: it’s written for people who want clean code, measurable behavior, and systems that can be maintained after the first demo.

If you’ve been curious about DSPy, or if you’re tired of storing giant prompt strings in your codebase and hoping they keep working, this is a strong place to start.


Don’t forget you can get 45% off with your Devtalk discount! Just use the coupon code “devtalk.com” at checkout :+1:

Where Next?

Popular Ai topics Top

ManningBooks
Based on Ilya Sutskever’s famous “must-read” list of ~30 AI papers, this book walks you through the research that shaped today’s deep lea...
New
New
ManningBooks
Build an AI Agent (From Scratch) is a step-by-step guide to creating a working AI agent, starting with the bare essentials and growing yo...
New
ManningBooks
Grokking AI Algorithms, Second Edition introduces the most important AI algorithms using relatable illustrations, interesting examples, a...
New
ManningBooks
The bestselling book on Python deep learning, now covering generative AI, Keras 3, PyTorch, and JAX! François Chollet and Matthew ...
New
ManningBooks
In Build a DeepSeek Model (From Scratch) you’ll build your own DeepSeek clone from the ground up. First, you’ll quickly review LLM fundam...
New
ManningBooks
Rearchitecting LLMs: Structural techniques for efficient models turns research from the latest AI papers into production-ready practices ...
New
ManningBooks
CUDA for Deep Learning shows you how to work within the CUDA ecosystem, from your first kernel to implementing advanced LLM features like...
New
ManningBooks
Retrieval Augmented Generation, The Seminal Papers explores 12 foundational research papers that explain why RAG works, how it’s built, a...
New
ManningBooks
Building Agentic Applications with CrewAI and MCP by Max Gfeller is a practical, example-driven guide to designing AI systems that plan, ...
New

Other popular topics Top

PragmaticBookshelf
Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell. With Seven Languages in Seven Weeks, by Bruce A. Tate, you’ll go beyond the syntax—and...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
PragmaticBookshelf
From finance to artificial intelligence, genetic algorithms are a powerful tool with a wide array of applications. But you don't need an ...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
First poster: AstonJ
Jan | Rethink the Computer. Jan turns your computer into an AI machine by running LLMs locally on your computer. It’s a privacy-focus, l...
New
PragmaticBookshelf
Explore the power of Ash Framework by modeling and building the domain for a real-world web application. Rebecca Le @sevenseacat and ...
New
PragmaticBookshelf
Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
New
PragmaticBookshelf
A concise guide to MySQL 9 database administration, covering fundamental concepts, techniques, and best practices. Neil Smyth MySQL...
New