dspy-simba

Installation
SKILL.md

Small-Step Optimization with dspy.SIMBA

Guide the user through using dspy.SIMBA (Stochastic Introspective Mini-Batch Ascent) to optimize DSPy programs through incremental, targeted improvements rather than large sweeping changes.

What is dspy.SIMBA

dspy.SIMBA is a DSPy optimizer that improves programs by analyzing mini-batches of examples, identifying where the program struggles most, and making small targeted fixes -- either adding demonstrations or generating self-reflective rules. Instead of rewriting the entire prompt at once, SIMBA takes conservative steps, focusing on the examples with the highest output variability.

Key properties:

  • Mini-batch driven -- samples small batches from the training set each iteration, rather than evaluating the entire dataset
  • Variability-focused -- identifies the hardest examples by measuring output variability (gap between best and worst scores)
  • Two improvement strategies -- adds few-shot demonstrations or generates introspective rules based on failure analysis
  • Maintains a program pool -- keeps multiple candidate programs and probabilistically selects from the best performers
  • Incremental by design -- each step makes a small, targeted change rather than overhauling the entire program

When to use SIMBA

Use dspy.SIMBA when:

Related skills

More from lebsral/dspy-programming-not-prompting-lms-skills

Installs
3
GitHub Stars
5
First Seen
Mar 17, 2026