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
add reflexion agent #13089
add reflexion agent #13089
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Was wondering if it made sense to add a |
For CRITIC, I probably will just implement it for now within |
Yea I was trying to think of a generic way to do this. Adding a "reflection" method to the agent feels a little too specific though 🤔 unless you meant just a general utils function somewhere (then Maybe that's nice, like a little tool box of agent reasoning tools when building a custom loop?) |
I agree having a public method I like the sounds of the general utils approach for agents to use. How would you envision implementing something like this? |
@@ -0,0 +1,502 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #60. return reflection, ChatMessage.from_str(feedback_str, role="user")
Should the reflection take on the role of "user" or "assistant"?
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its supposed to mimic feedback from a human/3rd-party, so user makes sense to me 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, just about 10-15 mins ago I had to similar things for CRITIC implementation lol. This makes more sense to me now -- my b.
@nerdai Yea I don't know how feasible or extensible it is, but having a set of tools that have the same API interface to use when designing run_step loops might be useful I tried doing this at one point, but everything is use-case specific that I wasn't finding it easy to generalize. Maybe a common API interface is just not possible |
I've adapted the self reflection class and ported over to #13108 instead. I've listed you (@jerryjliu) as the author for it in the llamahub metadata 😀 As such, I'm closing this PR! |
lol don't worry about attribution i'm going to say you made it on the outgoing socials |
lol i figured as much -- excuse my pedantic nature haha |
No description provided.