dspy-optimizer-selection
Use to choose or compare DSPy optimizers including LabeledFewShot, BootstrapFewShot, MIPROv2, SIMBA, GEPA, BootstrapFinetune, Ensemble, and BetterTogether.
Skill by OmidZamani
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/omidzamani-dspy-optimizer-selection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dspy-optimizer-selection
What's inside
- Skill name
dspy-optimizer-selection- Description
- Use to choose or compare DSPy optimizers including LabeledFewShot, BootstrapFewShot, MIPROv2, SIMBA, GEPA, BootstrapFinetune, Ensemble, and BetterTogether.
- License
- MIT
- Instructions
- 67 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (2)
- SKILL.md
- example.py
SKILL.md (first lines)
# DSPy Optimizer Selection ## Goal Choose the smallest DSPy optimizer that matches the data, budget, and artifact being tuned. Establish a baseline before compiling anything. ## Selection Matrix | 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 | ## Workflow 1. Split data into train and validation sets. 2. Evaluate the uncompiled program with [dspy-evaluation-suite](../dspy-evaluation-suite/SKILL.md). 3. Start with the least expensive optimizer that matches the need. 4. Save the compiled program and compare it against the baseline. 5. Escalate only when the measured gain justifies extra LM calls, fine-tuning, or inference cost. ## Common Paths ### Fast Demo Optimization Use [dspy-bootstrap-fewshot](../dspy-bootstrap-fewshot/SKILL.md) for the first optimization pass. Move to `BootstrapFewShotWithRandomSearch` when enough examples are available to search multiple demo sets. ### Prompt Search Use [dspy-miprov2-optimizer](../dspy-miprov2-optimizer/SKILL.md) for instruction and demonstration search. Install its optional dependency first: ```bash pip install -U "dspy[optuna]>=3.2.1,<3.3" ``` ### Reflective Optimization Use [dspy-gepa-reflective](../dspy-gepa-reflective/SKILL.md) when failures can be described with actionable text. Use [dspy-simba-optimizer](../dspy-simba-optimizer/SKILL.md) for a smaller mini-batch introspective loop with numeric metrics. ### Prompt Plus Weight Optimization Use [dspy-better-together](../dspy-better-together/SKILL.md) when a fine-tunable LM is available and prompt optimization alone has plateaued. ## Best Practices 1. Keep a held-out validation set. 2. Track optimization cost and inference cost separately. 3. Use reproducible seeds where supported. 4. Avoid claiming one optimizer is universally best; compare measured results. 5. Save intermediate candidates for expensive runs. ## Official Documentation - **Optimizer guide**: https://dspy.ai/learn/optimization/optimizers/ - **Optimizer API index**: https://dspy.ai/api/optimizers/ - **DSPy releases**: https://github.com/stanfordnlp/dspy/releases
From OmidZamani/dspy-skills, MIT.
More from OmidZamani/dspy-skills
- 0.674score
dspy-haystack-integration
OmidZamani
Use for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-adapters-multimodal
OmidZamani
Use for DSPy adapter selection, JSONAdapter, XMLAdapter, ChatAdapter, native function calling, structured outputs, and multimodal inputs like dspy.Image or…
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-advanced-module-composition
OmidZamani
Use for composing DSPy modules with Ensemble, MultiChainComparison, ensemble voting, sequential pipelines, and multi-program workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-evaluation-suite
OmidZamani
Use for evaluating DSPy programs with Evaluate, answer_exact_match, SemanticF1, custom metrics, baselines, and program comparisons.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-optimize-anything
OmidZamani
Use for GEPA optimize_anything on text artifacts such as code, prompts, agent architectures, configs, and non-DSPy optimization targets.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-production-deployment
OmidZamani
Use for deploying DSPy with save/load, configure_cache, restrict_pickle, track_usage, async execution, streaming, and production runtime controls.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-rag-pipeline
OmidZamani
Use for RAG pipelines, retrieval augmented generation, ColBERTv2, context retrieval, multi-hop RAG, and grounded DSPy answers.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-signature-designer
OmidZamani
Use for DSPy signatures, InputField, OutputField, typed inputs and outputs, signature classes, and Pydantic-style structured schemas.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-simba-optimizer
OmidZamani
Use for SIMBA optimization, mini-batch introspective optimization, self-reflective rules, stochastic ascent, and numeric-metric optimization.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-reasoning-modules
OmidZamani
Use for DSPy reasoning modules including RLM, ProgramOfThought, CodeAct, Parallel, sandboxed execution, and long-context workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-custom-module-design
OmidZamani
Use for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-debugging-observability
OmidZamani
Use for debugging DSPy programs, inspect_history, tracing LLM calls, custom callbacks, observability, monitoring, and cost tracking.
SkillCFreshness: C★ 124Claude Code +9
Signals
- Stars
- 124
- Forks
- 13
- Open issues
- 1
- Last commit (this folder)
- Jun 23, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/OmidZamani/dspy-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OmidZamani
- 0.674score
dspy-haystack-integration
OmidZamani
Use for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-advanced-module-composition
OmidZamani
Use for composing DSPy modules with Ensemble, MultiChainComparison, ensemble voting, sequential pipelines, and multi-program workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-adapters-multimodal
OmidZamani
Use for DSPy adapter selection, JSONAdapter, XMLAdapter, ChatAdapter, native function calling, structured outputs, and multimodal inputs like dspy.Image or…
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-debugging-observability
OmidZamani
Use for debugging DSPy programs, inspect_history, tracing LLM calls, custom callbacks, observability, monitoring, and cost tracking.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-custom-module-design
OmidZamani
Use for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-embedding-retrieval
OmidZamani
Use for DSPy retrieval with dspy.Embedder, dspy.Embeddings, FAISS indexes, semantic search, and local or hosted embedding models.
SkillCFreshness: C★ 124Claude Code +9
Cite this page
dspy-optimizer-selection skill. Agent Mart. https://agentmart.dev/skills/omidzamani-dspy-optimizer-selection (last updated 2026-10-24)