Skip to content

Conversation

@iceljc
Copy link
Collaborator

@iceljc iceljc commented Jul 23, 2025

PR Type

Enhancement


Description

  • Updated router instruction logic for agent routing

  • Added specific routing guidance for user requests

  • Clarified greeting and non-specific request handling


Diagram Walkthrough

flowchart LR
  A["User Request"] --> B["Router Instruction"]
  B --> C["route_to_agent function"]
  B --> D["response_to_user function"]
  C --> E["Handle specific requests"]
  D --> F["Handle greetings/non-specific"]
Loading

File Walkthrough

Relevant files
Enhancement
instruction.liquid
Enhanced agent routing instruction logic                                 

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid

  • Modified step 5 to call route_to_agent for specific requests
  • Added new step 6 for greeting/non-specific request handling
  • Enhanced routing logic to prevent router from asking for arguments
+2/-1     

@qodo-merge-pro
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Clarity

The distinction between "specific requests" and "greeting or do not have specific request" may be ambiguous. The routing logic should clearly define what constitutes a specific request versus a non-specific one to avoid confusion in agent routing decisions.

5. Call function route_to_agent if user have specific requests, let agent handle and fill the required args, do not ask user to provide any args by yourself.
6. If user is greeting or do not have specific request, you can call function response_to_user with a greeting message.

@iceljc iceljc merged commit 9ad7df1 into SciSharp:master Jul 23, 2025
3 of 4 checks passed
@qodo-merge-pro
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Fix subject-verb agreement error

Fix grammatical error in the instruction. "Have" should be "has" to maintain
proper subject-verb agreement with the singular subject "user".

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid [8]

-5. Call function route_to_agent if user have specific requests, let agent handle and fill the required args, do not ask user to provide any args by yourself.
+5. Call function route_to_agent if user has specific requests, let agent handle and fill the required args, do not ask user to provide any args by yourself.
  • Apply / Chat
Suggestion importance[1-10]: 2

__

Why: The suggestion correctly identifies a minor grammatical error ("user have" instead of "user has") in the instruction text, which improves clarity.

Low
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant