Typed internal predictors used by instruction, rule, and value optimizers.
Every proposal is an ordinary predictor call under the explicit :proposal
role, so it is rendered by that role's adapter, validated against a typed
output schema, and counted against the run's call limit. Proposed text is
trimmed, deduplicated, and bounded before use. Proposals see training
evidence only.
Summary
Functions
Compares good and bad trajectories and returns one rule or advice text.
Describes a predictor's task from its signature for proposal prompts.
Renders up to n training examples as evidence text.
Proposes up to n instruction alternatives for one predictor.
Proposes a new list of lessons from the current lessons and training feedback.
Returns the maximum accepted length of one proposed text.
Proposes a revised instruction from feedback on training trajectories.
Rewrites an instruction from feedback.
Derives up to n natural-language rules from successful examples.
Proposes a new JSON-encoded value for a declared parameter.
Functions
@spec contrast( Tune.Search.Program.Context.t(), String.t(), String.t(), String.t(), String.t() ) :: {String.t() | nil, Tune.Search.Program.Context.t()}
Compares good and bad trajectories and returns one rule or advice text.
@spec describe(Tune.Predictor.t()) :: String.t()
Describes a predictor's task from its signature for proposal prompts.
@spec evidence([Tune.Case.t()], non_neg_integer()) :: String.t()
Renders up to n training examples as evidence text.
@spec instructions(Tune.Search.Program.Context.t(), Tune.Predictor.t(), keyword()) :: {[String.t()], Tune.Search.Program.Context.t()}
Proposes up to n instruction alternatives for one predictor.
@spec lessons( Tune.Search.Program.Context.t(), String.t(), [String.t()], String.t(), pos_integer() ) :: {[String.t()] | nil, Tune.Search.Program.Context.t()}
Proposes a new list of lessons from the current lessons and training feedback.
@spec max_text() :: pos_integer()
Returns the maximum accepted length of one proposed text.
@spec reflect(Tune.Search.Program.Context.t(), String.t(), String.t(), String.t()) :: {String.t() | nil, Tune.Search.Program.Context.t()}
Proposes a revised instruction from feedback on training trajectories.
@spec rewrite(Tune.Search.Program.Context.t(), String.t(), String.t(), String.t()) :: {String.t() | nil, Tune.Search.Program.Context.t()}
Rewrites an instruction from feedback.
@spec rules(Tune.Search.Program.Context.t(), String.t(), String.t(), pos_integer()) :: {[String.t()], Tune.Search.Program.Context.t()}
Derives up to n natural-language rules from successful examples.
@spec value( Tune.Search.Program.Context.t(), String.t(), String.t(), String.t(), String.t() ) :: {String.t() | nil, Tune.Search.Program.Context.t()}
Proposes a new JSON-encoded value for a declared parameter.