microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
29.87k stars 4.35k forks source link

[AutoGen Studio] Group Chat Support(Extend DSL fromTwo Agents to Also Support Group Chat) #1285

Open victordibia opened 7 months ago

victordibia commented 7 months ago

What

AutoGen studio provides a json specification (DSL) that gets instantiated (via the workflow manager) into autogen agents. The current version has support for workflows with two agents. This issue is meant to track tasks required to fully support GroupChat.

Task Items

sonichi commented 7 months ago

Please be aware of #857 which extends group chat. There is also a plan to extend it afterwards. @joshkyh please keep @victordibia posted.

afourney commented 7 months ago

This is a good opportunity to rethink default. I suggest:

allow_speaker_repeat = False

last_n_messages = "auto"

Make sure all agents have good descriptions, distinct from system prompts.

joshkyh commented 7 months ago

allow_speaker_repeat = False

Erh are you guys talking about GroupChat default? If so, allow_speaker_repeat has defaulted to True for sometime now. What if:

  1. Users put one agent into GroupChat?
  2. Users put two agents into GroupChat one of which is the Web Browsing agent?

But there might be strong motivations for setting it to False that I'm not aware of, though! :)

afourney commented 7 months ago

The most common scenario outside of AutoGenStudio where where this comes up is with the UserProxyAgent. GPT-4 GroupChat has an extremely bad habit of spamming the UserProxy, constantly asking for a response, in cases where it returns a blank message (the default auto reply when there is no code block). It's probably the most common situation from which loops occur.

Setting allow_repeat_speaker = False is a quick and dirty solution to this.

More generally, allow_repeat_speaker now allows a list. Excluding the UserProxy from this list (while, for example, including the assistant and web browser), is an even better solution. It allows those agents to have multiple consecutive turns... and this is especially helpful for web browsing.

Ideally, better orchestration would just solve the problem.

joshkyh commented 7 months ago

The most common scenario outside of AutoGenStudio where where this comes up is with the UserProxyAgent. GPT-4 GroupChat has an extremely bad habit of spamming the UserProxy, constantly asking for a response, in cases where it returns a blank message (the default auto reply when there is no code block). It's probably the most common situation from which loops occur.

Setting allow_repeat_speaker = False is a quick and dirty solution to this.

More generally, allow_repeat_speaker now allows a list. Excluding the UserProxy from this list (while, for example, including the assistant and web browser), is an even better solution. It allows those agents to have multiple consecutive turns... and this is especially helpful for web browsing.

Ideally, better orchestration would just solve the problem.

Thanks for the clarification!

drosini-ibm commented 5 months ago

Currently in Autogen Studio when I have a Session that is using a GroupChat Workflow, the output message is just the question that I originally asked. Would this roadmap item address that or am I having a different issue ?

victordibia commented 5 months ago

Hi @drosini-ibm ,

What version of autogenstudio do you have? The current version is v 0.0.56

To upgrade

pip install -U autogenstudio
CrosswiredStudios commented 1 month ago

I see many tutorials online showing a group chat workflow option, but the latest version seems to not have it available. Is this a known issue?

victordibia commented 1 month ago

@CrosswiredStudios , group chat worfklow is definitely still supported. The user experience for groupchat has been updated (see video below)

https://github.com/user-attachments/assets/49d4d3e1-c40f-4bb9-9296-d2610abe7feb

CrosswiredStudios commented 1 month ago

Ferris Bueller you're my hero

Thanks! Not sure this is more intuitive UX wise, but i suppose its still easier than writing the scripts.

CrosswiredStudios commented 1 month ago

Its not working. It seems like it might be an issue in autogen itself. I made a blank script that just has the tutorial example code and it fails because a random agent "assistant" chimes in with a blank message.

https://microsoft.github.io/autogen/docs/notebooks/agentchat_groupchat

[2024-07-12 13:08:33.013] [INFO] [LM STUDIO SERVER] Processing queued request... [2024-07-12 13:08:33.014] [INFO] Received POST request to /v1/chat/completions with body: { "messages": [ { "content": "You are in a role play game. The following roles are available:\n User_proxy: A user that can run Python code or input command line commands at a Linux terminal and report back the execution results.\nCoder: A helpful and general-purpose AI assistant that has strong language skills, Python skills, and Linux command line skills.\nProduct_manager: Creative in software product ideas..\n Read the following conversation.\n Then select the next role from ['User_proxy', 'Coder', 'Product_manager'] to play. Only return the role.", "role": "system" }, { "content": "Find a latest paper about gpt-4 on arxiv and find its potential applications in software.", "role": "user", "name": "User_proxy" }, { "content": "Read the above conversation. Then select the next role from ['User_proxy', 'Coder', 'Product_manager'] to play. Only return the role.", "role": "system" }, { "content": "", "role": "assistant" }, { "content": "You didn't choose a speaker. As a reminder, to determine the speaker use these prioritised rules:\n 1. If the context refers to themselves as a speaker e.g. \"As the...\" , choose that speaker's name\n 2. If it refers to the \"next\" speaker name, choose that name\n 3. Otherwise, choose the first provided speaker's name in the context\n The names are case-sensitive and should not be abbreviated or changed.\n The only names that are accepted are ['User_proxy', 'Coder', 'Product_manager'].\n Respond with ONLY the name of the speaker and DO NOT provide a reason.", "role": "system" } ], "model": "lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF", "stream": false } [2024-07-12 13:08:33.014] [ERROR] [Server Error] {"title":"'messages' array must only contain objects with a 'content' field that is not empty"}