Giter Club home page Giter Club logo

Comments (5)

feynmanloo avatar feynmanloo commented on June 19, 2024

@LittleLittleCloud plz

from autogen.

LittleLittleCloud avatar LittleLittleCloud commented on June 19, 2024

Seems that you forget to register message connector for the helper agent? ( and maybe admin agent as well)

https://github.com/feynmanloo/AutoGen.BasicSamples/blob/07d03885cb3a7b83cdd217f45699da49aa1af355/Example04_Dynamic_GroupChat_Coding_Task.cs#L29

from autogen.

feynmanloo avatar feynmanloo commented on June 19, 2024

Seems that you forget to register message connector for the helper agent? ( and maybe admin agent as well)

https://github.com/feynmanloo/AutoGen.BasicSamples/blob/07d03885cb3a7b83cdd217f45699da49aa1af355/Example04_Dynamic_GroupChat_Coding_Task.cs#L29

@LittleLittleCloud Any document about register messsage connector and other api ?
After I register message connector for the helper agent and admin agent, I got another exceptions,below here:

System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at AutoGen.Core.GroupChat.SelectNextSpeakerAsync(IAgent currentSpeaker, IEnumerable1 conversationHistory) at AutoGen.Core.GroupChat.CallAsync(IEnumerable1 conversationWithName, Int32 maxRound, CancellationToken ct)
at AutoGen.Core.AgentExtension.SendMessageToGroupAsync(IAgent _, IGroupChat groupChat, IEnumerable1 chatHistory, Int32 maxRound, CancellationToken ct) at AutoGen.Core.AgentExtension.SendAsync(IAgent agent, IAgent receiver, IEnumerable1 chatHistory, Int32 maxRound, CancellationToken ct)
at AutoGen.Core.AgentExtension.SendAsync(IAgent agent, IAgent receiver, String message, IEnumerable`1 chatHistory, Int32 maxRound, CancellationToken ct)
at AutoGen.BasicSamples.Example04_Dynamic_GroupChat_Coding_Task.RunAsync(IKernelBuilder kernelBuilder, OpenAIPromptExecutionSettings settings) in C:\Users\Feynman Loo\Documents\Workspaces\AutoGen.BasicSamples\Example04_Dynamic_GroupChat_Coding_Task.cs:line 238

from autogen.

LittleLittleCloud avatar LittleLittleCloud commented on June 19, 2024

@feynmanloo I need to run your code for further investigation. In the meantime, the error indicates that group admin fails to generate the next speaker that is one of the current group members. The fail reason can be various though, it might because of hallucination (fabric an agent that doesn't exist), fail to follow the prompt and generate next speaker in given format (The legitimate format needs to be From xxx, or misconfigure in LLM

from autogen.

LittleLittleCloud avatar LittleLittleCloud commented on June 19, 2024

@feynmanloo I took a look at your code. The issue is caused by missing stop words in admin's prompt setting. You might want to pass [":"] to stop sequence when creating admin. When I add the right stop sequence to admin, the error was gone.
image

However, the task still fail because of group admin fails to generate the next speaker in the right format even after I add stop sequence. I note that you are using llama3:7b as the backend model for all agents, including group admin. Yet the prompt for speaker selection used by group admin is based on gpt-3.5/4. So that might be why the admin fails to follow the prompt here because different LLM behaves differently even using the same prompt. And next speaker selection prompt for GPT-series might not work well with llama-series.

So here is the suggestion that you may try

  • use gpt-3.5/4 for admin, and llama3 for others.
  • If you still want to use llama3 for admin, adding a fallback logic using middleware to admin so it always returns a legitimate next speaker. For example, in the middleware, if the reply from inner agent is not From xxx, return a hard-code value.
  • manually orchestrate agents, for example, having a seperate agent generate step and assign that step to specific agent. In this way you no longer need group chat and can achieve the full flexibility in constructing agentic workflow.

from autogen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.