DSPy – Programming–not prompting–LMs

Programming in DSPy involves writing modular AI systems in Python code, focusing on structured modules rather than brittle prompts. The framework allows for fast iteration in building AI systems like classifiers, RAG pipelines, or Agent loops. Users can authenticate with different LM providers and set up local LMs on their machines or GPU servers. DSPy provides modules for various tasks, such as classification, information extraction, or math problems. Users can optimize their AI modules using DSPy optimizers like MIPROv2, which synthesize examples, explore natural language instructions, and fine-tune LM weights. Optimizing prompts and weights can improve LM performance for different tasks, with examples showing significant score increases.

https://dspy.ai/

To top