# `Imp.Optimizer.BootstrapFewShotWithRandomSearch`
[🔗](https://github.com/deepfates/imp/blob/v0.18.1/lib/imp/optimizer/bootstrap_few_shot_with_random_search.ex#L1)

DSPy 3.2.1 BootstrapFewShotWithRandomSearch, which DSPy also exports as
`BootstrapRS`.

Candidate seeds, baseline scheduling, chained labeled-demo sampling, tie
ordering, and rounded percentage scores follow DSPy 3.2.1. Seeded draws use
Imp's deterministic BEAM-native sampler rather than Python's MT19937 sequence.

Durable invocations accept `:max_candidates`, `:checkpoint_fn`, and
`:resume_state`. A candidate is sealed only after both its bootstrap/build
stage and full validation evaluation finish; interrupted candidates replay as
a unit, while completed candidates do not. Captured metrics require a stable
JSON-safe `:metric_identity`. Complete anonymous-metric runs remain available
in process without a checkpoint.

# `new`

---

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