Dsxir.Predictor.CodeExec.Signatures (dsxir v0.4.0)

Copy Markdown

Builds the three synthetic signatures the engine drives, the same way Dsxir.Predictor.ChainOfThought builds its reasoning-augmented signature. All three are %Dsxir.Signature.Compiled{}.

All three builders take the user's original signature (a signature module or %Dsxir.Signature.Compiled{}), never the output of another builder. Passing a synthetic signature back in would compound instructions incorrectly. The engine always calls them with the user's signature.

Summary

Functions

Builds the round-0 signature: the user's inputs plus a :generated_code output, instructed to write Elixir against the bound input variables.

Builds the retry signature: the user's inputs plus :previous_code and :error inputs and a :generated_code output, instructed to fix the prior attempt.

The input_names argument is accepted for call-site uniformity with the other builders and is unused here.

Functions

code_generate(signature, input_names)

Builds the round-0 signature: the user's inputs plus a :generated_code output, instructed to write Elixir against the bound input variables.

code_regenerate(signature, input_names)

Builds the retry signature: the user's inputs plus :previous_code and :error inputs and a :generated_code output, instructed to fix the prior attempt.

generate_output(signature, input_names)

The input_names argument is accepted for call-site uniformity with the other builders and is unused here.