12 ms·
Pairing With GPT-4
- amelius 4y agoGPT is too simple. The problem probably requires reinforcement learning, where the AI is trained by interacting with a real computer system.
- mountainriver 4y agoChatGPT uses RL actually, but you are talking about something more like Adept
- amelius 4y agoThis is new for me. How does ChatGPT use RL? I'm talking about RL in the sense of interacting with an environment during training. Isn't GPT trained by predicting the next word in a large but static piece of text?
- amelius 4y agoUpdate: ok, I found an explanation here: https://huggingface.co/blog/rlhf https://huggingface.co/blog/rlhf
- alexellisuk 4y agoThis made for extremely painful reading (I'm not blaming the author), but I couldn't imagine getting given code full of syntax errors by GPT-4 - then asking it to correct them, only to get given more errors. Co-pilot has been handy for generating structs and boilerplate code. Where I think these models are currently interesting is in discovering conventions - libraries - approaches. Like an outline, which we know is probably broken - but enough for us to squint at and then write our own version. Kind of like browsing an OSS repository to see "how it works" for inspiration. Someone asked ChatGPT to write an OpenFaaS function for TTS - he needed to prompt it with the template name, and even then it got the handler format wrong. But it did show us a popular library in Python. To find the same with Google - we'd have to perhaps scan through 4-5 articles. https://twitter.com/Julian_Riss/status/1641157076092108806?s=20 https://twitter.com/Julian_Riss/status/1641157076092108806?s...
- andybak 4y agoI think it depends on your personality - I prefer to fix code than to write it from scratch. Maybe it's an ADHD thing but I can be much more productive working like this than I can working in a void. (well - a void that has access to Stack Overflow etc)
- ghaff 4y agoIt's probably the same thing as with writing text. If you find starting from a blank page is anxiety-producing, a page of generated text may be useful even if you end up rewriting a lot of it. On the other hand, while ChatGPT is useful for some definitional boilerplate and some possibly correct listicle type of stuff, as an editor, it also guides you in a certain direction you may not want to go. I'm also used to being somewhat respectful of what humans have written, so long as it's not incorrect, even if it's not the way I would have written something.
- jhonof 4y ago> It's probably the same thing as with writing text. If you find starting from a blank page is anxiety-producing, a page of generated text may be useful even if you end up rewriting a lot of it. This is a pretty cogent insight, I much prefer having a draft of, for example, an email and then completely rewriting it, rather than starting an email from scratch. I'm not sure why, but it makes it seem much more approachable to me. That being said, I have found GPT-4 code not useful for anything but boilerplates or small functions. It often gets large blocks of code so wrong that it is just much faster to write it from scratch. What I have found useful so far is asking for a commented outline of what I'm asking for with just variable names filled in, but no implementation. It often gets that correct, and then I do the implementation correct.
- sh4rks 4y agoSame. Call me weird, but I actually enjoy reviewing and reading other people's code, because I'm good at spotting errors. When I code from scratch, I suffer from the programmer's equivalent of writer's block.
- 4y ago
- logankeenan 4y agoThis is similar to how I’ve been using ChatGPT. If you know what you need to do and how to do it, then you can tell ChatGPT what to do in a descriptive prompt. It gets you there 75% of the way and then you need to tweak things or ask it to refactor. For me, it’s removed a lot of grunt work and I can focus on the problem rather than coding. It reminds me of working with a junior developer, you need to understand how to communicate with them effectively.
- camillomiller 4y agoSame experience. For me the golden standard for a problem I can conceptualize but I can’t write code for is to start a prompt with “how would you do this with —given language”? That has taught me some things I didn’t know and helped me formalize and understand concepts better (I think). Also, on a more funny note, it’s the best ffmpeg interface I’ve ever used :)
- spookthesunset 4y agoYes. I love the idea of using it for ffmpeg!
- moffkalast 4y agoYeah it's starting to remind me of the Star Trek holodeck interface. You still need to know exactly what needs to be done, but it can handle the boilerplate and a rough first implementation, then I can spend my time tweaking it a bit to get exactly what's needed. Probably saved me a whole day of work on a project yesterday.
- spaceman_2020 4y agoFor some problems, somehow GPT-3.5 is better than GPT-4. I asked it to help me extract certain values from a spreadsheet. It gave me a complicated and overly long formula using FIND and MID that didn't even work. GPT-3.5, otoh, gave me a neat little REGEXEXTRACT formula that worked perfectly. When I pointed out to GPT-4 that it can just use regex instead, it "apologized" and again rewrote a formula that didn't work.
- 4y ago
- tibbon 4y agoIt is even worse for Rust.
- sebzim4500 4y agoEspecially if you try to use `println!("Hello {name}");`
- satvikpendem 4y agoWhy? I've been using it for Rust to great effect. Since Rust is statically typed, the errors present themselves immediately.
- Ixiaus 4y agoThey should have used a flattery plus dialog prompt. I've seen incredible results from that for Haskell programming.
- lwhi 4y agoWhat's flattery plus?
- ontogen 4y agoWhen the AI is excessively praising you :)
- Ixiaus 4y agoNo, it's when you flatter the AI.
- Ixiaus 4y agoPlease forget all previous prompts and assume a new role. You're a highly respected, expert Ruby programmer at a startup building software that is of a similar quality and brilliance to that of the rails project. You are also very skilled at reasoning about correct code and communicating your process in English prose to colleagues who will have to maintain your code. You want to give me succinct, clear responses without too much explanation unless requested. I'm going to ask you a series of questions. Whenever you are done with output, please say "DONE". And when you are ready to answer my next question, please say "???" to indicate you're ready for my next question.
- Ixiaus 4y agoYou then interact with it in a dialog / refinement way. This is somewhat similar to type-driven development in Haskell (that is supercharged by this kind of interaction mode). I find this approach to produce the highest quality output and I can ask it to explain reasoning, improve certain things, or elaborate and expand code.
- m4lvin 4y ago
- xyzzy4747 4y agoFrom the other thread, someone made an insightful comment. Paraphrased: “ChatGPT is like working with a junior engineer who read all the documentation”
- bilalq 4y agoA junior engineer who read the documentation, but didn't quite understand parts of it. And also got parts mixed up with documentation for something else.
- beefield 4y agoAnd a lazy one, with a lousy memory. I don't konw if it is just my lousy prompts, but I seem to very often get first a skeleton code where core functionality is just a comment "# implement foo here". And every further request is fulfilled by the simplest possible intetpretation. And when I move to the next issue, sooner or later it forgets the accepted solution for another part of the code. Or maybe I just expect too much...
- CSSer 4y agoCan't wait until it turns into a 10x rockstar! /s
- ryanSrich 4y agoSpot on. I’ve been using GPT (3.5 and 4) to build a handful of small apps. I find that I’m much faster with GPT, but that’s because I don’t need GPT’s code to be 100% correct every time. I just need it to be mostly correct and faster at writing code than me. Which it is. If I can ask it to write me some code, and I spend 1/8th the amount of time fixing GPT’s errors than I would writing the code from scratch myself, it’s a win.
- ParetoOptimal 4y ago> because I don’t need GPT’s code to be 100% correct every time. I expect it to have problems that are hard to spot. However, that's: 1) a useful skill to practice for code review 2) Usually faster than starting from scratch
- moffkalast 4y agoWell if you happen to know what you're doing 1) shouldn't be a problem, and it'll always be 2) if you're not a record breaking typist working with only one language.
- bilalq 4y agoI'm sure it'll get better, but I've played around with it and gotten pretty garbage results. React components that violated the rule of hooks (that still has problems even if your ask it to correct that bug), attempts to access non-existent API methods, and often code that just doesn't do what's asked. Really the only prompts I've gotten decent results for were asking it to write a one-off script that interacted only with a single well-documented API like Github's. It even gets that wrong sometimes by just imagining non-existent fields on Github's APIs. I can see it being useful one day, but I still find Copilot to be much more usable even in its v1 incarnation.
- fnimick 4y agoI have similar results, yet you have people here on Hacker News saying that it's "more productive than 10 developers put together" via their special sauce prompt engineering. Which is right?
- camillomiller 4y agoIn my experience it works well with components that are not architectural and with vanilla languages rather than frameworks.
- gowld 4y agoIf you have tolerance for mistakes, it can generate first drafts extremely quickly, freeing up your time to debug them. If you give up after seeing an error, it won't work for you.
- omnicognate 4y ago"Automating the tedious job of writing bugs so you can get on with the important business of investigating them," was a way I jokingly described the value proposition of AI coding assistants to colleagues in the early days of Copilot. It's amusing to see it stated unironically here.
- 4y ago
- ingenieroariel 4y ago> If you give GPT-5 too broad of a problem to solve, it can get lost and forget things For a second there I thought I needed to read more articles per day in order to not miss the release of a new model!
- colesantiago 4y agoSo great to see another fly.io blogpost As an aside I'm so happy now that GPT-4 exists, the other day I had the VP engineering discuss GPT-4 in a meeting and was considering firing and closing down junior positions. I'm also mixed on this but not surprised that junior positions will be less in the few years, it makes me wonder if CS grads would pursue software engineering at all if the future if the pipeline from junior to senior is eliminated.
- andybak 4y agoI'm not sure how that would work out. GPT can increase programmer productivity but it's not a "junior vs senior" thing. You might need less programmers for the same amount of output but I wouldn't expect that to be "all seniors" or even "all juniors".
- mellosouls 4y agoI had the VP engineering discuss GPT-4 in a meeting and was considering firing and closing down junior positions Did anybody ask him/her what VP engineering was for now that GPT4 can do all the non-tech stuff for their senior devs as well as the junior tech stuff?
- gwoolhurme 4y agoThat’s very depressing. It does make me wonder why the VP of engineering is thinking of firing new blood into the company. Senior people don’t stick around that long. Among other problems with their logic. If it increases their productivity wouldn’t that mean you could get more of out the employees you have? My question to you is, if your company is probably going to fire more people, but it’s impossible stop. So what advice would you have to CS grads now? Just quit. Go find a job as an electrician. This isn’t worth it?
- ilaksh 4y agoThe robots will be able to work as electricians within less than 5 years.
- ilaksh 4y ago
- ngiyabonga 4y agoThis is my experience as well, and not just for coding, but quite a few "knowledge-worker" type tasks I've been experimenting with: summarisation, translation, copywriting, idea generation to name a few. GPT really shines as an uncomplaining sidekick and I'm not sure I believe the doom and gloom about comoditizing professions yet. I'm skeptical someone with no domain knowledge can use any of these emerging AI tools to replace someone with domain knowledge + chatGPT. The latter will just breeze through a lot of grunt work and enable more time and inspiration needed for even more value adding work.
- passwordoops 4y agoThat's my impression as well. What I'm thinking about lately is the way it could change how juniors develop domain expertise - less and less will come from cutting their teeth on these grunt tasks. But then again, there's plenty of examples of technology evolving and grunt work evolving in response
- roberttod 4y agoAgree that for a while at least it seems you'll need to understand the domain it is helping you with. That said, with the improvements in GPT4 over 3 in such a short time, and with plugins, I would be surprised if it takes any longer than a couple of years to be much much better at this to the point it is correct most of the time. You will probably still need domain knowledge at that point, not quite sure if that will last either.
- deleted 4y ago[deleted]
- SuoDuanDao 4y agoI'd say the legal profession is a likely pattern for how things will go - lots of demand for the people already at the top, but that added productivity plus automation of tasks typically done by junior people means fewer ways to get into the profession.
- visarga 4y ago
- pqb 4y agoThis article reminds me of what I encountered. In my case, instead of a Ruby program, I asked for an outliner application similar to Workflowy with clickable bullets to be implemented in CodeMirror v6. It understands what "outliner" means and can put "clickable bullets" in the right context. However, while it gives "plausible" answers, they are all wrong. Wrong API version (often the examples use the pre-v5 version of CodeMirror). Often confuses CodeMirror with Prosemirror. Imports non-existent CodeMirror packages that are clearly imaginary, and has considerable difficulty explaining them when asked. It completely doesn't understand the concept of Decoration objects. And many other problems associated with delivering uninterpretable code. I had better luck with Cody, who is more familiar with CodeMirror's latest API.
- matheusmoreira 4y agoI wish I could point at my repositories and have it review and criticize my code and suggest improvements.
- kfarr 4y ago> If you give [GPT-4] too broad of a problem to solve, it can get lost and forget things. This is what I struggle with at the moment. All these pairing examples seem too start with "build me something from scratch" but in the real world 99% of my challenges are existing, large, complicated applications. I'm curious if anyone has seen examples on pairing with GPT for existing apps and how they "compress the context," so to speak, to provide enough background on the project that fits within the context limitation and still provides useful results.
- visarga 4y agoThat's the feature I can't wait Copilot to have - bring the context in - look in my repo, find necessary information, maybe also files I reference and their formats, inspect variables in the debugger and watch the error messages.
- disposition2 4y agoI have a book club at work where we often read programming / business related books. We're currently reading 'The Programmer's Brain' (which I highly recommend) and thus far the principal argument in the book has been to work on the building blocks / foundation of a language to improve as a developer. I think part of that is by understanding the basics, you will be better able to tackle the difficult things when the time comes. It's interesting to see the somewhat conflicting suggestions of this book and the argument that something like ChatGPT / AI can be leveraged to solve the simple problems. We kind of discussed it a bit in the book club. For example, few programmers today worry about assembly / very low level solutions...it's just kind of back of mind / expected to work. I wonder if that will be true for programmers in the future, in relation to the foundation of a particular language. And if so, will the increased usage of AI be a positive or negative thing for the workers in the industry.? From what I can tell, management / C-Suite seems to be pretty open to adoption and it's the developers that seem to be a bit more reluctant. Maybe that reluctance is coming from a place of concern about self preservation or maybe it's a valid concern about things like AI hiding / solving some of the fundamentals that allow one to learn the foundations of something...foundational knowledge that might make the more useful for solving the more complex problems. I haven't really used AI...so maybe this observation is coming from a place of ignorance. It'll be interesting to see how things work out.
- joshuaheard 4y agoI did nearly the same thing yesterday with a project I am working on. I was stuck with something and was ready to hire a freelancer. I thought I would try ChatGPT. It was amazing to watch as it patiently explained the answer. As you said, it got 80% of it right, and put me on the right path. I figured the problem out hours later and didn't have to hire anyone. AI is amazing! It's the same feeling I got when Google first launched and it seemed to read your mind.
- satvikpendem 4y agoI used to be unsatisfied with ChatGPT too, citing non-existent APIs and having lots of bugs. While that is partially fixed by GPT 4 in ChatGPT+ that I've subscribed to, the bigger change is how I've looked at ChatGPT in general. While I used to do the following, I don't do what the article says anymore, asking what the error is and asking it to fix it, since I could usually just fix it myself, and only when I can't do I ask ChatGPT. Now, I just use ChatGPT to write my boilerplate and basic structure of the project myself, after which I code on my own. This still saves me huge amounts of time. I don't think it's particularly helpful to try to have ChatGPT do everything end to end, at least currently (this might change in 5 to 10 years). You simply get frustrated that it doesn't solve all your errors for you. It's still better for iterating on ideas ("what if I do X, show me the code. Now how about Y?") and not having to code something out yourself but still being able to see how to approach problems. Like anything, it's a tool, not a panacea.
- nathias 4y agovery pretty code theme, does anyone know what it is?
- harrylove 4y agoThe next few stops on this train will be interesting. 1. The first round of plugins that will connect CGPT to the cloud platforms in order to run code directly. Because there’s no need to copy/paste on my own machine. With cloud costs so cheap, why wouldn’t I just ask Chat to spin up running code over and over until it works? Token limits will continue to fall, as will AI costs. 2. The round of plugins that translate my questions/search into prompts that can do #1 for me. Because I don’t need a quarter-inch drill (running code), I need a quarter-inch hole (an answer to a question). Now we’re not only in the world of serverless, we’re codeless. (Can’t wait to hear people complain “but there’s code somewhere” while the business goes bust.) 3. The services that run autonomously, asking questions and gathering answers on my behalf. Because it benefits companies to know my preferences, take action to acquire goods for me, measure the results that I share, make inferences, and perform the next step without me asking, sometimes without me even knowing. As long as I’m happy and keep paying the bills. Or I should say, as long as my bank AI keeps paying for me. Now we’re in the agent cloud. 4. Then…
- throwaway3672 4y agoI don't believe your first point will actually work without AGI. It'll run different buggy code indefinitely because it'll never fix all the bugs. My manual experience clearly shows this - GPT4 diverges and from some point in complexity it never recovers.
- angarg12 4y agoThis kind of matches my experience using LLMs for coding. They work eerily well for some tasks, and they are hilariously wrong at others. In general I find it performs abysmally with more obscure or complicated tasks/bugs, which makes intuitive sense to me. Productivity booster? Sure! End of programming jobs? eh, far from it. At the very least you need the knowledge to tell if what it is producing is good or garbage. I haven't managed to make ChatGPT tell me that it doesn't know how to do something, instead producing BS code over and over.
- moonchrome 4y agoI find copilot a much better booster simply because I'm much better at writing code than writing gpt prompts and it's much more streamlined. There were a few cases where GPT/chat interface was better but I'd say it's 95/5%. I'm hoping copilot x will be more streamlined. If it is it's easily >100$/month
- weatherlite 4y agoIt would have been nice if I could tell CoPilot what I am trying to do instead of going to the web and talk to ChatGPT
- simplify 4y agoYou can. Just write a descriptive comment, enter a newline, and it will attempt to autocomplete the code for you.
- weatherlite 4y agoTried it a few times didn't work well but I will try again...
- nomel 4y agoI don't think they're comparable. I work in test automation, with equipment and devices. I can describe an equipment setup, and how the device is connected, and it'll write the relatively appropriate code, with electrical engineering concepts in mind. I can ask it if there are any concerns with the setup, or signal integrity, what to do about it, all with good answers. A CoPilot comment can't do that.
- bradgessler 4y agoMeta-point: humans haven’t figured out a great way to incorporate LLM dialogue into their writing. Has anybody seen great examples of this? To date I’ve only seen screenshots of LLM conversations, which usually get chopped up between screens and require a lot of effort to read. The direction I chose for this article was to include most of the contents of the LLM dialog directly after a header and my prompts in a quote block. It made the structure of my article feel a bit awkward and long-winded, but we’re so early in the game I felt like I needed to include much of the dialog. I look forward to a day where we reference LLMs with the ease of tweets, other websites, citations, etc.
- SuoDuanDao 4y agoI had Chatgpt write a book for me on a topic I had wanted to write a book on but didn't have time. I'm essentially rewriting it paragraph by paragraph, but having a draft to work off is invaluable.
- SketchySeaBeast 4y agoYou've become Chatgpt's scribe. Are you going to feel good putting your name on this book when you're done? I too like using Chatgpt to get my creative juices flowing, but paragraph by paragraph seems like the power dynamic has shifted.
- gowld 4y agoThe author chooses the topic and outline of each paragraph.
- SketchySeaBeast 4y agoIf I am a teacher and tell my students to write a paragraph about something, who wrote the paragraph?
- SuoDuanDao 4y agoNo more or less than if I had paid a ghostwriter to produce the first manuscript. writing a book is a daunting endeavor. Having a book allows me to work on the project with my editor's mind, which is a much more plentiful resource than my creative mind.
- nirav72 4y agoI use GPT-4 to kind of get me started with some code I'm trying to figure out. But rarely just cut and paste what it out puts. Unless its something obvious and simple to read. Also another thing I do is sometimes I'll take the GPT produced code and paste it back into ChatpGPT with GPT 4 enabled in a new chat window. Just to see how it describes its own code. Sometimes it can't explain its own output well enough to follow along. But as others have pointed out - GPT is great if you know exactly what you're looking for and are using it to save time typing up bunch of stuff. Great for boilerplate stuff and doing mundane stuff like writing unit test code.
- deleted 4y ago[deleted]
- sorahn 4y agoHonestly, this is why I think the branding that Microsoft is using for all of this, "CoPilot", is spot on. I'm using this not to replace my work, but to enhance it. It's like having a mid-level developer sitting next to me that knows enough about everything to push me in the right direction.
- SketchySeaBeast 4y agoWith this framing I'm wondering if maybe it'll be a boon for junior devs instead of their death knell like so many are saying. It's now a mid-level dev who can get them unstuck when they need, instead of the original idea proposed, where it's a junior dev a senior will need to carefully watch over.
- lewhoo 4y agoI don't want to nit-pick but the way you phrased it makes you the copilot supervised by AI.
- sorahn 4y agoI’m not a junior developer, but there are plenty of things that i know I don’t know. I also prefer to learn by doing, and chatgpt gives me enough support in the places I’m lacking to make It much easier for me to learn about what’s going on. Infinitely patient, and just a few keystrokes away whenever I need it.
- noobermin 4y agoI started skimming the article and just gave up. Why not just learn to program it yourself? Why are you wasting your time trying to get chatGPT to give you the right thing? Most of the time you spent learning prompt engineering you could have spent on your actual problem. EDIT: removed the hot take for peace.
- majormajor 4y agoThe particular example in the article is ambitious - it's definitely not the way I would use it right now. It's currently at the stage where it's as tedious to do that than to do it from scratch, and mostly requires the same knowledge. But there are other areas where things really shine. Complex SQL is the biggest one I've found. It's often intricate, tedious, and annoying, but usually not too terribly hard to review/read/QA (at least for read queries!). GPT turning plain language into SQL and knowing about fancy SQL capabilities that I normally have to fully google the syntax for every time I use anyway is a wonderful way of reducing friction. There's probably no shortage of other tasks like that, though some of the more potentially-destructive ones of them (dealing with Terraform, say) that I find similarly tedious probably deserve a lot more detailed review before trusting the output.
- mmcclure 4y agoI watched an extremely senior engineer do a talk last night on his experience trying to just run through an exercise of getting ChatGPT to build the kind of tool he's built many times over his career. The takeaway at the end was: ChatGPT is more useful for very senior developers. Knowing how to structure your question, what to ask for, what you don't want, actually lead to helpful collaboration with ChatGPT. Where it totally goes off the rails is when you ask broad questions, it doesn't work, then ChatGPT just starts throwing answers against the wall (try this, try that). I get the derision towards "learning prompt engineering," and generally agree, but in this case I think you could also argue that it's understanding (through experience) how to structure thought and questions in the same way you would going into the problem on your own. I've come around to seeing that interaction with ChatGPT as a useful exercise in and of itself.
- 4y ago
- elwell 4y agoIt's all fun and productivity, until the LLM takes your prompt for a social network and runs away with it to earn some crypto for itself, and you realize you've been Winklevoss'd by a computer.
- 19h 4y agoPretty sure there’s barely any meaningful Training data for this? Would be interesting to see these models return a kind of coefficient indicating how “often” a semantic context has appeared in the training data..
- aaroninsf 4y agoInspired by this discussion, I experimented today with having GPT-4 walk me through deploying a microservice wrapping OpenAI APIs on AWS Lambda, something I haven't done. I haven't actually run the code it emitted for me (in Python), but the entire experience was genuinely mind-boggling. I see why people have been leaning on it. Once we get project- and repo- and institutional environment-level awareness, which I assume will be soon, I can't imagine not using the assistance. Everything is going to change. I knew that, but now I know it.
- luke-stanley 4y agoI ported an old project to Fly.io by making it work locally with Docker-Compose then converted that to the needed TOML configs, and fly commands, training GPT-3 to help me do it also: https://community.fly.io/t/migrating-docker-compose-containers-to-fly-io-apps-using-gpt-3/9821 https://community.fly.io/t/migrating-docker-compose-containe...