Skip to content

Conversation

@iceljc
Copy link
Collaborator

@iceljc iceljc commented Jul 23, 2025

PR Type

Enhancement


Description

  • Clarified router agent instruction for handling user requests

  • Improved guidance on when to route vs respond directly


Diagram Walkthrough

flowchart LR
  A["User Request"] --> B["Router Agent"]
  B --> C["Available Agent?"]
  C -->|Yes| D["Route to Agent"]
  C -->|No/Greeting| E["Respond Directly"]
  D --> F["Agent Handles Args"]
Loading

File Walkthrough

Relevant files
Enhancement
instruction.liquid
Router instruction clarity improvements                                   

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

  • Enhanced step 5 to clarify routing conditions and agent availability
  • Added "then" clause to step 6 for better logical flow
  • Improved wording for agent argument handling responsibility
+2/-2     

@iceljc iceljc merged commit d56d405 into SciSharp:master Jul 23, 2025
3 of 4 checks passed
@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 condition "available agent to proceed" in step 5 is vague and may cause confusion about when routing should occur. The criteria for determining agent availability should be more specific.

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

@qodo-merge-pro
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Clarify ambiguous routing condition

The condition "available agent to proceed" is vague and could lead to confusion
about when routing should occur. Consider clarifying what constitutes an
"available agent" or remove this ambiguous condition to maintain consistency
with the original logic.

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 and available agent to proceed. Do not ask user to provide any required args by yourself. The requested agent will handle and fill the required args internally.
+5. Call function route_to_agent if user have specific requests. Do not ask user to provide any required args by yourself. The requested agent will handle and fill the required args internally.
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the phrase "and available agent to proceed" is ambiguous for an AI agent's instruction set, and removing it improves clarity and prevents potential misinterpretation.

Medium
  • 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