Skip to content

Commit 3be142f

Browse files
authored
Merge pull request #1386 from yileicn/master
optimize user_goal_agent,next_action_agent
2 parents 62931cf + 3114bec commit 3be142f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/route_to_agent.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"properties": {
77
"next_action_agent": {
88
"type": "string",
9-
"description": "Agent for next action based on user latest response"
9+
"description": "Agent for next action based on user's latest response and active goal."
1010
},
1111
"next_action_reason": {
1212
"type": "string",
1313
"description": "The reason why route to this agent."
1414
},
1515
"user_goal_agent": {
1616
"type": "string",
17-
"description": "Agent who can achieve the user's active request."
17+
"description": "Agent who can achieve the user's active goal."
1818
},
1919
"conversation_end": {
2020
"type": "boolean",

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/reasoner.naive.liquid

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ Route to the last handling agent in priority.
33
{% if expected_next_action_agent != empty -%}
44
Expected next action agent is {{ expected_next_action_agent }}.
55
{%- else -%}
6-
Next action agent is inferred based on user lastest response.
6+
Next action agent is determined from the latest user message in the context of the active user goal.
7+
If the user only provides requested information, keep the previous next action agent or fall back to the agent for the active user goal.
78
{%- endif %}
89
{% if expected_user_goal_agent != empty -%}
910
Expected user goal agent is {{ expected_user_goal_agent }}.
1011
{%- else -%}
11-
User goal agent is inferred based on the user's active request.
12-
If the latest user message starts a new request, use the latest request; otherwise keep the existing active request.
12+
User goal agent is inferred from the user's active goal.
13+
Keep the existing user goal agent unless the latest user message explicitly starts a different task or workflow.
1314
{%- endif %}

0 commit comments

Comments
 (0)