# `Imp.Predict.Assertions`
[🔗](https://github.com/deepfates/imp/blob/v0.18.1/lib/imp/predict/assertions.ex#L1)

Wraps an Imp program with assertion-guided self-refinement.

Each attempt calls the wrapped program, evaluates named assertions, and stops
once all assertions pass. Failed attempts produce a textual `:hint_` for the
next attempt so ordinary signatures can opt into self-repair without a special
provider API.

If attempts are exhausted, the best prediction by assertion pass rate is
returned with `:assertion_score`, `:assertion_failures`, and
`:assertion_history` fields. Pass `strict: true` to return an error instead
when no attempt satisfies every assertion. When no attempt returned a
prediction at all, the error is the last attempt's reason, or `:no_attempts`
with `max_attempts: 0`.

# `call`

# `new`

---

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