Live data from Hacker News

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

github.com

21–30 of 225 posts

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

#21
post #16

It's good at writing new code, with sufficient prompting. But the big open question as of now for engineering orgs is - can it edit existing code like developers, just by instructions. Is there any hands on experience anyone has on copilot-x?

GPT-4 32k can fit a few thousand lines of code into a single prompt and output diff's, patches, and/or the fully modified code.

For best results, pasting any relevant documentation into the prompt can help.

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

#22
post #9
post #2

What value does a developer deliver when their entire process is done by an LLM? Is there no desire for a creative process?

The dev gave the initial idea to the LLM. That's the creative process. Everything after that, arguably, is just technical details in order to realize the idea. Sure, implementation requires plenty of creativity, but of different kind.

Believe me, only a dev can get this working. Maybe in the future, LLM wizards will conjure all our technology, but at this point, having a working knowledge of all APIs from 2021 is an assistive technology, not a magical code-machine.

I've used LLM to generate a lot of code recently on side projects. It's a 10x jump in productivity, but it can only reliably do 50-80% of the work, and the last tail needs editing, verification, setup with infrastructure, etc.

It won't read your mind, you need to iterate, re-create, and guide. And each of those 3 relies on a working knowledge of software, libraries, tech, and user experience to get right.

For now.

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

#23
post #15
post #13

Earlier quoted context omitted.

This is not even wrong. The level of analogies people use in the first few months of $hype_cycle is mind boggling.

It's a spot on - moving up a level in the abstraction hierarchy.

Human: ChatGPT, please devise an algorithm that solves the traveling salesman problem in polynomial time.

A: Certainly, as an AI language model I'm happy to oblige. Here is the algorithm.

Human: I used a higher abstraction level! I have solved P == NP!

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

#25
Combine TDD and Self debugging into a workflow and you almost have a new paradigm of software development where entire applications can be developed with a series of prompts. Software programmers have finally programmed themselves out of jobs! It's kind of poetic justice that LLMs trained on open source code is replacing us.

We should have never listened to Richard Stallman. /s

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

#26
post #24

Is anyone letting an LLM code and run its code by itself, then iteratively fix any bugs in it without human intervention until it e.g. passes some black box tests? Would it be possible to significantly improve an LLM using such unsupervised sessions?

Exactly! During the process, it seemed like if there were like two GPTs self-playing to both generate the proper prompts iteratively and the other generates like the output, all triggered by one concise command from a human - say write tests and dont stop iterating till the tests pass - basically automating the human out of the loop - could get rid of the loops fixing tests, but also take away control.

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

#27
post #23
post #15

Earlier quoted context omitted.

It's a spot on - moving up a level in the abstraction hierarchy.

Human: ChatGPT, please devise an algorithm that solves the traveling salesman problem in polynomial time. A: Certainly, as an AI language model I'm happy to oblige. Here is the algorithm. Human: I used a higher abstraction level! I have solved P == NP!

This is a non-example, because it is not how interaction with LLMs to write code works right now. You can check the linked page to see that this took the author several hours spanned within 3 weekends to implement, where they had lengthy back and forth discussions with chatGPT building the code.

And you still need to have some model of the code structure, you need to understand what is going on to go back and forth with it. It takes care of a part of the work that is quite standard so you work in a different level, the analogy is with a compiler taking care of certain optimisation part so that you do not have to invent it every time. If you think that you can build anything meaningful with chatGPT with one line prompts I would suggest you try to engage yourself in the context of a language/paradigm you are only a novice with to see how it works and the parts that can be a good learning experience, engaging and entertaining. Do not use some obscure language and libraries because it will start hallucinating a lot though.

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

#28
post #12

You don’t mention it explicitly, but I assume you’ve manually copied and pasted all the code, as well as the various patches with updates? In my experience, that quickly makes new suggestions from ChatGPT go out of sync with the actual state of the code. Did you occasionally start the conversation over and pasted in all the code you currently had, or did this not turn out to be an issue for you?

Indeed, I manually copied the outputs. If the network lost context (or I ran out of GPT-4 credits and reverted to GPT-3) or for some reason I needed to start a new chat, I would start by also feeding in the other modules' docstrings to re-build context. sometimes I had to pass these again after a few prompts.

A good example looks like:

``` I am trying to model associative memory that i may attach to a gpt model

here is the code for the memory:

....

can we keep the input vectors in another array so we can fetch items from it directly instead of having to reconstruct? ```

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

#29
post #24

Is anyone letting an LLM code and run its code by itself, then iteratively fix any bugs in it without human intervention until it e.g. passes some black box tests? Would it be possible to significantly improve an LLM using such unsupervised sessions?

I did, works fine for short pieces of code, but the context window size quickly becomes prohibitive in a naive approach.

Also, gpt-4 does this much better than gpt-3.5, but gpt-4 is really slow, so the iteration process can take tens of minutes.

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

#30
post #9

Earlier quoted context omitted.

The dev gave the initial idea to the LLM. That's the creative process. Everything after that, arguably, is just technical details in order to realize the idea. Sure, implementation requires plenty of creativity, but of different kind.

Believe me, only a dev can get this working. Maybe in the future, LLM wizards will conjure all our technology, but at this point, having a working knowledge of all APIs from 2021 is an assistive technology, not a magical code-machine. I've used LLM to generate a lot of code recently on side projects. It's a 10x jump in productivity, but it can only reliably do 50-80% of the work, and the last tail needs editing, veri…

Exactly this. I doubt a non-programmer would be able to produce similar output of similar quality and completeness. Like I said, I am not losing my job yet. Maybe next year...
Post reply on HN