235 points · by ixaxaar · 3y ago · 215 comments
> (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 also gave me a way to break down my requirements and feed them one at a time - as I was also acting as a code-reviewer for the generated output, and so this method was also easier for me to work with.
It takes a human who really knows the area to instruct ChatGPT and review the output, point out silly mistakes in the generated non-sense, and start next iteration. This kind of curated posts always cut off the most part of the conversations and the failed attempts, and then concatenate successful attempts with outputs of quality. Sure, it will be helpful as a super-IntelliSense. But not as helpful as the post suggested.
I've tried to do something like in the post, but I was quickly bored with waiting output, reviewing, all the iterations. One important aspect about programming is that reading code may not be easier than writing code. And in my case, it's more painful.
For example, I would not expect the same junior engineer to have such variance, given the same inputs.
The whole thing is a really accurate expansion on the analogy. It even extends further to explain how it tends to forget certain requirements it was just told and tends to hallucinate at times.
Whats the initiative for companies to invest into junior developers now ?
It is cheaper…
It will take the world by storm and change the way we do things. But it won't change the work that needs to be done. Just the way we consume it.
That means full autonomy reached in 0% of applications. How do we go from 0 to 1? By the way, until we remove the human from the loop the iteration speed is still human speed, and number of AI agents <= number of human assistants.
The productivity boost by current level AI is just 15%, as reported in some papers, percentage of code written by Copilot is about 50% it just helps writing out the easy parts and not much for debugging, designing, releasing, etc which take the bulk of the time, so it's probably back to 15% boost.
On top of that, there’s no reason an AI couldn’t ask additional questions to clarify certain details, just like a human would. Also as this tech gets faster, the iteration process will get more rapid too, where a human can give small bits of feedback to modify the “finished product” and get the results in seconds.
Eventually, human languages will be the only high-level programming languages. Everything else will be thought of the way we currently think of assembly code: a tool of last resort, used only in unusual circumstances when nothing else will do.
And it looks like "Eventually" means "In a year or two."
I would explain my problem to 3.5 and ask it to suggest comprehensive prompts to use with 4 to maximize my limited quota. It worked very well.
In the long years to come the most advance AIs may become so far removed from us that the best intermediaries will be their less advanced brethren.
- When you first start, tell ChatGPT about the limitation. Example - “I’m only allowed to send you 25 prompts every 3 hours. As a result, I need you to keep track of the messages I send you. At the end of each response you give me, please tell me how many prompts I have left, ex: this ‘X/25’”
- Combine multiple questions into one prompt, and tell ChatGPT how to handle it. Example “I need help doing X, Y and Z. Please provide all of the details I need for each task, separating your answer for each with ‘—————‘“. Your prompts can be quite long, so don’t hesitate to jam a lot into a single prompt. Just be sure to tell ChatGPT how to handle it, or you’ll end up with shallow answers for each.
- Provide an excruciating amount of detail in your prompts to avoid having to waste other prompts clarifying. For example, let’s say I’m encountering an issue in an app I’m building. I will tell ChaGPT what the issue is, share the relevant parts of my code (striping out any details I don’t want to share), and tell it the expected behavior. This could be dozens of lines of code, multiple files, etc. It can all be one prompt.
I then remind it that it didn't complete the table, it apologizes, reattemps, and still truncates things. It's output is still far shorter than what I receive in some other prompts so it's not purely a length issue. I'd need to have control to tweak its parameters through the API to get it to respond appropriately.
However, while it may not format the table well, it will still keep the full data set in memory and answer questions on it. For example, I told it the data context. I then asked it why one category (row) saw a decline for a specific year (the columns) and it gave a cogent insightful answers that only my boss and I, the domain experts in my organization, would be able to identify so quickly.
I then asked it to make a projection to a following year, where the data was not given, based on the observed data. I did so. The values were reasonable, but I didn't know why it used them, so I asked it where it got them from, why it chose them:
The answers where incredibly cogent, again on the level that an entry level junior domain expert would give. Here's one nearly verbatim for one of them from my memory. It said "I noticed that the values were consistent for most years but dropped significantly for one year, but the most recent year recovered to an even higher level. So I projected a value that was less than the most recent year but still mostly approximated the average outside of the anomalous year. It gave a bullet point explanation like this for each of the eight rows.
I asked in WHY the drop may have occured that year, and again I had told it the data context so it knew what the data was about, and it have 5 bullet pointed paragraphs that, again, would be very solid answers for a junior practitioner in my area of work.
I asked it was specific formula calculations it used for the projections it mentions. It then apologized for not clarifying earlier (lol, it does that a lot) and then proceeded to tell me that its initial projections were qualitative in nature base on observational criteria. That alone is amazing. In then went further though, without more prompting to say something very much like "However if you would like a more quantitative approach the following formula would be a reasonable approach"
It then went on to describe in great detail the formula I could use to calculate the difference from year to year for each row of data and apply that average to the next projected year's #, along with explaining its reasoning in detail for each step it took.
ChatGPT 3.5 gave very basic answers that I suppose might be useful for a basic user looking for basic possibly trends, as long as they understood that it could be total BS and they needed to vet the answers. GPT-4's analysis was spot on
I can't fully express the extreme utility of this. Giving GPT-4 a pre-aggregated data set to have it give some decent insights automatically could save me hours of work reviewing & finding some of the most obvious trends that would be obvious to me when I see them but would require me to look through 10 to 50 columns of data across 20 to 100 rows of data (keep in mind it would be predigested, cleaned and validated data so work has to be done to get to that point.)
But then GPT-4's preliminary observations would bootstrap my ability to digest the rest of it and have a jumping off point to perform more complex analysis. Then I could give it bullet points and have it summarize my findings in a digestible way for my less data-literate audience, all told saving me hours and getting me out from under a huge backlog of work.
It's a use case that would in no way threaten my job, but make me more productive. And I have enough work that I'm hiring a junior data analyst, and would need to do so even with this increased productivity, and so it would not deprive them of a job either.
It truly would (will!) be a game changer in my day to day work. But I do fully acknowledge that it would, in some other areas of work, reduce the # of employees required to fill the available work. And also that to my fear, future versions could make me less relevant as well, though I think that's further off. Domain expertise is an enormous part of my job.
Made me wonder if you could have an recursive cycle of thinking. Where the "AI" prompts itself, reasons on the output, and does that repeatedly with guards such that it will stop if it doesn't judge anymore advancement.
A basic LLM that just knows some English
+
A tree of LLMs, each fine tuned in specific topics
The basic LLM navigates the tree and gets answers from the specialized LLMs
I've had GPT3.5 teach me how to make a watchOS application to control a BLE device, and after a couple evenings I have one working on my watch right now.
On the bright side, it gave some concrete hands-on guidance that I just wasn't been able to get from Apple documentation. It quickly gave me enough pointers to make things click in my head. While I've never wrote a single line for any Apple ecosystem before, I have a fair amount of experiences in various other niches, so I just needed a crash-course introduction showing me the ropes until I start to see the similarities with things I already know about - and it gave me exactly what I wanted. Unlike beginner "write your first app" blog articles, this crash course was tailored specifically to my requirements, which is incredibly helpful.
However, on the downside, the code it wrote was awful, lacking any design. It gave me enough to get familiar with Swift syntax and how to setup CoreBluetooth, but the overall architecture was non-existent - just some spaghetti that kind-of worked (save for some bugs that were easier to fix on my own than explain to GPT) in my described happy scenario. It was like a junior developer would've grabbed some pieces from StackOverflow. In my attempts to bring things to order, I've hit a knowledge cutoff barrier (it has no clue about latest Swift with new its async syntax or Xcode 14 specifics - as a few things were moved around) and heavy hallucinations (ChatGPT actively trying to refer to various classes and methods that never existed).
Still, I'm impressed. Not a replacement for a developer, but definitely a huge boon. Wonder what others' experiences and opinions are.
So with that context, I was able to have chatgpt do all of the heavy lifting of building a webapp. I was able to build my wish list of features like immersive reading with synchronized sound and word highlighting. Stuff that I probably wouldn't have had enough motivation to complete on my own.
But the architecture of the code is poor. It repeats itself and would be hard to maintain. I think much of this could be improved by spending more time asking gpt to refactor and restructure. The same way a senior developer might provide feedback to a junior dev's first coding project. I did some of this along the way, but that code base needs more if it were to be an ongoing project.
And take it from the perspective of ELI5 where one needs to basically set this up on a fresh install, what does it take?
It is extremely good once the code has been organised and an overall structure exists. But until then it can be a distraction.
I’m hopeful for -x version though.
Literally unusable.
I'm a fan of copilot - but no way in hell is it a 10x tool. It's probably 1.2x - which is a huge gain for such a cheap tool.
For best results, pasting any relevant documentation into the prompt can help.
I got 8k access pretty quickly but no word whatsoever about 32k (and my current prompts + context already reach 8-9k tokens)
Btw, a line of code is around 7-8 tokens. So you can fit over 4,000 LoC in the context window.
not a single line of code was written by me by hand.
but damn many prompts.
It’s great for scaffolding, but not that great for non-trivial end-to-end projects.
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!
The bigger issue for me has been hallucinated libraries. It will link to things that don't exist that it insists do. Sometimes I've been able to get it to output the library it hallucinated though.
It also makes more syntax errors than a person in my experience, but that is made up for by it being really good at troubleshooting bugs and the speed it outputs.
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? ```
I had a spooky experience with a project that was written almost entirely by GPT. I gave it the skeleton and one method and asked it for a modification. It gave it and also said "don't forget to update this other method", and showed me the updated code for that too.
The spooky part is, I never told it the code for that method, but it was able to tell from context what it should be. (I told it that it itself had written it, but I don't know if that made any difference: does GPT know how it "would" have done things, i.e. can predict any code it knows that it wrote?)
Often, it will posit the existence of a function that is named slightly differently. This is great for helping you find corners of an API with functionality you didn't know existed, but insanely frustrating when you're just trying to get code working the first time. You end up manually verifying the API calls.
We should have never listened to Richard Stallman. /s
They became rich and started looking down on those who wrote real complex code.
Now "Open"-AI launders the output while keeping their IP safe. I wonder though if the whole thing is a scheme by Microsoft to kill open source.
> Finally, it was also tiring. Imagine being reduced to giving only instructions and doing code review. Reading and understanding code is tiring!
>It was more like handholding a fresh grad who had absorbed all of human knowledge but needed someone to tie various parts of that knowledge to create something useful.
I experiment every so often with ChatGPT, usually having it create a simple multiplayer browser-based app with a server-side backend. The most recent being a collaborative pixel art app similar to /r/place.
Usually by the time ChatGPT generates something that actually works, after some guidance and generally minimal code edits (usually due to its context loss), I could've written a far more optimized version myself. Its capabilities are still extremely impressive nonetheless and I look forward to future iterations of this technology. Super nice tool to have for mundane code generation and it'll only get better.
Really wish I could use anything like this at work to generate tests... it's really good at that.
It's usually hard to find energy to do this on personal projects, if nothing else that aspect makes GBT coding worth it to me
Especially in this domain, most of the pytorch projects are impossible to read with the lack of comments and obscure variable names
Is there no desire for a creative process?
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.
This is mind blowing. ‘Only 80%’ is a bonkers thing to say.
> For now.
The really scary part, right here.
Is there no desire for creative process if we use compilers?
> It was more like handholding a fresh grad who had absorbed all of human knowledge but needed someone to tie various parts of that knowledge to create something useful. Also ChatGPT is bad at dealing with abstractions beyond 2 layers.
> ChatGPT is definitely a productivity multiplier. I think it is rather a differential productivity multiplier, as it would enhance more the capabilities of those who already know more. If I did not understand deep learning and FAISS, or how projects are structured, I don't think I would have been able to pull this off. On the other hand, it also has some sort of a leveling effect—I have not worked on PyTorch in a while, have no idea of FAISS's new APIs, etc., but these gaps were filled in by ChatGPT.
A really smart AI would leave enough for the humans to do that they feel like they're still in charge.
The cake mix really isn't "cooking," by my standards. Neither is microwaving popcorn. But it's an arbitrary line, I wouldn't defend it very hard.
Hand-rolled assembly wasn't really fun because you could type it and get a response instantly, rather than the creative good old days of mailing in punch cards and waiting weeks for a result.
Punch cards weren't fun either, because using a computer wasn't creative. Doing math by hand was.
Ad nauseum.
If you think that really fucking excellent portal-opening tools don't enable creativity, you just have a dim view of what creativity is.
They’re not going to be coding tomorrow.
Would it be possible to significantly improve an LLM using such unsupervised sessions?
Lately I can't feed it too much info, the longer the context the more issues.
With your suggestion, it doesn't know which part of the iteration is correct at the moment. For us iteration is logically but for chatgpt I think it's just more variables that make the chance of being wrong larger. So you need to build that in somehow that it can iteratively filter and prompt
I have some success saying "no, undo that," waiting for it to return the corrected version, and only then continuing.
Oobabooga's UI is better at this, since you can remove erroneous outputs from the context and edit your previous input to steer it in the right direction.
Given that OpenAI mines conversations for training data it seems to align with their interests to make you give up and start a new prompt. More abandoned prompts = more training data.
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.
It does not feed back information into GPT, so the LLM is not improving. Such a system would require both guts (insanity?) _and_ money to pull off.
10 INT but 0 WIS, that's a good mental model for LLMs.
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 <request> 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 "<request>". Upon receiving a message from the user starting with the tokens "<request>" 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=35605159As an AI language model, I'm unable to write an entire app for you.
I guess they've shut down that capability...
Ask it for help in making your app instead of asking it for the whole thing.
I wonder if this will be true in 5 years.
- should I reset it every iteration? resulting in it behaving more like working memory maybe
- should I reset it every epoch? would that pollute the memory from previous iterations and what would happen if it got full?
- finally, why not maybe delete say 0.01% of the memory or maybe 1 cell per iteration randomly, this would imply the memory would not be that reliable as biological memory behaves and the neural net has to build resilience to use it effectively (by storing multiple copies of what is really useful (hyppocampal novelty detection type?)).
It's pretty clear that, given terminal access and an appropriate outer loop, GPT models can iteratively create new GPT models (either by writing and executing Pyhton code, or later versions trained on LLM weights may even be able to output new weights directly). If the inner workings of the loop are sufficiently obfuscated (in the code-based version), it wouldn't necessarily be clear to us what had changed, and the model weights/architecture on their own are not interpretable. That's very close to a singularity definition (machines that self-improve faster than what our understanding can keep up with), the only open question is whether the new versions would actually be improvements. But that sounds solvable too (except that it wouldn't be easy for us to tell for sure).
There are paradigms shifts necessary for many applications.
That's the basic definition of "the singularity".
Initially there might be the easy option of using more tokens/memory/<whatever easily measurable and beneficial factor you can imagine>. 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 parameters to be increased)?
There are lots of different singularity definitions on wikipedia, most focus on 'intelligence' (eg "an upgradable intelligent agent will eventually enter a 'runaway reaction' of self-improvement cycles, each new and more intelligent generation appearing more and more rapidly"). I think focusing on what 'intelligence' really means, or whether any model is 'truly' intelligent can be be a bit of a distraction. So I just emphasized capabilities in a rather generic sense instead.
It's clear that LLMs can compete with humans on many tasks (coding, creative writing, medical diagnosis, psychotherapy,...), and it is conceivable that they may surpass most humans on those tasks some day. If we have models that can outperform most or all humans on important professional and everyday tasks, and also produce new models that perform even better, maybe at an accelerating rate, through means that are ultimately not interpretable for us, I'd say that's pretty close to a singularity, regardless of whether they're 'truly' intelligent. Even more so if they pass a duck test (walks like a duck, quacks like a duck,...).
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 fizzle out, it could become our overlord.
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.
In my opinion, all the ingredients are there for artificial intelligence. Somebody just need to stitch everything up. It can understand text, reason about it, identity next steps, can write code to execute the steps, understand error messages and fix the code. That feels like AI.
The same question may apply here: if artificial intelligence emerges, would we be able to realize that it is intelligent?