Issue with Function Input in AgentGroupChat with Multiple Agents Using Python #9955
-
Hi everyone, I'm encountering an issue while working with AgentGroupChat in Semantic Kernel. When I use only one chat (single agent), the function calling works perfectly, and the input provided to the function is accurate and as expected. However, when I increase the number of agents to two or more, the input values passed to the function become incorrect and arbitrary, leading to unexpected results. It seems like the coordination between agents may be introducing inconsistencies in how inputs are generated or passed to the functions. Has anyone else faced this issue, or does anyone have suggestions on how to ensure accurate function input when using multiple agents in AgentGroupChat? Any help would be greatly appreciated! Thank you! This is a sample structure of the code Belowfrom azure.core.credentials import AzureKeyCredential Placeholder for loading sensitive configurationdef load_config(file_path="config.json"): Load sensitive configurationconfig = load_config() azure_ai_endpoint = "<YOUR_AZURE_ENDPOINT>" load_dotenv() class Retrieval:
planner_kernel = Kernel() planner_agent = ChatCompletionAgent( teacher_kernel = Kernel() teacher_agent = ChatCompletionAgent( multi_chat = AgentGroupChat( async def async_output(standard: str, grade: str, kagan: str) -> str:
Example usageresult = asyncio.run(async_output("SC.5.E.5.1", "5", "No")) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @lovedeepatsgit, thank you for your question and for providing the details/context. A few questions for you:
I'd love to see the chat history which can help provide some insight into how the chat history is managed between the two agents. If a tool call is required by one agent, that one agent should run the auto tool logic until it has a result, and then come back so that the other agent has a chance to run (depending upon the selection strategy or termination strategy). |
Beta Was this translation helpful? Give feedback.
Hi @lovedeepatsgit, thank you for your question and for providing the details/context. A few questions for you:
However, when I increase the number of agents to two or more, the input values passed to the function become incorrect and arbitrary, leading to unexpected results.
. Do you have a chat history that shows this "weirdness?"…