gpt-engineer-org / gpt-engineer

Platform to experiment with the AI Software Engineer. Terminal based. NOTE: Very different from https://gptengineer.app
MIT License
51.98k stars 6.77k forks source link

Let us give feedback to the AI #560

Closed joeytwiddle closed 1 year ago

joeytwiddle commented 1 year ago

TLDR: I would like to give feedback after the code is generated, so gpt-engineer will re-generate the code.

Problem

  1. I gave gtp-engineer a simple task. It asked me some questions, and then generated a lot of Python code. Which was fine. Except I had forgotten to specify that I wanted JavaScript code!

  2. On another occasion, I gave it a complex task, and it asked me for a lot of details, but then it generated a skeleton project with no actual code inside the methods.

    I would have liked to provide feedback: "Please generate implementations for each method"

    photo_2023-07-27_16-08-08

Solution

At the stage when it shows me the code which would be generated, I wish I could give it more information, before it actually writes the files.

For example, I might say things like:

Minor correction: Please generate the code in C++ instead of Python
or
Please document each function with docstrings.
or
Correction: We should use Z, not Y, for the vertical axis.

This would essentially let me add a new clarification, after seeing the code, and then rerun gpt-engineer's code-generation stage. (Or perhaps check whether gpt-engineer now needs to ask some more questions before proceeding.)

I think this would be very useful, if the developer notices that something is not how they wanted it.

This question to provide corrections/clarifications should be offered on repeat, in case multiple refinements are needed. (But perhaps with a warning that it costs a lot of API tokens!)

This wouldn't really need to be an extra prompt. For example, AutoGPT combines everything into one prompt.

Enter 'y' to proceed, 'n' to quit, or enter feedback?
AntonOsika commented 1 year ago

Enter 'y' to proceed, 'n' to quit, or enter feedback?

Is a good idea but it would require a new architecture for things.

And sometimes you def. just want it to run.

Adding label to revisit this!