DSPy is a declarative framework by DataBricks that treats LLM applications as programming rather than manual prompting. The framework uses three core components: language models, signatures (input/output declarations), and modules (prompting techniques like Chain-of-Thought or ReAct). Key features include automatic optimization through techniques like MIPROv2 that can improve accuracy by adjusting instructions and adding few-shot examples. The article demonstrates building applications from simple combinatorics problems to real-world NPS comment classification, showing significant accuracy improvements (62% to 82%) through automated optimization.
Sort: