
Programmatically Developing LLM Prompts With DSPy
Episode 306
How can you move from manually writing prompts for an LLM application toward defining them programmatically? This week on the show, Brett Kennedy returns to discuss his new book “Building LLM Applications with DSPy.” With large language models becoming embedded in production software, manual prompt engineering becomes brittle, time-consuming, and difficult to maintain. Brett shares how DSPy replaces manually writing and adjusting prompts with structured prompt programming. We dig into how DSPy uses declarative signatures to define inputs and outputs. We also discuss how developers programmatically compile, tune, and optimize prompts for specific LLM-based tasks within an application. Course Spotlight: Using LlamaIndex for RAG in Python Learn how to set up LlamaIndex, load your data, build and persist an index, and run queries to get grounded answers with RAG in Python. Topics: 00:00:00 – Introduction 00:01:50 – Working on a new book 00:02:53 – Writing with a partner 00:04:16 – Building LLM Applications with DSPy 00:05:22 – What is DSPy? 00:06:58 – Working with signatures and typing 00:09:53 – Prompt engineering failing to work for a new model 00:13:43 – What is an optimizer?
Publisher
The Real Python Podcast
Link
realpython.com/podcasts/rpp/306/
Published
August 7, 2026
Duration
1h 6m
Format
Podcast
Category
Issues · Tech News
Source
RSS feed
Host
Real Python
The Real Python Podcast
@realpythonpodcast
#programmaticallydevelopingllm #dspy
