-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix FP termination in step3_azure_ai_agent_group_chat.py #10771
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
Closed
thecsw
wants to merge
2
commits into
microsoft:main
from
thecsw:sandy/step3_azure_ai_agent_group_chat_termination
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This probably won't work for all cases. For example, this will trigger the termination too: "It wasn't approved."
I wonder if tuning the REVIEWER INSTRUCTIONS prompt will be a better solution.
Uh oh!
There was an error while loading. Please reload this page.
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.
Good note, I tried doing that first with updating the instruction blob with,
LLMs being LLMs, they don't take commands and would still produce consistently,
I haven't seen it saying something with
"It wasn't approved"
, not putting it behind the model to generate, though.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.
We can adjust the termination keyword to something like
TERMINATE
. This can depend on the model used, too -- for example -gpt-4o-mini
may handle it differently compared togpt-4o
.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.
Similar to what @TaoChenOSU said, I'm more keen on adjusting the Reviewer's instructions to better communicate the termination criteria -- that's either telling it to switch to using
TERMINATE
if approved. Or respond withAPPROVED
and instructing it to use all caps.I understand we should have samples that work, but this is a sample. :) It should guide users towards what's possible in applications and it doesn't need to be the end-all-be-all.
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 haven't been seeing issues with the original code. As an exercise, I did the following:
I get these types of results:
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.
@thecsw I'm not convinced there are updates required for the sample. As I mentioned before, these are supposed to be "getting started" samples and should provide some inspiration for how one can start -- the dev can absolutely take the sample and improve it on their own.
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.
Hi, @moonbox3! Apologies for a delay. Yes, thinking about it more, it works as is. "Stochastic nature of LLMs, etc." sometimes it writes "Not approved" and sometimes it goes through and gives expected nudges. In any case, even if this is an issue—since this is an onboarding script, if they do encounter this, they'd have a great opportunity to debug and learn more.