DSPy Official Documentation & Tutorials

DSPy Contributors (Omar Khattab / Stanford / MIT OASYS) · Technical docs · 176 works · 1,191 pages
Provenance & compiled volume Details
Original source dspy.ai/
Corpus totals 176 works · 1,191 pages · 376,376 words
Compiled PDF volume DSPy Documentation: Learn, Guides & Tutorials (16.5 MB)
Content integrity (SHA-256)

Table of Contents

50 shown · 176 total works
  1. 01 Program , don’t prompt, your LLMs. 5 min· pp. 6–11
  2. 02 Program, don’t prompt 1 min· p. 12
  3. 03 Setting up DSPy 4 min· pp. 13–15
  4. 04 Writing our first DSPy program 3 min· pp. 16–18
  5. 05 Expanding your signature: more inputs and adding types 3 min· pp. 19–21
  6. 06 Writing a class-based signature 3 min· pp. 22–23
  7. 07 Change inference strategies by changing the module 1 min· p. 24
  8. 08 Give the program tools with dspy.ReAct 3 min· pp. 25–27
  9. 09 Composing your own module 5 min· pp. 28–31
  10. 10 Building metrics for evaluation and optimization 4 min· pp. 32–34
  11. 11 Prompt Optimizing with GEPA 7 min· pp. 35–39
  12. 12 Saving a program and reloading it 2 min· pp. 40–41
  13. 13 Where to go next 1 min· p. 42
  14. 14 Adapters: how signatures become prompts 12 min· pp. 43–50
  15. 15 BootstrapFewShot family 8 min· pp. 51–55
  16. 16 Built-in module variants 8 min· pp. 56–60
  17. 17 Optimizers: choosing one 9 min· pp. 61–66
  18. 18 Flex: Optimizable module code 12 min· pp. 67–72
  19. 19 GEPA in depth 8 min· pp. 73–77
  20. 20 Metrics and evaluation 8 min· pp. 78–82
  21. 21 Modules: composing your own 8 min· pp. 83–87
  22. 22 ReAct 8 min· pp. 88–93
  23. 23 RLM: exploring large contexts with code 9 min· pp. 94–98
  24. 24 Saving and loading 7 min· pp. 99–103
  25. 25 Settings and context() 7 min· pp. 104–108
  26. 26 Signatures in depth 8 min· pp. 109–113
  27. 27 Tools and MCP 5 min· pp. 114–117
  28. 28 Utilizing Built-in Datasets 4 min· pp. 118–120
  29. 29 Examples in DSPy 3 min· pp. 121–123
  30. 30 Creating a Custom Dataset 4 min· pp. 124–126
  31. 31 DSPy Assertions 9 min· pp. 127–132
  32. 32 Deploying DSPy 1 min· p. 133
  33. 33 DSPy Cheatsheet 8 min· pp. 134–142
  34. 34 Tutorials Overview 2 min· pp. 143–144
  35. 35 Tutorial: Agents 52 min· pp. 145–167
  36. 36 Building a Creative Text-Based AI Game with DSPy 12 min· pp. 168–177
  37. 37 Async DSPy Programming 3 min· pp. 178–180
  38. 38 Tutorial: Using Audio in DSPy Programs 11 min· pp. 181–189
  39. 39 Build AI Programs with DSPy 2 min· pp. 190–191
  40. 40 Use and Customize DSPy Cache 8 min· pp. 192–198
  41. 41 Classification 1 min· p. 199
  42. 42 Tutorial: Classification Fine-tuning 13 min· pp. 200–210
  43. 43 Managing Conversation History 5 min· pp. 211–214
  44. 44 Tools, Development, and Deployment 2 min· pp. 215–216
  45. 45 Custom LM Engines 10 min· pp. 217–222
  46. 46 Building AI Applications by Customizing DSPy Modules 5 min· pp. 223–226
  47. 47 Build AI Agents with DSPy 37 min· pp. 227–248
  48. 48 Cohort Analysis with RLM + DataFrame 21 min· pp. 249–263
  49. 49 Dataframe 2 min· pp. 264–265
  50. 50 Generate Cohort Data 3 min· pp. 266–268