Dsxir. Optimizer. SIMBA. Strategy. AppendDemo
(dsxir v0.5.0)
Copy Markdown
SIMBA strategy that appends one augmented demo per predictor from the top trajectory in a bucket. No LM call.
Keeps the last demo per predictor name when a trace visits the same predictor
more than once (DSPy parity: name2demo[name] = demo overwrites on repeat,
then one demo per predictor is appended). Skips when the top trajectory score
is at or below the mini-batch 10th percentile.
Input field values whose to_string length exceeds ctx.demo_input_field_maxlen
are sliced and suffixed with "\n\t\t... <TRUNCATED FOR BREVITY>".