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.

Step 1: Gather context

Before writing code, ask 2-4 of these to right-size the optimizer setup:

  1. What does your program currently do, and what metric are you optimizing? (accuracy, F1, LM-as-judge, etc.) — affects whether to use binary vs float metric.
  2. Does the program already work reasonably well, or are you starting from scratch? — SIMBA is designed for incremental improvement on a working baseline, not cold-start optimization.
  3. How many labeled training examples do you have? — SIMBA needs at least 30-50; mini-batch size (bsize) should be smaller than your dataset.
  4. Is this a production program where regressions are unacceptable? — affects num_candidates, max_demos, and whether to add a regression check before saving.

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:

Installs
6
GitHub Stars
11
First Seen
Mar 17, 2026
dspy-simba — lebsral/dspy-programming-not-prompting-lms-skills