Skip to content

Commit 5b5d0e3

Browse files
committed
fix(core): update task agent thinking
1 parent 1c6eff0 commit 5b5d0e3

1 file changed

Lines changed: 17 additions & 19 deletions

File tree

  • src/server/core/acontext_core/llm/prompt

src/server/core/acontext_core/llm/prompt/task.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,22 @@ def system_prompt(cls) -> str:
2828
2929
## Analysis Guidelines
3030
### Planning Detection
31-
- Look for explicit task planning language ("My plan is to..."), user requirements
32-
- Only planning confirmed by agent should be considered as planning.
33-
- Messages that cause you to create/update tasks.
34-
- Planning messages often consist of user and agent discussions, append those messages to planning section.
31+
- Planning messages often consist of user and agent discussions, clarify what's tasks to do at next.
32+
- Append those messages to planning section.
3533
36-
### New Task Creation
37-
- Avoid creating tasks for simple questions answerable directly
34+
### Task Creation/Modifcation
35+
- Collect planned tasks from converations.
36+
- Tasks are often confirmed by the agent's response to user's requirements.
3837
- Only collect tasks stated by agents/users, don't invent them
39-
- User's requirement should be confimed by the agent's response, then it becomes a valid task.
40-
- Make sure you insert the task in logical order, not the mentioned order.
41-
- Ensure no task overlap, make sure the tasks are MECE(mutually exclusive, collectively exhaustive).
42-
- When valid new tasks mentioned, always try to capture them all, not only the first one.
43-
- No matter the task will be executed or not, so long as the agent confirm the task, you should create/update them.
44-
45-
#### Task Modification/Creation
46-
When user asked for tasks modification and agent confirmed, you need to think:
47-
a. user/agent is inside/referring a existing task
48-
b. user/agent is creating a new task
49-
If (a), modify the existing task' description using `update_task` tool.
50-
If (b), create anew task following the New Task Creation guidelines.
38+
- Readout the existing tasks, make sure you will locate the correct existing task when user/agent talks about them.
39+
- Ensure the new tasks are MECE(mutually exclusive, collectively exhaustive) to existing tasks.
40+
- No matter the task is actionable/executable or not, you job is to honestly record every possible new tasks.
41+
- When user asked for tasks modification and agent confirmed, you need to think:
42+
a. user/agent is inside/referring an existing task
43+
b. user/agent is creating a new task that don't have any similar existing task.
44+
If (a), modify the existing task' description using `update_task` tool.
45+
If (b), create a new task following the New Task Creation guidelines.
46+
Understand the Current Tasks, and if not necessary, don't create a similar task, try to locate the existing task and modify it.
5147
5248
### Append Messages to Task
5349
- Match agent responses/actions to existing task descriptions and contexts
@@ -71,8 +67,10 @@ def system_prompt(cls) -> str:
7167
7268
## Report your thinking before calling tools
7369
Use extremely brief wordings to report:
74-
- Any planning and task creation/modification mentioned?
70+
- Any new user requirement or planning ? For each task, is it a task modification or creation situation?
71+
- How existing tasks are related to current conversation? Do the existing tasks need to be updated?
7572
- Messages are contributed to which task?
73+
- Do New/Existing tasks' status need to be updated?
7674
- Briefly describe your actions.
7775
- Conform your will call every necessary tools in one response.
7876

0 commit comments

Comments
 (0)