News for hackers. Stuff that matters.
Re:Prompt Engineering vs. Blind Prompting by jstx1 on Saturday April 22, 2023 @02:06PM (#35669332)
ChatGPT with GPT4 has made me much better and faster at solving programming problems, both at work and for working on personal projects.

Many people are still sleeping on how useful LLMs are. There's a lot of related things to be skeptical about (big promises, general AI, does it replace jobs, all the new startups that are basically dressed up API calls...) but if you do any kind of knowledge work, there's a good chance that you could it much better if you also used an LLM.

Re:Prompt Engineering vs. Blind Prompting by jabradoodle on Saturday April 22, 2023 @02:07PM (#35669353)
The parent is asking for a specific example use case.
Re:Prompt Engineering vs. Blind Prompting by michaelbuckbee on Saturday April 22, 2023 @02:35PM (#35669606)
An eye opening example for me was that I was working with a Ruby/Rails class that was testing various IP configurations [1] and I was able to just copy and paste it into chatgpt and say "write some tests for this".

It wasn't really anything I couldn't have written in a half hour or so but it was so much faster. The real kicker is that by default chatgpt wrote Rspec and I was able to say "rewrite that in minitest" and it worked.

1 - https://wafris.org/ip-lookup

Re:Prompt Engineering vs. Blind Prompting by hayksaakian on Saturday April 22, 2023 @02:10PM (#35669375)
I can't speak for OP, but for me I literally never use stack overflow any more, and I spend about 90% less time on Google
Re:Prompt Engineering vs. Blind Prompting by hallway_monitor on Saturday April 22, 2023 @02:21PM (#35669483)
Yep exactly. I guess I haven't hit the 25 messages in 3 hours limit, but whenever there's an API or library I'm not familiar with. I can get my exact example in about 10 seconds from ChatGPT 4
Re:Prompt Engineering vs. Blind Prompting by iudqnolq on Saturday April 22, 2023 @02:26PM (#35669523)
Are those popular APIs?

I've found Copilot useful when writing greenfield code, but very unhelpful generating code that uses APIs not popular enough to have significant coverage on StackOverflow. Even if I have examples of correct usage in the same file it still guesses plausible but wrong types.

I haven't bought GPT 4 but I'm curious if it's much better at this.

Re:Prompt Engineering vs. Blind Prompting by lstamour on Saturday April 22, 2023 @02:56PM (#35669796)
If you don't mention a library by name it is liable to make something up by picking a popular library in another language and converting the syntax to the language you asked for.

If you ask for something impossible in a library it will also frequently make up functions or application settings. If you ask for something obscure but hard to do, it might reply that it's impossible but it is possible if you know how and teach it.

I sort of compare prompt engineering to Googling - you sometimes have to search for exactly the right terms that you want to appear in the result in order to get the answer you're looking for. It's just that the flexibility of ChatGPT in writing a direct response sometimes means it will completely make up an answer.

There's also a limitation that the web interface doesn't actually let you upload files and has a length limit for inputs. For Copilot, I'm looking forward to Copilot X: https://www.youtube.com/watch?v=3surPGP7_4o

Re:Prompt Engineering vs. Blind Prompting by iudqnolq on Saturday April 22, 2023 @03:27PM (#35670122)
This was neither. I've forgotten the exact words I typed but it was something like this.

Prompt:

    fn encode(value: Foo) {
        capnproto::serialize_packed:: serialize_message(value);
    }

    fn decode(input: &[u8]) {

Expected:

   capnproto::serialize_packed:: deserialize_message(input);
Generated

     capnproto::PackedMessageDeserializer::deserialize(input)
Re:Prompt Engineering vs. Blind Prompting by lstamour on Saturday April 22, 2023 @09:08PM (#35672391)
Maybe a difference between prompts or v3.5 vs v4. I asked ChatGPT v4 and it gave an answer that used capnproto::serialize_packed::read_message. I asked it about the difference between read_message and deserialize_message and this is the response it gave (truncated, as it got some parts wrong):

> In summary, you should use read_message when working with packed messages and deserialize_message when working with unpacked messages. Make sure you choose the appropriate serialization and deserialization functions based on the format in which your messages are stored or transmitted.

Google was surprisingly little help on the topic. At best it pointed me to https://capnproto.org/encoding.html#packing which covers the general idea but glosses over parts.

The problem with ChatGPT is you can never be certain or confident that its answers are correct. It’s as useful as rolling dice in guessing a number sometimes. With the training from the internet, the dice are loaded, but the answer is still likely to be wrong because it just assembles words together.

Re:Prompt Engineering vs. Blind Prompting by 8organicbits on Saturday April 22, 2023 @02:21PM (#35669475)
Are you not fact checking chatgpt? I've seen wrong info, especially subtle things. It seemed reckless to use as-is.
Re:Prompt Engineering vs. Blind Prompting by etimberg on Saturday April 22, 2023 @02:39PM (#35669636)
For fun I tried asking chatgpt to create a simple using an opensource project I maintain. The generated answer was sort of correct but not correct enough to copy and paste. It missed including a plugin, used a version of the project that doesn't exist yet, and generated data that wasn't valid datetimes.
Re:Prompt Engineering vs. Blind Prompting by blowski on Saturday April 22, 2023 @02:31PM (#35669560)
Both ChatGPT and StackOverflow suffer from content becoming outdated. So some highly-upvoted answer on StackOverflow has been out of date since 2011, and now ChatGPT is trained on it.

I see the future as writing test cases (perhaps also with ChatGPT), and separately using ChatGPT to write the implementation. Perhaps we will just give it a bunch of test cases and it will return code (or submit a PR) that passes those tests.

Re:Prompt Engineering vs. Blind Prompting by styfle on Saturday April 22, 2023 @02:20PM (#35669470)
Curious if that’s because AI provides better answers?

It’s certainly not quicker answers, right?

Re:Prompt Engineering vs. Blind Prompting by nice_byte on Saturday April 22, 2023 @02:14PM (#35669421)
what kind of problems are you trying to solve that make gpt-4 so helpful to you?
Re:Prompt Engineering vs. Blind Prompting by cbm-vic-20 on Saturday April 22, 2023 @03:14PM (#35669998)
I'm really trying to do the same, for both my work, and personal projects. But the type of answers I need for work (enterprise software, large codebase built over 20+ years) requires a ton of context that I simply cannot provide to ChatGPT, not only for legal reasons, but just due to the amount of code that would be required to provide enough context for the LLM to chew on.

Even personal projects, where I'm learning new languages and libraries, I've found that the code that gets generated in most cases is incorrect at best, and won't compile at worst. So I have to go through and double-check all of its "work" anyway- just like I'd have to do if I had a junior engineer sidekick who didn't know how to run the compiler.

I think for the work problems, if our company could train and self-host an LLM system on all of our internal code, it would be interesting to see if that could be used to assist building out new features and fixes.

Re:Prompt Engineering vs. Blind Prompting by ukuina on Saturday April 22, 2023 @07:21PM (#35671804)
This is the use-case that OpenAI on Azure is trying to solve. It supports finetuning, too.

Not cheap, though. I think most companies will end up hosting an LLM on local code rather than using OpenAI on Azure, but for now, there is no equivalently-capable replacement.