opto.optimizers.opro¶
OPRO ¶
Bases: OptoPrime
user_prompt_template
class-attribute
instance-attribute
¶
user_prompt_template = dedent(
"\n Below are some example variables and their feedbacks.\n\n {examples}\n\n ================================\n\n {instruction}\n "
)
output_format_prompt
class-attribute
instance-attribute
¶
output_format_prompt = dedent(
'\n Output_format: Your output should be in the following json format, satisfying\n the json syntax:\n\n {{\n "suggestion": {{\n <variable_1>: <suggested_value_1>,\n <variable_2>: <suggested_value_2>,\n }}\n }}\n\n When suggestion variables, write down the suggested values in "suggestion".\n When <type> of a variable is (code), you should write the new definition in the\n format of python code without syntax errors, and you should not change the\n function name or the function signature.\n\n If no changes or answer are needed, just output TERMINATE.\n '
)
default_objective
class-attribute
instance-attribute
¶
construct_prompt ¶
Construct the system and user prompt.