Signature¶
gepa.proposer.reflective_mutation.base.Signature()
dataclass
¶
Attributes¶
prompt_template: str
class-attribute
¶
input_keys: list[str]
class-attribute
¶
output_keys: list[str]
class-attribute
¶
Functions¶
prompt_renderer(input_dict: Mapping[str, Any]) -> str | list[dict[str, Any]]
classmethod
¶
output_extractor(lm_out: str) -> dict[str, str]
classmethod
¶
run(lm: LanguageModel, input_dict: Mapping[str, Any]) -> dict[str, str]
classmethod
¶
run_with_metadata(lm: LanguageModel, input_dict: Mapping[str, Any]) -> tuple[dict[str, str], str | list[dict[str, Any]], str]
classmethod
¶
Like run(), but also returns the rendered prompt and raw LM output.
Returns:
| Type | Description |
|---|---|
tuple[dict[str, str], str | list[dict[str, Any]], str]
|
A tuple of (extracted_output, rendered_prompt, raw_lm_output). |