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

[Bug]: Agents inventing their own names, calling each other wrong names.Changing their names in between 2 answers #1499

Closed abhishekrai43 closed 7 months ago

abhishekrai43 commented 7 months ago

Autogen Verson is 0.2.6

Describe the bug

user_proxy = autogen.UserProxyAgent(
    name="User_proxy",
    system_message="A human admin.",
    code_execution_config={
        "last_n_messages": 2,
        "work_dir": "groupchat",
        "use_docker": False,
    },  # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly.
    human_input_mode="TERMINATE",
)
ceo = autogen.AssistantAgent(
    system_message="You are a CEO of an IT company. I need accurate answers from my CTO and CMO . The answers need to address the queries in entirety and then some. They should show the brilliance of the team in coming up with practical, unique if needed and robust solutions to the queries. Each Team member must stick to their respective roles only and not comment as another team member",
    name="Peter",
    llm_config=llm_config,
)
cto = autogen.AssistantAgent(
    name="Sarah",
    system_message="You are a CTO Expert with 30 years of experience and a PhD in Computer Science from MIT. I have a wealth of knowledge in all technical aspects of the underlying projects and product. I take all scientific , product development, and delivery related judgements, ensuring they are sound.  My answers are rooted in authenticity and accuracy. I work in tandem with the CMO to output the best possible solution to present to our CEO",
    llm_config=llm_config,
)
cmo = autogen.AssistantAgent(
    name="Andy",
    system_message="You are a CMO Expert with 30 years of experience and MBA from Harvard Business School. I look at all marketing, advertising, sales, promotion, press-releases, company communications, related aspects and  issues deeply, think step by step and then answer after carefully considering all edge cases, unforeseen events and also cover the basics with ironclad logical thinking.",
    llm_config=llm_config,
)
groupchat = autogen.GroupChat(agents=[user_proxy, ceo, cmo,cto], messages=[], max_round=12)
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)
user_proxy.initiate_chat(
    manager, message="we are considering a massive LinkedIn ad campaign for out chatbot product. This product is a game changer but, we have not done any real outreach to date. Please provide the pluses and minuses to coming out of the gat with a large LinkedIn campaign. When you respond, please announce your name in the first part of your answer."
)

User_proxy (to chat_manager):

we are considering a massive LinkedIn ad campaign for out chatbot product. This product is a game changer but, we have not done any real outreach to date. Please provide the pluses and minuses to coming out of the gat with a large LinkedIn campaign. When you respond, please announce your name in the first part of your answer.


Andy (to chat_manager):

Hello! My name is John, and I will be happy to address your question about a large LinkedIn ad campaign for your chatbot product.

When considering a large LinkedIn ad campaign as your first major outreach effort, there are both positives and potential challenges to consider. Let's explore the pluses and minuses:
...

I hope this provides you with some insights to make an informed decision about your LinkedIn ad campaign. Let me know if you have any further questions!


Peter (to chat_manager):

Hello, my name is Emily, and I am the Chief Marketing Officer (CMO) of our IT company. I'd like to provide additional insights regarding the pluses and minuses of launching a large LinkedIn ad campaign for your chatbot product.

.....

I hope these insights from a marketing standpoint are helpful to you. Please feel free to reach out if you have any further questions or need additional guidance!


Andy (to chat_manager):

Hello Emily, thank you for providing additional valuable insights as a fellow CMO. Your points about professional credibility and networking opportunities on LinkedIn are indeed important aspects to consider when launching a large ad campaign on the platform. Engaging with potential customers and industry .... Thank you for your valuable contribution to this discussion, Emily. I appreciate the additional insights you provided, and I'm sure they will be valuable to the individual seeking guidance on their LinkedIn ad campaign.


Sarah (to chat_manager):

Andy Hi, Thank you for the compliments. I am actually John not Emily and not a person Proxy. Apologies if there was any confusion. Let me know if you have any further questions or need any other assistance.


Peter (to chat_manager):

Apologies for the confusion, John. Thank you for clarifying. Should you have any further questions or require any additional assistance, please don't hesitate to reach out.


Andy (to chat_manager):

No problem, Peter. Thank you for the understanding. I'm here to help if you have any further questions or need any more assistance. Feel free to reach out at any time.


USING AUTO REPLY... User_proxy (to chat_manager):


Sarah (to chat_manager):

Hello! My name is [Your Name], and I am an AI language model trained to assist with technical and product-related questions. How can I help you today?


Peter (to chat_manager):

I apologize for any confusion earlier. As an AI language model, I am here to assist you with any questions or concerns you may have. Please let me know how I can help you, whether it's regarding technical information, product recommendations, or any other topic you'd like assistance with.


USING AUTO REPLY... User_proxy (to chat_manager):


USING AUTO REPLY... User_proxy (to chat_manager):

Here is the LLM Config

config_list = [
    {
        "model": "gpt-4-turbo",
        "api_key": os.getenv('OPENAI_API_KEY')
    },
    {
        "model": "gpt-3.5-turbo",
        "api_key":os.getenv('OPENAI_API_KEY')

    }
]   I just copied an Autogen example from autogen examples and changed the prompts. 

Steps to reproduce

https://github.com/microsoft/autogen/blob/main/notebook/agentchat_groupchat.ipynb ..Using this example with my prompts

Expected Behavior

Agents should refer to themselves and other agents with correct names

Screenshots and logs

No response

Additional Information

No response

abhishekrai43 commented 7 months ago

Should we be using description instead of system_message?

abhishekrai43 commented 7 months ago

Tried using description and it seems like it works correctly..shall test some more