Tune.Optimizers.BootstrapFewShotWithRandomSearch (Tune v0.5.0)

Copy Markdown View Source

Builds several seeded example sets and keeps the best validation result.

Candidates follow DSPy's order: the unchanged program, labeled demonstrations, an unshuffled bootstrap, then num_candidate_programs bootstraps from shuffled training data with a random demonstration count. Each candidate is evaluated on the full validation set; only a complete, eligible evaluation can become the incumbent, and ties keep the earlier candidate. On the call limit the best completed incumbent is returned with complete?: false.

Options: :num_candidate_programs (default 8) and the BootstrapFewShot options (:accept_score required).