dspy-optimization

Optimize DSPy modules with MIPROv2, GEPA, or BootstrapFewShot strategies.

1|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/hung-phan/ml-skills --skill dspy-optimization-hung-phan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dspy-optimization
Source: https://github.com/hung-phan/ml-skills/tree/main/skills/ml-review/references/ml-libraries/dspy/optimization
Command: npx skills add https://github.com/hung-phan/ml-skills --skill dspy-optimization-hung-phan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of optimizing DSPy module performance by providing a suite of advanced optimization strategies and configurations.

Core Features & Use Cases

  • Optimizer Selection: Choose from MIPROv2, GEPA, BootstrapFewShot, and other strategies for prompt evolution and demo search.
  • Before/After Evaluation: Conduct before/after tests to validate the impact of optimization on module performance.
  • Configuration Options: Customize the optimization process with settings like auto, init_temperature, and max_bootstrapped_demos.

Quick Start

Optimize your DSPy module by running the dspy-optimization skill with the desired optimizer and configuration settings.

Frequently Asked Questions about dspy-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize DSPy module performance using MIPROv2 or BootstrapFewShot?

Optimize DSPy module performance by selecting optimizers like MIPROv2, GEPA, or BootstrapFewShot for prompt evolution and demonstration search. You can customize the process using settings like auto, init_temperature, and max_bootstrapped_demos to maximize results.

What is the best way to evaluate DSPy prompt engineering performance before and after optimization?

Evaluate DSPy prompt engineering performance by conducting before/after tests. This validation process measures the impact of applied optimization strategies to ensure the tuning and demo search configurations effectively maximize module performance.

Can I configure DSPy optimizers with custom settings for demonstration search?

Yes, you can configure DSPy optimizers for demonstration search using custom settings. The optimization process supports configurations like auto, init_temperature, and max_bootstrapped_demos to tailor prompt evolution and tuning to your specific module requirements.

When should I use GEPA instead of BootstrapFewShot for DSPy prompt tuning?

Choosing between GEPA and BootstrapFewShot for DSPy prompt tuning depends on your specific optimization strategy needs. GEPA offers distinct prompt evolution capabilities, while BootstrapFewShot focuses on generating demonstration examples to maximize module performance.

Does DSPy optimization support automatic optimizer selection?

DSPy optimization supports automatic optimizer selection through the auto configuration setting. This allows the optimization process to automatically target and tune prompt engineering strategies, simplifying the enhancement of module performance.