LLM-based instruction proposal with configurable templates.
This module generates improved instruction texts by prompting an LLM with the
current instruction and feedback from execution traces. It supports the
upstream <curr_param> / <side_info> template contract and Elixir's legacy
{component_name} / {current_instruction} / {reflective_dataset} form.
Reflective dataset records may include %GEPA.Image{} values. Images are
rendered as [IMAGE-N] markers in the text and sent as multimodal content
parts to compatible reflection LLMs.
Summary
Functions
Returns the default template string.
Create a new instruction proposal configuration.
Propose new instruction text for one component.
Propose new texts for multiple components.
Propose new text for multiple components and retain prompt/raw-output metadata.
Propose new instruction text and retain rendered prompt plus raw LLM output.
Types
Functions
@spec default_template() :: String.t()
Returns the default template string.
Create a new instruction proposal configuration.
Propose new instruction text for one component.
Propose new texts for multiple components.
@spec propose_batch_with_metadata(t(), map(), map(), [String.t()]) :: {:ok, map(), map(), map()} | {:error, term()}
Propose new text for multiple components and retain prompt/raw-output metadata.
@spec propose_with_metadata(t(), String.t(), String.t(), [map()]) :: {:ok, String.t(), prompt(), String.t()} | {:error, term()}
Propose new instruction text and retain rendered prompt plus raw LLM output.