| 34 | return verify_correction_function |
| 35 | |
| 36 | def extract_output_function(task_description,extract_output_function): |
| 37 | prompt = f"Please understand the {task_description} task and write the python code to generate a extract output function for {task_description} according to the {extract_output_function} extract output function as an example." |
| 38 | extract_output_function = query(prompt) |
| 39 | return extract_output_function |
| 40 | |
| 41 | def reward_class(task_description,reward_function,verify_correction_function,extract_output_function): |
| 42 | prompt = f"Please understand the {task_description} task and {reward_function} reward function and {verify_correction_function} verify correction function and {extract_output_function} extract output function and generate a python code to reward class for {task_description}." |