最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ms autogen - RetrieveUserProxyAgent Seems Not Initialized When Groupchat Starts From UserProxyAgent - Stack Overflow

programmeradmin1浏览0评论

I’m trying to use AutoGen's RetrieveUserProxyAgent along with GroupManager without initiating the chat from that agent, but I’m facing some issues.

Agents Setup I have defined the following four agents:

navigator - AssistantAgent: Handles general navigation boss - UserProxyAgent: Interacts with the user expert - RetrieveUserProxyAgent: Can search for special information expertSub - AssistantAgent: Answers user queries based on the information retrieved by expert

GroupChat Setup Here’s how I have set up the GroupChat:

groupchat = autogen.GroupChat(
    agents=[boss, navigator, expert, expertSub], messages=[], max_round=12,
    speaker_selection_method=custom_speaker_selection_func,
)
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)

Issue Description If I start the chat using RetrieveUserProxyAgent, as seen in many tutorials, like in (A), it works fine—at least in terms of retrieving information:

(A) Start from expert:

result = expert.initiate_chat(
    manager,
    message=expert.message_generator,
    problem=firstQuery,
    n_results=2,
)

However, conceptually, I think it would make more sense for the conversation to start with boss, since the user’s question should determine whether expert is needed or not. So I want to implement the following instead:

(B) Start from boss:

result = boss.initiate_chat(
    manager,
    message=firstQuery
)

With (B), it works fine for queries that are expected to be handled by navigator. However, when the task is delegated to expert through GroupManager, the program exits with only the message:

Next speaker: Expert

there is no error,exception.

When I initiate from expert, I can see initialization logs related to chromadb in the terminal. But when I start from boss, those logs don’t appear, which leads me to suspect that chromadb is not being initialized properly in this case.

Question If RetrieveUserProxyAgent does not initiate the chat, how should it be correctly initialized?

I tried initiating the chat from boss (UserProxyAgent) instead of expert (RetrieveUserProxyAgent). I expected that if a query required retrieval, GroupManager would delegate the task to expert, and RetrieveUserProxyAgent would properly initialize and fetch results.

However, when the conversation reaches expert, the program stops with "Next speaker: Expert", and no retrieval happens. Additionally, I noticed that when starting from boss, chromadb initialization logs do not appear, suggesting that RetrieveUserProxyAgent is not being properly initialized in this case.

I’m trying to use AutoGen's RetrieveUserProxyAgent along with GroupManager without initiating the chat from that agent, but I’m facing some issues.

Agents Setup I have defined the following four agents:

navigator - AssistantAgent: Handles general navigation boss - UserProxyAgent: Interacts with the user expert - RetrieveUserProxyAgent: Can search for special information expertSub - AssistantAgent: Answers user queries based on the information retrieved by expert

GroupChat Setup Here’s how I have set up the GroupChat:

groupchat = autogen.GroupChat(
    agents=[boss, navigator, expert, expertSub], messages=[], max_round=12,
    speaker_selection_method=custom_speaker_selection_func,
)
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)

Issue Description If I start the chat using RetrieveUserProxyAgent, as seen in many tutorials, like in (A), it works fine—at least in terms of retrieving information:

(A) Start from expert:

result = expert.initiate_chat(
    manager,
    message=expert.message_generator,
    problem=firstQuery,
    n_results=2,
)

However, conceptually, I think it would make more sense for the conversation to start with boss, since the user’s question should determine whether expert is needed or not. So I want to implement the following instead:

(B) Start from boss:

result = boss.initiate_chat(
    manager,
    message=firstQuery
)

With (B), it works fine for queries that are expected to be handled by navigator. However, when the task is delegated to expert through GroupManager, the program exits with only the message:

Next speaker: Expert

there is no error,exception.

When I initiate from expert, I can see initialization logs related to chromadb in the terminal. But when I start from boss, those logs don’t appear, which leads me to suspect that chromadb is not being initialized properly in this case.

Question If RetrieveUserProxyAgent does not initiate the chat, how should it be correctly initialized?

I tried initiating the chat from boss (UserProxyAgent) instead of expert (RetrieveUserProxyAgent). I expected that if a query required retrieval, GroupManager would delegate the task to expert, and RetrieveUserProxyAgent would properly initialize and fetch results.

However, when the conversation reaches expert, the program stops with "Next speaker: Expert", and no retrieval happens. Additionally, I noticed that when starting from boss, chromadb initialization logs do not appear, suggesting that RetrieveUserProxyAgent is not being properly initialized in this case.

Share Improve this question edited 1 hour ago DarkBee 15.6k8 gold badges70 silver badges115 bronze badges asked 2 days ago TeranTeran 211 bronze badge New contributor Teran is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

1 Answer 1

Reset to default 0

Today, I found an article stating that if you want to initialize a chat from an agent other than RetrieveUserProxyAgent, you should call and use RetrieveUserProxyAgent from a function. Therefore, I will fundamentally revise it in this direction.

I apologize for asking a question due to my lack of basic understanding.

https://microsoft.github.io/autogen/0.2/blog/2023/10/18/RetrieveChat/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论