Live data from Hacker News

LLMs work best when the user defines their acceptance criteria first

blog.katanaquant.com

31–40 of 460 posts

Re: LLMs work best when the user defines their acceptance criteria first

#32
post #27

But my AI didn't do what your AI did. Cherry picked AI fail for upvotes. Which you’ll get plenty of here an on Reddit from those too lazy to go and take a look for themselves. Using Codex or Claude to write and optimize high performance code is a game changer. Try optimizing cuda using nsys, for example. It’ll blow your lazy little brain.

It’s easy to get AI to write bad code. Turns out you still need coding skills to get AI to write good code. But those who have figured it out can crank out working systems at a shocking pace.

I am sorry for asking, but... is there guide even on how to "figure it out"? Otherwise, how are you so sure about it?

Re: LLMs work best when the user defines their acceptance criteria first

#33
post #6

Most humans also write plausible code.

LLMs piggyback on human knowledge encoded in all the texts they were trained on without understanding what they're doing.

Humans would execute that code and validate it. From plausible it'd becomes hey, it does this and this is what I want. LLMs skip that part, they really have no understanding other than the statistical patterns they infer from their training and they really don't need any for what they are.

Re: LLMs work best when the user defines their acceptance criteria first

#34
post #9

Earlier quoted context omitted.

LLMs are really bad at anything visual, as demonstrated by pelicans riding bicycles, or Claude Plays Pokémon. Opus would probably do better though.

How could they be any good at visuals? They are trained on text after all.

Supposedly the frontier LLMs are multimodal and trained on images as well, though I don't know how much that helps for tasks that don't use the native image input/output support.

Whatever the cause, LLMs have gotten significantly better over time at generating SVGs of pelicans riding bicycles:

https://simonwillison.net/tags/pelican-riding-a-bicycle/

But they're still not very good.

Re: LLMs work best when the user defines their acceptance criteria first

#36
Their default solution is to keep digging. It has a compounding effect of generating more and more code.

If they implement something with a not-so-great approach, they'll keep adding workarounds or redundant code every time they run into limitations later.

If you tell them the code is slow, they'll try to add optimized fast paths (more code), specialized routines (more code), custom data structures (even more code). And then add fractally more code to patch up all the problems that code has created.

If you complain it's buggy, you can have 10 bespoke tests for every bug. Plus a new mocking framework created every time the last one turns out to be unfit for purpose.

If you ask to unify the duplication, it'll say "No problem, here's a brand new metamock abstract adapter framework that has a superset of all feature sets, plus two new metamock drivers for the older and the newer code! Let me know if you want me to write tests for the new adapters."

Re: LLMs work best when the user defines their acceptance criteria first

#37
post #9

Earlier quoted context omitted.

LLMs are really bad at anything visual, as demonstrated by pelicans riding bicycles, or Claude Plays Pokémon. Opus would probably do better though.

How could they be any good at visuals? They are trained on text after all.

An SVG is just text.

Re: LLMs work best when the user defines their acceptance criteria first

#38
post #6

Most humans also write plausible code.

LLMs piggyback on human knowledge encoded in all the texts they were trained on without understanding what they're doing. Humans would execute that code and validate it. From plausible it'd becomes hey, it does this and this is what I want. LLMs skip that part, they really have no understanding other than the statistical patterns they infer from their training and they really don't need any for what they are.

They probably at least look at the docs?

Re: LLMs work best when the user defines their acceptance criteria first

#39
post #4

Earlier quoted context omitted.

Have you tried describing to Claude what it is? The more the detail the better the result. At some point it does become easier to just do it yourself.

It knows what it is, it's a very well known symbol. But translating that knowledge to code is something else. Interesting shortcoming, really shows how weak the reasoning is.

Try writing code from description without looking at the picture or generated graphics. Visual LLM with a suggestion to find coordinates of different features and use lines/curves to match them might do better.

Re: LLMs work best when the user defines their acceptance criteria first

#40
You can ask an LLM to write benchmarks and to make the code faster. It will find and fix simple performance issues - the low-hanging fruit. If you want it to do better, you can give it better tools and more guidance.

It's probably a good idea to improve your test suite first, to preserve correctness.

Post reply on HN