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

New
ManningBooks
Grokking AI Algorithms, Second Edition introduces the most important AI algorithms using relatable illustrations, interesting examples, a...
New
ManningBooks
After ChatGPT used RLHF to become production-ready, this foundational technique exploded in popularity. In The RLHF Book, AI expert Natha...
New
ManningBooks
Dr Luca Belli, co-founder and former research lead for Twitter’s Machine Learning Ethics, Transparency and Accountability team, has been ...
New
ManningBooks
Hugging Face in Action reveals how to get the absolute best out of everything Hugging Face, from accessing state-of-the-art models to bui...
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
Today’s AI models demand a lot of memory, compute, and server horsepower–which quickly translates into cost. Quantization and Fast Infere...
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
ManningBooks
Building LLM Applications with DSPy introduces DSPy best practices you can adopt to create reliable, production-ready systems through pro...
New

Other popular topics Top

AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
PragmaticBookshelf
Build modern server-driven web applications using htmx. Whatever programming language you use, you’ll write less (and cleaner) code. ...
New