DSPy
OfficialSpecializedProgramming framework that compiles declarative language model calls into optimized prompts or finetunes. Replaces hand-written prompts with modular, trainable programs.
by Stanford NLP21.5k starsMITUpdated Apr 2026
Installation
Install
pip install dspyLanguage support
Python
Supported LLMs
OpenAIAnthropicGoogleOllamaAny LiteLLM-supported model
Features (8)
signaturesmodulesoptimizersassertionsretrievaltyped_predictorscachingevaluationSource
View on GitHubDetails
- Author
- Stanford NLP
- Category
- Specialized
- Languages
- 1
- Features
- 8
- Stars
- 21.5k
- License
- MIT
- Status
- Official