Ask HN: How much credit can you take for code you wrote with an LLM?

6 wewewedxfgdf 9 5/26/2025, 5:26:01 AM

Comments (9)

turtleyacht · 23h ago
Safest is to always cite. Always include references. It's about "show your work." When in doubt, cite.

However, there is a difference between safety and liability. The commit message ought to mention tradeoffs or alternative attempts. It may never happen, but post-mortem folks will want to have the assurance of thoughtfulness.

That's true even if it's your own invention. You would want to note prior work. (If there aren't any or none was searched, you wouldn't have to cite anyway.) Likely though, implementors and adopters are interested in the design and references.

The prompt doesn't necessarily need to be committed to source control, but it does bring up a question: if the prompt can reproduce the (company-owned) code diff, doesn't it need to be independently auditable as well?

Same with local scripts. It's on the company machine, but it's not really as inspectable as on a remote branch. Does one default-share those? Some are truly experimental. That would depend on policy. (A major outage can influence policy.)

It's easier if the prompt is on a company account; then only the link needs to be included, instead of a massive text file.

byoung2 · 1d ago
The same as you would for copying and pasting from Stackoverflow or a tutorial.
nssnsjsjsjs · 1d ago
Or running a code generator
2rsf · 23h ago
You don't give enough information here to properly answer, but generally speaking you take the credit the same way that you take responsibility for it.
PeterStuer · 1d ago
All, as the LLM has no legal agency. It is up to you to check wether the LLM output would tread on someone else's IP. There's no "I didn't do it" backdoor here.
dalmo3 · 12h ago
How much blame do you take when it breaks?

Same thing.

andrewfromx · 1d ago
i think you just say "i wrote this" because the definition of being the author has changed. You birth it. You watched it get created and tweaked small problems along the way. It wouldn't have been born without you. You wrote the prompts! And all your peers are doing the exact same thing. It can just be assumed everyone is using some AI tool.
mattmanser · 1d ago
Saying "you wrote" something implies ownership.

If an AI wrote the code, you don't own it as AI content is not copyrightable.

I do wonder how long before an employee walks off with a code base and we see thst tested in court. And how much IP protects a vibe coded codebase, as copyright doesn't seem to.

sherdil2022 · 1d ago
What I do when I copy-paste code from StackOverflow or any other website, I place the URL above the function or in the beginning of the file.

However, I don’t paste the prompt I used nor do I mention any LLM. LLMs might have spit out the code. But I edit the code, iterate the code and ensure that the code works as it is supposed to. So I give no attribution.

Howeer, if I do ‘vibe code’ and copy-paste code as-is or make only minor changes, I will place the prompts or URL to the LLM chat that I used - so that I can recreate / continue the session if I want to.