Wikipedia
Search results
Wednesday, April 19, 2023
Show HN: A web decision game 99% coded by GPT4. Uses agent to decide win/loss https://ift.tt/Wys1uGl
Show HN: A web decision game 99% coded by GPT4. Uses agent to decide win/loss Yeah... so I know some software development concepts well I haven't written any code in 10 years, so like half the time was just getting a development setup. At first it suggested PyCharm and honestly it wasted a lot of time. Eventually I got VS Code and GPT just seems to understand it so much better. The real secret to getting good responses with GPT-4 during this I found is to restart the conversation fresh with a complete description of what you need (2-3 paragraphs of detail is great) and the rest as code. [detailed description of what you need, make sure it's detailed and specific add examples if possible] #### [insert all the code, the more you can fit the better] That first code block it gives you back on the first output is the cleanest by far. If there is an error and you submit it back in the same chat conversation, it just gets diluted/saturated over time, hallucinations go up etc. So if there is a bug rather than continue in the same convo, repeat this process in a brand new conversation. Each time it gives a much cleaner, fresher look at the code and goals needed. If your codeblock is really small then this isn't so important, but I'm trying to maximize the amount of code per prompt for best responses. I also make sure to split files by concerns so they don't get too big for the prompt window otherwise it's annoying. #### And lastly the other interesting thing about this project is this simulates an Agent loop where it is constantly trying to determine if the player won or lost, decide what the next most cohesive step is based on the human feedback (click emoji) and looping it. Actually that was my main interest for the project and I just wanted to get something published as a secondary goal. Most of my time was probably spent playing with the prompt and trying to to see if I could get it to determine if the goal was achieved but its actually a hard problem and I have some cool ideas for the next project. https://ift.tt/FlvKIUQ April 19, 2023 at 07:11AM
Labels:
Hacker News
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment