What problem does it solve?
This Skill removes manual, trial-and-error prompt engineering by letting you define LM tasks declaratively and automatically optimize prompts using evaluation data.
Core Features & Use Cases
- Declarative LM programs (signatures): Define input-to-output task schemas like question → answer, making pipelines easier to maintain and reuse.
- Modular reasoning workflows: Compose building blocks such as Predict, ChainOfThought, ReAct (tool use), and ProgramOfThought (code execution) for different task types.
- Automatic prompt optimization: Use DSPy teleprompters/optimizers to improve instruction text and few-shot examples based on a metric and training set.
- RAG-ready patterns: Build retrieval-augmented generation pipelines and optimize them for better answer quality.
Use it when you need more reliable outputs for QA, classification, extraction, or multi-stage RAG/agent systems, especially when you can supply labeled examples and a scoring metric.
Quick Start
Ask an AI to generate a DSPy module for question answering, then compile it with BootstrapFewShot using your labeled question-answer examples and an exact-match metric.