←back to thread

925 points dmitrybrant | 1 comments | | HN request time: 0s | source
Show context
meander_water ◴[] No.45164266[source]
> Be as specific as possible, making sure to use the domain-specific keywords for the task.

If you don't have the technical understanding of a language or framework, there is going to be a lot of ambiguity in your prompts.

This specificity gap leads the LLM to fill in those gaps for you, which may not be what you intended. And that's usually where bugs hide.

I think this is the flip side to being a "force multiplier"

replies(1): >>45164416 #
SV_BubbleTime ◴[] No.45164416[source]
“I need a C class that has a constructor for a tuple”

I would hope Claude would be like “Hold on man…”

replies(3): >>45164566 #>>45164790 #>>45168017 #
1. codedokode ◴[] No.45168017[source]
I asked ChatGPT to make a system of macros that would generate a struct with given fields (for example: int a, bool b, char *c) and a function that would print the struct contents. Instead of refusing it started inventing recursive macros that were never going to work. It seems LLMs are especially bad with C macros.

If you have access to state-of-art coding assistants, try asking this. You can additionally add a requirement to generate a destructor function (that would free dynamically-allocated fields).