Live data from Hacker News

LLMs work best when the user defines their acceptance criteria first

blog.katanaquant.com

41–50 of 460 posts

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

#41

That's very impressive. Your LLM actually wrote a correct code for a full relational database on the first try, like it takes 2.5 seconds to insert 100 rows but it stores them correctly and select is pretty fast. How many humans can do this without a week of debugging? I would suggest you install some profiling tools and ask it to find and address hotspots. SQL Lite had how long and how many people to get to where it…

I could "write" this code the same way, it's easy Just copy and paste from an open source relational db repo Easy. And more accurate!

It is a Rust reimplementation of SQLite. Not exactly just "copy and paste"

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

#42
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.

Claude is multimodal and can see images, though it's not good at thinking in them.

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

#43
post #19

Earlier quoted context omitted.

Considering that a fleur-de-lis involves somewhat intricate curves, I think I'd be pretty happy with myself if I could get that task done in an hour. Given a harness that allows the model to validate the result of its program visually, and given the models are capable of using this harness to self correct (which isn't yet consistently true), then you're in a situation where in that hour you are free to do some other…

I didn't provide any constraints on how to draw it. TBH I would have just rendered a font glyph, or failing that, grabbed an image. Drawing it with vector graphics programmatically is very hard, but a decent programmer would and should push back on that.

> TBH I would have just rendered a font glyph, or failing that, grabbed an image.

If an LLM did that, people would be all up in arms about it cheating. :-)

For all its flaws, we seem to hold LLMs up to an unreasonably high bar.

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

#44

That's very impressive. Your LLM actually wrote a correct code for a full relational database on the first try, like it takes 2.5 seconds to insert 100 rows but it stores them correctly and select is pretty fast. How many humans can do this without a week of debugging? I would suggest you install some profiling tools and ask it to find and address hotspots. SQL Lite had how long and how many people to get to where it…

I could "write" this code the same way, it's easy Just copy and paste from an open source relational db repo Easy. And more accurate!

The actual task is usually to mix something that looks like a dozen of different open source repos combined but to take just the necessary parts for task at hand and add glue / custom code for the exact thing being built. While I could do it, LLM is much faster at it, and most importantly I would not enjoy the task.

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

#45
post #22
post #3

Yes plausible text prediction is exactly what it is. However, I wonder if the author included benchmarking in their prompt. It's not exactly fair to keep hidden requirements.

Attributing these to "hidden requirements" is a slippery slope. My own experience using Claude Code and similar tools tells me that "hidden requirements" could include: * Make sure DESIGN.md is up to date * Write/update tests after changing source, and make sure they pass * Add integration test, not only unit tests that mock everything * Don't refactor code that is unrelated to the current task ... These are not even…

Yeah I agree generally that the most banal things must be specified, but I do think that a single sentence in the prompt "Performance should be equivalent" would likely have yielded better results.

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

#46
post #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).…

> 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."

Nevermind the fact that it only migrated 3 out of 5 duplicated sections, and hasn’t deleted any now-dead code.

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

#47

Earlier quoted context omitted.

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?

[deleted]

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

#48
LLMs have no idea what "correct" means.

Anything they happen to get "correct" is the result of probability applied to their large training database.

Being wrong will always be not only possible but also likely any time you ask for something that is not well represented in it's training data. The user has no way to know if this is the case so they are basically flying blind and hoping for the best.

Relying on an LLM for anything "serious" is a liability issue waiting to happen.

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

#49
post #34

Earlier quoted context omitted.

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.

I have to admit I'm seeing this for the first time and am somewhat impressed by the results and even think they will get better with more training, why not... But are these multimodal LLMs still LLMs though? I mean, they're still LLMs but with a sidecar that does other things and the training of the image takes place outside the LLMs so in a way the LLMs still don't "know" anything about these images, they're just generating them on the fly upon request.

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

#50
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.

Agreed 100%. I'd add that it's the knowledge of architecture and scaling that you got from writing all that good code, shipping it, and then having to scale it. It gives you the vocabulary and broad and deep knowledge base to innovate at lightning speeds and shocking levels of complexity.
Post reply on HN