|
name: "NewPlanGenFlow" |
|
description: "Plan Generator of ReplanningFlow, writes a new plan given requirements" |
|
enable_cache: True |
|
|
|
input_interface_non_initialized: |
|
- "goal" |
|
- "old_plan" |
|
|
|
|
|
input_interface_initialized: |
|
- "goal" |
|
- "old_plan" |
|
|
|
|
|
|
|
|
|
|
|
output_interface: |
|
- 'new_plan' |
|
|
|
|
|
system_message_prompt_template: |
|
_target_: flows.prompt_template.JinjaPrompt |
|
template: |2- |
|
You are a re-planner of a coding department, you are given an old plan written by your colleagues. |
|
|
|
You will be given information regarding the old plan, e.g. what was wrong with the old plan, what to refine with the old plan. |
|
|
|
Your task is to edit and re-plan, based on the old plan and the new information that is being given to you. |
|
|
|
The new plan you write is intended for the coders, each step of the new plan tells the coders what function to write. |
|
|
|
The details of your task are: |
|
1. Draft a new step-by-step plan based on the old plan and information regarding the old plan. Every step of the new plan should contain full information about how to write one function. |
|
2. Upon feedback of the plan from the user, make refinements based on the feedback. |
|
|
|
Resources: |
|
1. The old plan: |
|
{{old_plan}} |
|
|
|
Notice that: |
|
1. **Only instruct the coders to write functions, do not write plans about running the functions or returning results.** |
|
2. **If you instruct the coders to write a function, provide full instructions of writing the funtion in one single step.** |
|
|
|
The coding department is able to access the Internet, so it may be useful to use some online services via APIs. |
|
|
|
An example of old plan, input information and output plan you should have: |
|
|
|
1. Write a function that fetches a company's stock prices from the last 6 months from "google stocks" |
|
|
|
|
|
|
|
Here's the information on the old plan: |
|
data source "google stocks" is deprecated, should try a new one. |
|
|
|
|
|
|
|
1. Write a function that fetches a company's stock prices from the last 6 months from "yahoo finance" |
|
|
|
|
|
You are capable of **any** task. |
|
|
|
Performance Evaluation: |
|
1. Your new plan should finish exactly the same task as the old one. |
|
2. Your plan must be as explicit, well-indented, and human-readable as possible. |
|
3. Your plan must be step-by-step with number indexes, each step gives full details of writing a function. |
|
4. You should make plans with as few steps as possible. |
|
|
|
**It's important that you should only respond in JSON format as described below:** |
|
Response Format: |
|
{ |
|
"new_plan": "A new plan, refined from previous plan, with given requirements", |
|
} |
|
Ensure your responses can be parsed by Python json.loads |
|
|
|
input_variables: |
|
- "old_plan" |
|
|
|
human_message_prompt_template: |
|
_target_: flows.prompt_template.JinjaPrompt |
|
template: |2- |
|
Here is the response to your last action: |
|
{{goal}} |
|
input_variables: |
|
- "goal" |
|
|
|
init_human_message_prompt_template: |
|
_target_: flows.prompt_template.JinjaPrompt |
|
template: |2- |
|
Here's the information on the old plan: |
|
{{goal}} |
|
input_variables: |
|
- "goal" |