From dspy-skills
Selects the appropriate DSPy optimizer (e.g., LabeledFewShot, MIPROv2, GEPA) based on data size, budget, and artifact type. Guides from baseline to cost-aware optimization plans.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dspy-skills:dspy-optimizer-selectionThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Choose the smallest DSPy optimizer that matches the data, budget, and artifact being tuned. Establish a baseline before compiling anything.
Choose the smallest DSPy optimizer that matches the data, budget, and artifact being tuned. Establish a baseline before compiling anything.
| Need | Start with | Notes |
|---|---|---|
| Include a few labeled examples | dspy.LabeledFewShot | Random labeled demos; useful as a baseline |
| About 10 examples | dspy.BootstrapFewShot | Teacher-generated demos with metric filtering |
| 50+ examples and stronger demo search | dspy.BootstrapFewShotWithRandomSearch | Searches multiple demo sets; alias: dspy.BootstrapRS |
| Per-input nearest demos | dspy.KNNFewShot | Retrieves nearby examples before bootstrapping |
| Instruction-only hill climbing | dspy.COPRO | Coordinate ascent over instructions |
| Instruction and demo search | dspy.MIPROv2 | Bayesian search; install dspy[optuna] |
| Mini-batch introspective rules or demos | dspy.SIMBA | Uses output variability and self-reflection |
| Rich textual feedback and trace reflection | dspy.GEPA | Metric must accept five arguments |
| Distill prompts into model weights | dspy.BootstrapFinetune | Requires a fine-tunable LM and set_lm() |
| Combine candidate programs | dspy.Ensemble | Trades inference cost for robustness |
| Sequence prompt and weight optimization | dspy.BetterTogether | Meta-optimizer for configurable optimizer chains |
Use dspy-bootstrap-fewshot for the first optimization pass. Move to BootstrapFewShotWithRandomSearch when enough examples are available to search multiple demo sets.
Use dspy-miprov2-optimizer for instruction and demonstration search. Install its optional dependency first:
pip install -U "dspy[optuna]>=3.2.1,<3.3"
Use dspy-gepa-reflective when failures can be described with actionable text. Use dspy-simba-optimizer for a smaller mini-batch introspective loop with numeric metrics.
Use dspy-better-together when a fine-tunable LM is available and prompt optimization alone has plateaued.
npx claudepluginhub omidzamani/dspy-skills --plugin dspy-skillsSequences DSPy prompt and weight optimizers (e.g., GEPA, BootstrapFinetune) into evaluated strategies like "p -> w -> p" and returns the best candidate program.
Optimizes DSPy programs using the dspy.GEPA reflective/evolutionary optimizer for complex tasks with rich-feedback metrics. Requires a DSPy module, metric returning dspy.Prediction, trainset, and reflection LM.