# `Tune.Optimizers.BootstrapFewShotWithRandomSearch`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/optimizers/bootstrap_few_shot_with_random_search.ex#L1)

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).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
