ManningBooks
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 ![]()
Popular Ai topics
Other popular topics
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /svelte
- /typescript
- /onivim
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /deepseek
- /zig
- /centos
- /php
- /scala
- /react-native
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /deno
- /django
- /kubuntu
- /arch-linux
- /nodejs
- /spring
- /ubuntu
- /revery
- /manjaro
- /julia
- /diversity
- /lua
- /markdown
- /quarkus










