• Declarative Programming: DSPy stands for Declarative Self-improving Language Programs, focusing on programming foundation models rather than prompting them.
  • Optimization: It introduces optimizers that algorithmically enhance LM prompts and weights, aiming for systematic improvements in task-solving with LMs.
  • Modules & Signatures: The framework utilizes modules for program flow and signatures to define LM prompts and weights, separating them for better optimization.
  • Compilation Paradigm: DSPy’s compilation process adapts programs to different LMs, creating tailored instructions, few-shot prompts, or weight updates.
stanfordnlp/dspy
10,001 to 20,000 stars
May 12, 2024
DSPy: Programming—not prompting—Foundation Models