DSPy is a groundbreaking framework designed to program, rather than merely prompt, large language models (LLMs). It introduces a systematic approach to building complex AI applications by allowing developers to define AI behavior as modular, composable code. Key features include:
- Modules: These enable developers to describe AI behavior programmatically, moving beyond ad-hoc string prompting. This allows for more structured and maintainable AI programs.
- Optimizers: DSPy provides powerful optimizers that automatically tune the prompts and weights of your AI modules. This significantly improves performance and robustness without manual prompt engineering.
- Open-Source Ecosystem: DSPy fosters an active open-source community, advancing research and development in AI programming.
DSPy is ideal for building robust and efficient AI systems, from simple text generation to complex multi-hop reasoning and agentic behaviors, by transforming the art of prompt engineering into a science of programming.

