Skip to content
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

Rename evaluate_code to analyze_code #1371

Merged
merged 6 commits into from
Apr 19, 2023
Merged

Rename evaluate_code to analyze_code #1371

merged 6 commits into from
Apr 19, 2023

Conversation

willcallender
Copy link
Contributor

Background

As seen in #101 and #286, GPT-3.5 misinterprets "evaluate" to mean "execute" rather than "analyze". As such, I changed the name of the function to "analyze" to make the purpose of the function more clear to the AI.

Changes

Renamed the evaluate_code command to analyze_code everywhere it appears, including the function names and the text as it's given to the AI.

Documentation

I tested with several simple prompts, namely hello world programs in various languages, and I haven't seen this error since making the change.

Test Plan

I used the same basic AI personality for these tests, specifically I used Dev-GPT, an AI designed to autonomously develop, run, and test code. I gave it a single goal which was "Write and run a simple hello world program in [language]." I tested Python and Rust, it didn't always succeed but it never got confused by evaluate_code.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

From my own observations and others (ie  #101 and #286) ChatGPT seems to think that `evaluate_code` will actually run code, rather than just provide feedback. Since changing the phrasing to `analyze_code` I haven't seen the AI make this mistake.
Handles Docker errors separately, and prints a potentially helpful message for users.
@nponeccop
Copy link
Contributor

@willcallender There are conflicts now

nponeccop
nponeccop previously approved these changes Apr 16, 2023
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@willcallender
Copy link
Contributor Author

@willcallender There are conflicts now

Sorry, but where can I see the conflicts? Normally I'd use the resolve conflicts button but it's greyed out for me.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@willcallender
Copy link
Contributor Author

I've tested the changes and they still work as expected.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

Pwuts
Pwuts previously approved these changes Apr 18, 2023
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Pwuts Pwuts requested a review from BillSchumacher April 18, 2023 00:25
@Pwuts Pwuts linked an issue Apr 18, 2023 that may be closed by this pull request
@Pwuts Pwuts added the enhancement New feature or request label Apr 18, 2023
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 19, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@Pwuts Pwuts merged commit 8532307 into Significant-Gravitas:master Apr 19, 2023
sindlinger pushed a commit to Orgsindlinger/Auto-GPT-WebUI that referenced this pull request Sep 25, 2024
ChatGPT is less confused by this phrasing

From my own observations and others (ie  Significant-Gravitas#101 and Significant-Gravitas#286) ChatGPT seems to think that `evaluate_code` will actually run code, rather than just provide feedback. Since changing the phrasing to `analyze_code` I haven't seen the AI make this mistake.

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

AI seems to think that "evaluate code" runs it
4 participants