The episode introduces DSPy, a programming model that abstracts language model (LM) pipelines as text transformation graphs, allowing for the optimization of LM pipelines without relying on hand-coded prompt templates. DSPy modules are parameterized and can learn how to apply prompting, finetuning, and reasoning techniques. A compiler is designed to optimize DSPy pipelines, showing improved performance compared to expert-created demonstrations. The episode emphasizes the importance of moving away from manual prompt engineering to a more systematic approach in designing AI pipelines. DSPy is shown to be competitive with expert-written prompt chains for various LM sizes and tasks. The work aims to provide a programming model that translates prompting techniques into declarative modules and introduces an effective compiler with general optimization strategies.