gpt-engineer-org / gpt-engineer

Specify what you want it to build, the AI asks for clarification, and then builds it. Completely separate team and codebase from the AI Web App builder https://gptengineer.app
MIT License
51.72k stars 6.73k forks source link

"Prompt" weird issue #220

Closed juarezjl closed 1 year ago

juarezjl commented 1 year ago

I provided it a detailed prompt to build an api using flask (for testing purposes). I included informarion such us:

Task Summary
API Specifications 
        End Points
        Database Design
        Authentication
        Model Training (this was because I was requesting to make some predictions on a simple dataset with 3 features)
Deliverables (based on the Specifications)
        A fully functional API with the endpoints described above.
        PostgreSQL database with the 'example' table.
        JWT authentication setup.
        Trained sklearn Random Forest model for {abc} and {xyz} prediction.
        Proper documentation explaining the API usage, endpoint details, JWT setup, model training process, and database setup.
        Unit tests to verify the API functionality.
End Message
         Please ensure to follow the best practices for API design, machine learning model implementation, secure coding, and database 
         design. It's important that the code is clean, well-documented, and modular. The machine learning model should be accurate 
         and reliable, while the API and database should be secure and efficient.

Every time I pass prompt like this it just build something random like an "Email sender" or a "wheater app". What I'm doing wrong? I'm using gpt 3.5 turbo since I'm on the waitlist for gpt 4.

output log example.

INFO:openai:error_code=model_not_found error_message="The model 'gpt-4' does not exist" error_param=model error_type=invalid_request_error message='OpenAI API error received' stream_error=False
Model gpt-4 not available for provided API key. Reverting to gpt-3.5-turbo. Sign up for the GPT-4 wait list here: https://openai.com/waitlist/gpt-4-api
Program Specification: Automated Email Sender

The program should be able to send automated emails to a list of recipients. The user should be able to specify the email content, subject, and the list of recipients. The program should also be able to handle attachments and schedule the email to be sent at a specific time.

Features:
- Ability to send automated emails to a list of recipients
^C
Aborted!
INFO:openai:error_code=model_not_found error_message="The model 'gpt-4' does not exist" error_param=model error_type=invalid_request_error message='OpenAI API error received' stream_error=False
Model gpt-4 not available for provided API key. Reverting to gpt-3.5-turbo. Sign up for the GPT-4 wait list here: https://openai.com/waitlist/gpt-4-api
Program Specification: Weather App

The Weather App is a program that provides users with current weather information for a given location. The program should be able to display the current temperature, humidity, wind speed, and weather conditions (e.g. sunny, cloudy, rainy, etc.) for the user's specified location. The program should also be able to display a 5-day weather forecast for the same location.

Features:
- User can input a location (city, state, or zip code) to get current weather information and a 5-day forecast.
^C
Aborted!
ooKetch22oo commented 1 year ago

I've recently been having this issue as well. I have a very detailed app description, but gpt-engineer will start to build something random like a Shopping List App, or Online Marketplace.

 `(gpt-engineer) C:\AI Files\gpt-engineer>gpt-engineer projects/teachtrack-5
INFO:openai:error_code=model_not_found error_message="The model 'gpt-4' does not exist" error_param=model error_type=invalid_request_error message='OpenAI API error received' stream_error=False
Model gpt-4 not available for provided API key. Reverting to gpt-3.5-turbo. Sign up for the GPT-4 wait list here: https://openai.com/waitlist/gpt-4-api
Program Specification: Online Marketplace

The program is an online marketplace where users can buy and sell products. The program should have the following features:

## User Authentication
- Users should be able to create an account and log in to the program.
- Users should be able to reset their password if they forget it.
- Users should be able to edit their profile information, including their name, email address, and password.

## Product Listings
- Users should be able to create product listings to sell their products.
- Product listings should include a title, description, price, and image(s).
- Users should be able to edit and delete their product listings.
- Users should be able to search for products by keyword and filter by category, price range, and location.

## Shopping Cart
- Users should be able to add products to their shopping cart.
- Users should be able to view their shopping cart and remove products from it.
- Users should be able to checkout and purchase the products in their shopping cart.

## Payment Processing
- The program should integrate with a payment processing service to handle transactions.
- Users should be able to enter their payment information securely.
- Users should receive a confirmation email after completing a purchase.

## Order History
- Users should be able to view their order history, including details about the products they purchased and the date of purchase.

## Admin Panel
- The program should have an admin panel for managing users and product listings.
- Admins should be able to view and edit user profiles.

Aborted!
- Admins should be able to view and edit
(gpt-engineer) C:\AI Files\gpt-engineer>`

This was from a fresh clone after deleting everything and retrying.

juarezjl commented 1 year ago

I think the problem is that we are using gpt 3.5 turbo instead of gpt4 but I could be wrong.

ooKetch22oo commented 1 year ago

I did a test last night where I gave the main_prompt much less of a description, and instead gave it the intro summary to what I wanted my app to do, and at least it started down the right path. So I wonder if it has something to do with the length of the main-prompt?

patillacode commented 1 year ago

Probably a mix of hallucinations and losing the context window (for big prompts this happens)

Try to use a different model (maybe the 16k one) via the --model gpt-3.5-turbo-0613 parameter.

If you wish to reopen the issue please do following the new issue template.