# The Real Python Podcast - Episode #306: Programmatically Developing LLM Prompts With DSPy

DevFeed: [The Real Python Podcast - Episode #306: Programmatically Developing LLM Prompts With DSPy](<https://devfeed.tech/articles/the-real-python-podcast-episode-306-programmatically-developing-llm-prompts-with-dspy-4390.md>)

Original publisher: [Read original article](<https://realpython.com/podcasts/rpp/306/>)

Author: Real Python

Published: 2026-08-07T12:00:00Z

Content type: article

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [DSPy](<https://devfeed.tech/topics/dspy.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [Python](<https://devfeed.tech/topics/python.md>), [llamaindex](<https://devfeed.tech/topics/llamaindex.md>)

Tags: [dspy](<https://devfeed.tech/tags/dspy.md>), [llamaindex](<https://devfeed.tech/tags/llamaindex.md>), [llm](<https://devfeed.tech/tags/llm.md>), [podcast](<https://devfeed.tech/tags/podcast.md>), [programming](<https://devfeed.tech/tags/programming.md>), [prompt-engineering](<https://devfeed.tech/tags/prompt-engineering.md>), [python](<https://devfeed.tech/tags/python.md>), [rag](<https://devfeed.tech/tags/rag.md>)

## AI overview

This podcast episode explains how DSPy programmatically develops and optimizes prompts for LLM applications. It covers declarative signatures, prompt compilation and tuning, and the limitations of manual prompt engineering. The episode also highlights a course on using LlamaIndex for RAG in Python.

## Source excerpt

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."