What problem does it solve? Manually tuning prompts for language model applications is slow, brittle, and hard to reproduce. DSPy replaces hand-crafted prompts with declarative signatures and modules, then uses data-driven optimizers to automatically improve prompts and few-shot examples against a metric you define. ## Core Features & Use Cases - Declarative Signatures & Modules: Define tasks as input-output signatures and compose them with Predict, ChainOfThought, ReAct, and ProgramOfThought modules. - Automatic Optimization: Use BootstrapFewShot, MIPRO, COPRO, and BootstrapFinetune to generate demonstrations, tune instructions, or export fine-tuning datasets from training examples. - Composable Pipelines: Build multi-stage RAG systems, agents with tools, classifiers, and structured extraction with Pydantic-typed outputs. - Use Case: Build a multi-hop RAG question-answering system, then optimize it with BootstrapFewShot on 50 labeled examples to measurably improve answer accuracy without rewriting any prompts. ## Quick Start Use the dspy skill to build a chain-of-thought question answering module and optimize it with BootstrapFewShot on my training examples.