DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines
summary
DSPy provides a compiler that turns declarative signatures and parameterized modules into self-improving pipelines that automatically generate or fine-tune prompts and examples; compilation runs in minutes and lets GPT-3.5 and llama2-13b-chat self-bootstrap pipelines that outperform standard few‑shot prompting and expert-crafted demonstrations. Modules like retrieval, Chain of Thought and react become declarative modules whose examples and instructions the optimizer searches over; a compiled multihop program reaches the 50s (%) on Hotpot-style QA and a compiled <1B T5 scores 39% exact match. Code is open source on GitHub.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:30Context
- 2:33Modularity
- 4:56DSP Paradigm
- 7:49NLP Signatures
- 9:26Modules
- 11:36Task
- 12:33Prompt Template
- 13:49Chain of Thought
- 15:10Compiling
- 17:02Building a Pipeline
- 19:13Pipeline Design
- 21:26Compilation Strategies
- 21:38Conclusion
related talks
31mDSPy: The End of Prompt Engineering as We Know It
01h 13mDSPy: The End of Prompt Engineering
30mBuilding Reliable AI Agents for Publishing: A DSPy-Based Quality Assurance Framework
24mBetter Prompting with Pseudocode
47mThe Art of Prompt Engineering: Best Practices for Effective AI Interactions
19mOn Engineering AI Systems that Endure The Bitter Lesson
18mTechniques for Enhanced Model Performance
36mUnleashing Generative AI: Improving Developer Productivity in SRE
