Live data from Hacker News

An example of LLM prompting for programming

martinfowler.com

121–130 of 297 posts

Re: An example of LLM prompting for programming

#121
post #45

To me, this is a great illustration of why chat is a terrible interface for a coding tool. I've gone down this path as well, learning that you need to have a detailed prompt that establishes a lot of context, and iteratively improve it to generate better code. And yup, generating a task list and working from that is definitely a key strategy for getting GPT to do anything bigger than a few paragraphs. But compare tha…

Either way, you’re sending your companys biggest asset to another company, aren’t you? I’ll try these tools when they start being able to run locally

No or no company would be able to use it. As you type fragments of code are sent and discarded after use. You need to trust Microsoft to actually do the discarding but contractually they do and you can sue them if they accidentally or deliberately keep your code around or otherwise mismanage it.

Re: An example of LLM prompting for programming

#122
post #45

To me, this is a great illustration of why chat is a terrible interface for a coding tool. I've gone down this path as well, learning that you need to have a detailed prompt that establishes a lot of context, and iteratively improve it to generate better code. And yup, generating a task list and working from that is definitely a key strategy for getting GPT to do anything bigger than a few paragraphs. But compare tha…

Exactly this. I've tried to implement ChatGPT into may daily workflow, but you have to give it an excruciating level of detail to get something that remotely resembles real code I'd use, and even then you have to hold its hand to guide it in the correct direction, and still have to make some manual final touches at the end.

This is why I'm looking forward to Copilot X so much. It will hold much more context than the current implementation, and integrate the Chat interface that's so natural to us.

Re: An example of LLM prompting for programming

#123

Earlier quoted context omitted.

Now you got me on the edge of my seat. What is this personality type?

Ni-dominant. It exists nowadays in various post-Jungian models, many of which are really fascinating, having fleshed it out a lot. The opposing function to Ni is Se, which creates a dichotomy of planning/foreseeing vs. doing/performing. The functions oscillate as a kind of duty cycle, so a lot of sages out there have hobbies as musicians, stage magicians, etc. This dichotomy also effectively shuts out detail memory f…

I would like to subscribe to your newsletter.

Even if approximately 75% of that sailed right over my head.

Re: An example of LLM prompting for programming

#124
post #23

For me chatGPT or phind (which is based on chatGPT4, if I understood right) are great documentation tools and also general productivity tools, nothing to say about it. The main issue is that sometimes they really f** it up bad, they make you rethink your knowledge quite deeply (do I remember wrong? did I maybe understand this wrong? is chatGPT wrong?) and this is for me something that can be worse than having to do i…

One thing ChatGPT (specifically, the GPT4 version) keeps doing to me is confidently lying, and when I call it out, apologizing and spitting out another response. Sometimes the right answer, sometimes another wrong one (after a couple tries it then says something like "well, I guess I don't have the right answer after all, but here is a general description of the problem")

Part of me laughs out loud (literally, out loud for once) when it does that. But the other part of me is irritated at the overconfidence. It is a potentially handy tool but keep the real documentation handy because you'll need it.

Re: An example of LLM prompting for programming

#126

The article stresses to never put anything that may be confidential into the prompt . Yet, chatGpt offers to out-out from using your data for training. For most purposes that seems to be sufficient doesn't it? Or are there reasons not to trust OpenAi on this one?

> are there reasons not to trust OpenAi on this one?

Yes, the fact that they are closed, not open, for one. And that they switched from open to closed the moment it benefited them to do so.

Re: An example of LLM prompting for programming

#127
post #81

Earlier quoted context omitted.

But it's not just like humans. For one thing it's built differently, with a different relationship between training and execution. It doesn't learn from its mistakes until it gets the equivalent of a brain transplant, and in fact extant AIs are notorious for doubling down instead of accepting correction. Even more importantly, the AI doesn't have real-world context, which is often helpful to notice when "correct" (to…

> But it's not just like humans. For one thing it's built differently I'm referring to the behaviour, not the inner nature. > in fact extant AIs are notorious for doubling down instead of accepting correction. My experience suggests ChatGPT is better than, say, humans on Twitter. I've had the misfortune of several IRL humans who were also much, much worse; but the problem was much rarer outside social media. > Even m…

> I'm referring to the behaviour, not the inner nature.

Since the inner nature does affect behavior, that's a non sequitur.

> we had to invent counter-intuitive maths to make most of our modern technological wonders.

Indeed, and that's worth considering, but we shouldn't pretend it's the common case. In the common case, the machine's lack of real-world context is a disadvantage. Ditto for the absence of any actual understanding beyond "word X often follows word Y" which would allow it to predict consequences it hasn't seen yet. Because of these deficits, any "intuitive leaps" the AI might make are less likely to yield useful results than the same in a human. The ability to form a coherent - even if novel - theory and an experiment to test it is key to that kind of progress, and it's something these models are fundamentally incapable of doing.

Re: An example of LLM prompting for programming

#128
post #49
post #45

To me, this is a great illustration of why chat is a terrible interface for a coding tool. I've gone down this path as well, learning that you need to have a detailed prompt that establishes a lot of context, and iteratively improve it to generate better code. And yup, generating a task list and working from that is definitely a key strategy for getting GPT to do anything bigger than a few paragraphs. But compare tha…

Absolutely. People will quickly realize that for coding, the natural language part of LLMs is a distraction. Copilot is much better for someone actually writing code, but unfortunately doesn't get as emphasized due to the narrative surrounding LLMs right now.

Idk for sure autocomplete is a great interface for someone in the ide coding, but LLM can understand requirements whole and spit out full classes and validate that the output from the server matches the specs, they work great from outside an ide.

Re: An example of LLM prompting for programming

#129
post #35

What I want is a prompt that continuously copies whatever I'm doing, so I can ask to complete the task. For example, say I'm converting all identifiers in a file from lowercase to CamelCase. Then after doing like 3 of them, I can ask the LLM to take over and do the remainder.

Great example of how a GPT can reason on your behalf and dramatically improve your performance. For instance, it could watch for inconsistent approaches to design or even continue an complex implementation you’ve started just from examining context signals.

Re: An example of LLM prompting for programming

#130

Earlier quoted context omitted.

The opposite might be true, and here’s why - 1) by using English as spec, the barrier of entry has gone lower, 2) LLMs can also write prompts and self introspect to debug.

But you can't determine if a statement is true by simply reading more words. It's also not efficient for doing higher level work. There was a time before we had algebra where people were still expressing the same ideas but the notation wasn't there. Mathematics was expressed in "plain language." It's extremely difficult to read for us. For mathematician's of the time there was no other way to explain algorithms or ex…

Arguably reading code can’t lead to definitive conclusions about its bug-free-ness
Post reply on HN