Dsxir.Predictor.Refine (dsxir v0.4.0)

Copy Markdown

Like Dsxir.Predictor.BestOfN, but reflective: after a sub-threshold attempt it runs the internal OfferFeedback predictor over the captured trace and injects per-predictor corrective advice into the next attempt through the Dsxir.Settings :hints channel. Invoked from a forward/2 body; not a declared predictor.

Same opts as BestOfN plus :feedback_lm (a {module, config} tuple) overriding the LM used for the OfferFeedback call. With threshold: nil, every sub-final attempt is refined.

Summary

Functions

Run program up to :n times, refining each sub-threshold attempt with OfferFeedback-generated advice, and return the best-scoring prediction.

Functions

run(program, inputs, reward_fn, opts)

Run program up to :n times, refining each sub-threshold attempt with OfferFeedback-generated advice, and return the best-scoring prediction.