microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
30.73k stars 4.48k forks source link

GroupChat System Message Perspective Shift #319

Closed afourney closed 7 months ago

afourney commented 10 months ago

Very often system messages are written with the 2nd person perspective:

"You are a helpful agent."...

But in Group Chat, all these system messages are gathered, and handed to the GroupChatManager in one narrative prompt, to decide which agent speaks next. It is possible that all the "You"s in these messages could confuse the GroupChatManager. Arguably, in this context, a 3rd person perspective might be better:

"AssistantAgent is a helpful AI agent. UserProxyAgent is a stand-in for the human operator.... etc."

We should validate this hypothesis, and consider how we might either automatically shift the perspective from 2nd to 3rd person as needed, or alter the GroupChatManager prompt if it turns out to improve orchestration.

LittleLittleCloud commented 10 months ago

It's a good question. I have seen similar discussions in Discord as well that suggest adding a 'self-description' field to replace the original system message of AssistantAgent in group chat which addresses role information in a 1-st manner. e.g (I'm XXX, I can do XXX)

Maybe the methodology is different, but the gist is the same. Which differentiates the system message from the role information in the group chat when selecting the next agent. Anyway, it's worth trying.

afourney commented 10 months ago

I really like that idea. This would also possibly save on tokens, and lead to more concise calls in selecting the next speaker -- the GroupChatManager doesn't need all the nuanced detail for how, for example, the AssistantAgent works (that prompt is quite long!). The self-description field can be much more direct.

krlng commented 7 months ago

Just stumbled accross that one. Guess this can be closed now that there is the description field?

afourney commented 7 months ago

Yup! Good catch