Live data from Hacker News

Using ChatGPT to generate a GPT project end-to-end

github.com

141–150 of 225 posts

Re: Using ChatGPT to generate a GPT project end-to-end

#141
I've found the best way to pair program with ChatGPT is with GPT4 API through a VSCode extension by @jakear [1] that uses the Notebook interface. Instead of setting a language for each cell, you set roles like "system", "user", or "assistant" and when you run a cell it sends the cells as chat messages.

A huge benefit of this format is that you can delete cells, edit the responses from GPT4 to incorporate changes from future queries, and even rearrange or add mock assistant messages to prime the conversation. As ChatGPT suggests changes, I incorporate them into the main code cells and replace the old queries/feedback with new queries feedback. Since the old changes are incorporated into the parent cells, it loses track a lot less and I can also touch it up to use the right file paths, APIs, etc when it messes up.

You can go a step further and monitor the llm file with inotify and extract assistant messages, infer the file path from the responses, and automatically write them to file as you update the notebook. That eliminates the back and forth copy pasting.

It'd be nice to extend that interface to include Jupyter notebook cells so we can use ChatGPT to generate notebook cells that can be parsed and executed in the interface directly.

Edit to add another tip: I use a variation of the below system prompt for working on larger sessions. Each user message begins with a file path and contains a code block with the contents of the file. After each user message containing a file, I manually add an assistant message that just says "continue", which allows adding several files at different paths. The last user message, the one I actually execute, contains the tokens and the description of the modifications I want in the code. I incorporate the suggested changes into the messages then rinse and repeat. Prompt (sadly I forgot to record where I found it):

    You are a Rust AI programming assistant. The user will send you the relevant code over several requests. Please reply "continue" until you receive a message from the user starting with the tokens "". Upon receiving a message from the user starting with the tokens "" please carry out the request with reference to the code that the user previously sent. Assume the user is a senior software engineer who needs minimal instruction. Limit your commentary as much as possible. Under ideal circumstances, your response should just be code with no commentary. In some cases, commentary may be necessary: for example, to correct a faulty assumption of the user or to indicate into which file the code should be placed.
[1] https://news.ycombinator.com/item?id=35605159

Re: Using ChatGPT to generate a GPT project end-to-end

#142

Earlier quoted context omitted.

I am becoming somewhat of a broken record, but sigh.. To predict the next token you must reason or have some process that approximates it. “Given all these various factors, the most likely resolution to our conundrum is: …” Good luck doing that with any kind of accuracy if you lack intelligence of any kind. Language is a distraction. These things reason (badly, atm). It is totally unclear how far this goes. It could…

It clearly does not reason. Take a famous riddle and make a paradox change. It will not create a meaningful response. But yes, there is a lot of knowledge embedded into our global use of language and it is fascinating to see how it can be reproduced by such a model.

I fed GPT-4 some really old fashioned spatial reasoning questions (inspired on SHRDLU), which it passed. Then when questioned about unstable configurations (which IIRC SHRDLU could not handle) it passed those too.

So it seems like it is definitely capable of some forms of reasoning. Possibly we both tested it in different ways, and some forms of reasoning are harder for it than others?

Re: Using ChatGPT to generate a GPT project end-to-end

#143

Earlier quoted context omitted.

Seems like if it can eventually test that the output meets the criteria then it will excel.

But when the code doesn't meet the requirements, the AI needs to know what's incorrect and what changes it needs to make, and that still requires a human. Unless you just put it into a loop and hope that it produces a working result eventually.

So what if you don't "just put it into a loop and hope" but actually make a complex AI agent with static code analysis capabilities, a graph DB, a work memory etc?

I'm doing just that and it works surprisingly well. Currently it's as good as people with 2-3 years of experience. Do you really believe it's not going to improve?

Now I'm making a virtual webcam so it has a face and you can talk to it on a Zoom meeting...

Re: Using ChatGPT to generate a GPT project end-to-end

#144

Earlier quoted context omitted.

The cool tool makes another cool tool, which in turn makes another cool tool, faster and faster, until we really don't understand at all what the latest cool tool is doing. But it just keeps getting smarter/faster/more effective/whatever it's optimizing for. That's the basic definition of "the singularity".

What never was so clear to me in that vision is, how the version n actually makes sure the version n+1 is actually faster and better. Initially there might be the easy option of using more tokens/memory/ . But when that becomes impractical, how will the "dumber AI" select between x generated "smarter AIs"? How will it ensure that the newly generated versions are better at all (if there are no easily measurable parame…

[deleted]

Re: Using ChatGPT to generate a GPT project end-to-end

#145
I've also made six small apps completely coded by ChatGPT (with GitHub Copilot contributing a bit as well). Here are the two largest:

PlaylistGPT (https://github.com/savbell/playlist-gpt): A fun little web app that allows you to ask questions about your Spotify playlists and receive answers from Python code generated by OpenAI's models. I even added a feature where if the code written by GPT runs into errors, it can send the code and the error back to the model and ask it to fix it. It actually can debug itself quite often! One of the most impressive things for me was how it was able to model the UI after the Spotify app with little more than me asking it to do exactly that.

WhisperWriter (https://github.com/savbell/whisper-writer): A small speech-to-text app that uses OpenAI's Whisper API to auto-transcribe recordings from a user's microphone. It waits for a keyboard shortcut to be pressed, then records from the user's microphone until it detects a pause in their speech, and then types out the Whisper transcription to the active window. It only took me two hours to get a working prototype up and running, with additions such as graphic indicators taking a few more hours to implement.

I created the first for fun and the second to help me overcome a disability that impacts my ability to use a keyboard. I now use WhisperWriter literally every day (I'm even typing part of this comment with it), and I used it to prompt ChatGPT to write the code for a few additional personal projects that improve my quality-of-life in small ways. If people are interested, I may write up more about the prompting and pair programming process, since I definitely learned a lot as I worked through these, including some similar lessons to the article!

Personally, I am super excited about the possibilities these AI technologies open up for people like me, who may be facing small challenges that could be easily solved with a tiny app written in a few hours tailored specifically to their problem. I had been struggling to use my desktop computer because the Windows Dictation tool was very broken for me, but now I feel like I can use it to my full capacity again because I can type with WhisperWriter. Coding now takes a minimal amount of keyboard use thanks to these AI coding assistants -- and I am super grateful for that!

Re: Using ChatGPT to generate a GPT project end-to-end

#146
post #66

Earlier quoted context omitted.

I see this as an example of the reverse: AI is still stupid enough that it takes humans a degree of skill to craft a request which generates the desired output.

I don't know how true it is vs how much PR it is, but Khan Academy's use of LLMs was interesting in that they apparently craft a prompt from the AI itself. Ie a two step process where the AI generates the steps, and then the AI reasons about the result of the steps to attempt and judge the accuracy of the data. This was just a blurb from the Ted talk[1], but i'd be interested in seeing a slightly more in depth explan…

That's called AutoGPT.

Re: Using ChatGPT to generate a GPT project end-to-end

#147
post #120

Every post that claimed using ChatGPT to achieve non-trivial tasks turned out to have non-trivial human intervention. > (from the original article) In fact, I found it better to let ChatGPT generate a toy-ish version of the code first, then let it add things to it step-by-step. This resulted in much better output than, say, asking ChatGPT to generate production-quality code with all features in the first go. This als…

[dead]

Re: Using ChatGPT to generate a GPT project end-to-end

#148
When you actually work with a high level engineer they can do a lot automouusly and can cut through ambiguous instructions based on experience, but they also require interactions that clarify important decision points and there are many. Gpt-x is miles away from this outcome

Re: Using ChatGPT to generate a GPT project end-to-end

#149

I've also made six small apps completely coded by ChatGPT (with GitHub Copilot contributing a bit as well). Here are the two largest: PlaylistGPT ( https://github.com/savbell/playlist-gpt ): A fun little web app that allows you to ask questions about your Spotify playlists and receive answers from Python code generated by OpenAI's models. I even added a feature where if the code written by GPT runs into errors, it ca…

Spot on, right! Glad you achieved all of the above. By design, tech advances to enhance human's ability to create. In your case, the AI tech (LLMs) truly augment your own capabilities. Therefore reaching the comfort that others enjoy freely. Hope to see more use cases, like yours, brought forward to inspire some anxious humans who are terrified by the rapid advancement of AI tech.
Post reply on HN