The dspy-miprov2-optimizer is a high-performance Claude skill designed for the Bayesian optimization of DSPy programs. It automates the complex process of joint instruction tuning and few-shot demonstration selection to maximize the accuracy and efficiency of LLM pipelines. By replacing manual prompt engineering with a systematic three-stage workflow—Bootstrap, Propose, and Search—this tool enables developers to achieve state-of-the-art performance for agentic workflows and complex RAG systems, provided they have a sufficient training dataset.
Use Cases
RAG Pipeline Optimization: Automatically refine retrieval prompts and generation instructions to improve the precision of Retrieval-Augmented Generation systems.
Agentic Tool-Use Tuning: Optimize ReAct or Chain-of-Thought agents by finding the most effective combination of system instructions and few-shot examples for complex tool interactions.
Production-Ready LLM Scaling: Transition from prototype to production by using 'heavy' optimization presets to ensure maximum reliability and performance on high-stakes tasks.
Automated Prompt Engineering: Eliminate the trial-and-error of manual prompting by using Bayesian search to discover non-obvious instruction improvements that drive higher metric scores.
name
dspy-miprov2-optimizer
description
State-of-the-art Bayesian optimization for DSPy programs with joint instruction and demo tuning
DSPy MIPROv2 Optimizer
Goal
Jointly optimize instructions and few-shot demonstrations using Bayesian Optimization for maximum performance.
When to Use
You have 200+ training examples
You can afford longer optimization runs (40+ trials)