From b76d1c9497cdf96891155c06aa876d0c5773a4a9 Mon Sep 17 00:00:00 2001 From: "nick.yi" Date: Thu, 23 Jul 2026 17:07:29 +0800 Subject: [PATCH] optimize reasoner naive --- .../functions/route_to_agent.json | 2 +- .../templates/reasoner.naive.liquid | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/route_to_agent.json b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/route_to_agent.json index 01301bbfa..8cb8b99ac 100644 --- a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/route_to_agent.json +++ b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/route_to_agent.json @@ -14,7 +14,7 @@ }, "user_goal_agent": { "type": "string", - "description": "Agent who can acheive user initial task." + "description": "Agent who can achieve the user's active request." }, "conversation_end": { "type": "boolean", diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/reasoner.naive.liquid b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/reasoner.naive.liquid index 3fa0a7f77..94400f673 100644 --- a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/reasoner.naive.liquid +++ b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/reasoner.naive.liquid @@ -8,5 +8,6 @@ Next action agent is inferred based on user lastest response. {% if expected_user_goal_agent != empty -%} Expected user goal agent is {{ expected_user_goal_agent }}. {%- else -%} -User goal agent is inferred based on user initial request. +User goal agent is inferred based on the user's active request. +If the latest user message starts a new request, use the latest request; otherwise keep the existing active request. {%- endif %} \ No newline at end of file