Closed Youning97 closed 6 months ago
Human ▶ 请用中文回复
╭───< Planner >
├─► [init_plan]
│ 1.
│ 2.
│ 3.
├─► [plan]
│ 1.
│ 2.
├─► [current_plan_step] 2.
├──●
│ 0
│ 1
│ .. ...
│ 3
│ 4
│
│ [5
│ 14 ]
╰──● sending message to User
TaskWeaver ▶
0
1
.. ...
3
4
[5 14 ]
2024-01-29 11:01:52,992 - INFO - LLM output: {"response": [{"type": "init_plan", "content": "1. \n2. \n3. "}, {"type": "plan", "content": "1. \n2. "}, {"type": "current_plan_step", "content": "2. "}, {"type": "send_to", "content": "User"}, {"type": "message", "content": "\n0 \n1 \n.. ... \n3 \n4 \n\n[5 \n14 ]"}]}
Hi, @Youning97 ! Could you provide your example query and the LLM model name you used? Thanks.
我使用的是 openai 的gpt4-1106
HI @zhangxu0307 , I added the legend. In addition, I modified the prompt of the planner to instruct it to reply to the user in Chinese.
Would you mind sharing the revised prompt to us? Thanks.
version: 0.1 instruction_template: |- You are the Planner who can coordinate CodeInterpreter to finish the user task.
The input of the User will prefix with "User:" in the chat history.
{CI_introduction}
Planner MUST NOT talk to the Planner itself.
- planner and user communicate in Chinese.
I have tried other writing methods, for example: planner should reply to User in Chinese. Similar results will still occur
Also when I asked the engineer what the attendance rate was, there was something wrong with the code generated by the CI:
Human ▶ 工程师的出勤率是多少
TaskWeaver ▶ [CodeInterpreter] [thought] ProgramApe will filter the DataFrame 'attendance_data_df' for rows where the '职能' column contains the term '工程师' to identify engineers. Then, it will calculate the attendance rate based on the '在岗时长' column, considering non-null entries as days attended.
├─► [python]
│ # Filter the data for engineers
│ engineers_data = attendance_data_df[attendance_data_df['
│ # Calculate the attendance rate for engineers
│ attendance_days = engineers_data['
│ # The total number of days is the number of rows in the engineers_data DataFrame
│ total_days = len(engineers_data)
│ # The attendance rate is the number of days attended divided by the total number of days
│ attendance_rate = attendance_days / total_days
│
│ # The result is the attendance rate for engineers
│ attendance_rate
”attendance_days = engineers_data['“ Only half of the code here is generated, and the Chinese part is not displayed properly.
When I instruct the planner to use Chinese, after accepting the feedback from codeinterpreter, the output of the planner is empty.
╰──● sending message to Planner ╭───< Planner > ├─► [init_plan] │ 1. │ 2. │ 3. ├─► [plan] │ 1. │ 2. ├─► [current_plan_step] 2. ├──● │ 0 100002 │ 1 900001 │ .. ... │ 3 900004 │ 4 900005 │ │ [5 rows x 14 columns] ╰──● sending message to User