Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
6 tasks done
victordibia opened this issue Jan 16, 2024 · 11 comments
Open
6 tasks done
Labels
group chat group-chat-related issues studio Related to AutoGen Studio.

Comments

@victordibia
Copy link
Collaborator

victordibia commented Jan 16, 2024

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

@victordibia victordibia changed the title [P0] DSL for specifying custom workflows (Two Agents, Group Chat) [AutoGen Studio] Group Chat Support(Extend DSL fromTwo Agents to Also Support Group Chat) Jan 16, 2024
@sonichi
Copy link
Contributor

sonichi commented Jan 16, 2024

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

@afourney
Copy link
Member

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
Copy link
Collaborator

joshkyh commented Jan 17, 2024

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
Copy link
Member

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
Copy link
Collaborator

joshkyh commented Jan 17, 2024

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!

victordibia added a commit that referenced this issue Jan 18, 2024
@gagb gagb added the studio Related to AutoGen Studio. label Jan 19, 2024
@victordibia victordibia removed the ui/deploy user interface & deployment label Jan 26, 2024
@drosini-ibm
Copy link

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
Copy link
Collaborator Author

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
Copy link

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
Copy link
Collaborator Author

victordibia commented Jul 12, 2024

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

  • Build -> Agents -> new agent : create the agents you want to use in a group chat (user proxy or assistants)
  • Build -> Agents -> new agent : create a group chat agent, click create. On the agents tab, add the agents you want. Hint: if your agents will be executing code, ensure you also add a user proxy or any agent that has code execution. Remember to add a model to the groupchat agent (needed for next speaker selection).
  • Build -> workflow -> new workflow -> autonomous chat -> add a user proxy as initiator, and add your groupchat agent (that has other agents in it) as the receipient.
groupchat_1080.mov

@CrosswiredStudios
Copy link

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
Copy link

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"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group chat group-chat-related issues studio Related to AutoGen Studio.
Projects
None yet
Development

No branches or pull requests

7 participants