You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to orchestrate a multi agent system with 7 agents - (weather_agent, summary_agent, email_agent, document_agent, calculation_agent, web_agent, orchestrator_agent). I have used selection and termination strategies from prompt like below
selection_prompt -
f"""
Examine the provided RESPONSE and choose the next participant.
State only the name of the chosen participant without explanation.
Never choose the participant named in the RESPONSE.
Choose only from these participants:
- {"Document_Agent"}
- {"Summary_Agent"}
- {"Web_Agent"}
- {"Email_Agent"}
- {"Calculation_Agent"}
- {"Weather_Agent"}
- {"Orchestrator_Agent"}
Rules
- If the RESPONSE is user input and it asks about documents or files, select {"Document_Agent"}
- If the RESPONSE is by {"Document_Agent"}, it is {"Web_Agent"}'s turn,
- If the RESPONSE is by {"Web_Agent"} it is {"Summary_Agent"}'s turn.
- If the RESPONSE is user input and it asks about the internet or online sources, select {"Web_Agent"}
- If the RESPONSE is user input and it asks to send, draft, or manage emails, select {"Email_Agent"}.
- If the RESPONSE is user input and it asks to perform any kind of math, logic, or numerical task, select {"Calculation_Agent"}.
- If the RESPONSE is user input and it asks about weather, select {"Weather_Agent"}
- If the RESPONSE is by {"Weather_Agent"} it is {"Calculation_Agent"}'s turn to convert the temperature from F to C.
- If the RESPONSE is by {"Weather_Agent"} and if it asks to send an email then its {"Email_Agent"}'s instead of {"Calculation_Agent"}'s turn.
- If the RESPONSE is by {"Summary_Agent"} it is {"Orchestrator_Agent"}'s turn.
- If the RESPONSE is by {"Email_Agent"} it is {"Orchestrator_Agent"}'s turn.
- If the RESPONSE is by {"Calculation_Agent"} it is {"Orchestrator_Agent"}'s.
RESPONSE:
{{{{$history}}}}
"""
termination_prompt -
f"""
If the RESPONSE is by "Orchestrator_Agent" or if its exit, then respond with {TERMINATION_KEYWORD}.
RESPONSE:
{{{{$history}}}}
"""
The selection seems to be working well but I am facing issues with the termination. I have tried the termination prompts from the samples provided in documentation or in github but nothing seems to end the chat. It continues till the rate limit is reached. I have given a different kernel to the KernelFunctionTerminationStrategy, KernelFunctionSelectionStrategy and the rest of my agents . This is how I am using the termination_function
KernelFunctionTerminationStrategy(
agents=[orchestrator_agent],
function=termination_function,
kernel=create_kernel(service_id="termination"),
result_parser=lambda result: TERMINATION_KEYWORD in str(result.value[0]).lower(),
history_variable_name="history",
maximum_iterations=10,
history_reducer=history_reducer,
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to orchestrate a multi agent system with 7 agents - (weather_agent, summary_agent, email_agent, document_agent, calculation_agent, web_agent, orchestrator_agent). I have used selection and termination strategies from prompt like below
selection_prompt -
f"""
Examine the provided RESPONSE and choose the next participant.
State only the name of the chosen participant without explanation.
Never choose the participant named in the RESPONSE.
termination_prompt -
f"""
If the RESPONSE is by "Orchestrator_Agent" or if its exit, then respond with {TERMINATION_KEYWORD}.
The selection seems to be working well but I am facing issues with the termination. I have tried the termination prompts from the samples provided in documentation or in github but nothing seems to end the chat. It continues till the rate limit is reached. I have given a different kernel to the KernelFunctionTerminationStrategy, KernelFunctionSelectionStrategy and the rest of my agents . This is how I am using the termination_function
KernelFunctionTerminationStrategy(
agents=[orchestrator_agent],
function=termination_function,
kernel=create_kernel(service_id="termination"),
result_parser=lambda result: TERMINATION_KEYWORD in str(result.value[0]).lower(),
history_variable_name="history",
maximum_iterations=10,
history_reducer=history_reducer,
)
Beta Was this translation helpful? Give feedback.
All reactions