Live data from Hacker News

My article on why AI is great (or terrible) or how to use it

matthewrocklin.com

161–170 of 241 posts

Re: My article on why AI is great (or terrible) or how to use it

#161

Earlier quoted context omitted.

>> Compilers are deterministic, making their generated assembly code verifiable This is true (to an extent), but the generated LLM code is also verifiable. We use automated tests to do it.

automated tests are not verification. The "llm as a compiler" provides zero guarantees about the code. A compiler offers absolute guarantees that what you write is semantically preserved, barring bugs in the compiler itself. An llm provides zero guarantees even with zero bugs in the llm's code.

>> A compiler offers absolute guarantees

I think one of the sibling comments addresses this myth rather neatly: https://news.ycombinator.com/item?id=46563383

tl;dr compilers are not fully deterministic either.

Re: My article on why AI is great (or terrible) or how to use it

#162
post #152

The author presents a false dichotomy when discussing "Why Not AI". ... there are some serious costs and reasonable reservations to AI development. Let's start by listing those concerns These are super-valid concerns. They're also concerns that I suspect came around when we developed compilers and people stopped writing assembly by hand, instead trusting programs like gcc ... Compilers are deterministic , making thei…

> Compilers are deterministic, making their generated assembly code verifiable People keep saying this like it is an absolute fact, whereas in reality it is a scale. Compilers are more deterministic than LLMs in general, but no they are not completely deterministic. That's why making reproducible builds is hard! https://stackoverflow.com/questions/52974259/what-are-some-e... and https://github.com/mgrang/non-determin…

>> Compilers are deterministic, making their generated assembly code verifiable

> People keep saying this like it is an absolute fact, whereas in reality it is a scale.

My statement is of course a generalization due to its terseness and focuses on the expectation of repeatable results given constant input, excluding pathological definitions of nondeterminism such as compiler-defined macro values or implementation defects. Modern compilers are complex systems and not really my point.

> This leads to the point: in general do we care about this non-determinism?

> Most of the time, no we don't.

Not generally the type of nondeterminism I described, no. Nor the nondeterministic value of the `__DATE__` macro referenced in the StackOverflow link you provided.

> Once you accept that the next stage is accepting that most of the time the non-deterministic output of an LLM is good enough!

This is where the wheels fall off.

First, "most of the time" only makes sense when there is another disjoint group of "other times." Second, the preferred group defined is "non-deterministic [sic] output of an LLM is good enough", which means the "other times" are when LLM use is not good enough. Third, and finally, when use of an approach (or a tool) is unpredictable (again, excluding pathological cases) given the same input, it requires an open set of tests to verify correctness over time.

That last point may not be obvious, so I will extrapolate as to why it holds.

Assuming the LLM in use has, or is reasonably expected to have, model evolution, documents generated by same will diverge unpredictably given a constant prompt. This implies prompt evolution will also be required at a frequency almost certainly different than unpredictable document generation intrinsic to LLMs. This in turn implies test expectations and/or definitions having to evolve over time with nothing changing other than undetectable model evolution. Which means any testing which exists at one point in time cannot be relied upon to provide the same verifications at a later point in time. Thus the requirement of an open set of tests to verify correctness over time.

Finally, to answer your question of:

  how do I verify it is good enough
You can't, because what you describe is a multi-story brick house built on a sand dune.

Re: My article on why AI is great (or terrible) or how to use it

#163
post #70

Earlier quoted context omitted.

I think you're looking at it from the wrong angle. Wrestling the computer is stuff like figuring out how to recite the right incantation so Gradle will do a multi-platform fat bundle, and then migrate to the next major Gradle version. Unless you have a very specific set of kinks, tasks like these will make you want to quit your career in computers and pick up trash on the highway instead. You very likely have some of…

The hard part of software engineering, and indeed many other pursuits, is working out what it is you actually need to happen and articulating that clearly enough for another entity to follow your instructions. Using English, with all its inherent ambiguity, to attempt to communicate with an alien (charitably) mind very much does /not/ make this task any easier if the thing you need to accomplish is of any complexity…

Expressing "I want to build a Java app in a single file that I can execute on Windows, MacOS, and Linux" is absolutely straightforward and non-ambiguous in English, whereas it requires really a lot of arcane wizardry in build tooling languages to achieve the desired result.

Claude will understand and carry out this fairly complex task just fine, so I doubt you have actually worked with it yet.

Re: My article on why AI is great (or terrible) or how to use it

#164

Earlier quoted context omitted.

automated tests are not verification. The "llm as a compiler" provides zero guarantees about the code. A compiler offers absolute guarantees that what you write is semantically preserved, barring bugs in the compiler itself. An llm provides zero guarantees even with zero bugs in the llm's code.

>> A compiler offers absolute guarantees I think one of the sibling comments addresses this myth rather neatly: https://news.ycombinator.com/item?id=46563383 tl;dr compilers are not fully deterministic either.

please point out where i said "deterministic".

I said guarantees that semantics are preserved.

Re: My article on why AI is great (or terrible) or how to use it

#165
post #5

I get vibe-coders not having a good experience once the honeymoon is over. But I'm fascinated that a professional software developer could have such a different experience than I do. • LLMs generate junk • LLMs generate a lot of junk

My question is why use AI to output javascript or python? Why not output everything in C and ASM for 500x performance? Why use high level languages meant to be easier for humans? Why not go right to the metal? If anyone's ever tried this, it's clear why: AI is terrible at C and ASM. But that cuts into what AI is at its core: It's not actual programming, it's mechanical reproduction. Which means its incapabilities in…

Because you want to modify those later instead of having read only blob?

Re: My article on why AI is great (or terrible) or how to use it

#166

I clicked out of the article since it starts out with a contradiction. Experienced engineers can successfully vibe code? By definition it means not reading the output. If you’re not reading your output, then why does skill level even matter?

Do apply the same logic to conductors too?

Re: My article on why AI is great (or terrible) or how to use it

#167
post #152

The author presents a false dichotomy when discussing "Why Not AI". ... there are some serious costs and reasonable reservations to AI development. Let's start by listing those concerns These are super-valid concerns. They're also concerns that I suspect came around when we developed compilers and people stopped writing assembly by hand, instead trusting programs like gcc ... Compilers are deterministic , making thei…

> Compilers are deterministic, making their generated assembly code verifiable People keep saying this like it is an absolute fact, whereas in reality it is a scale. Compilers are more deterministic than LLMs in general, but no they are not completely deterministic. That's why making reproducible builds is hard! https://stackoverflow.com/questions/52974259/what-are-some-e... and https://github.com/mgrang/non-determin…

> This leads to the point: in general do we care about this non-determinism?

> Most of the time, no we don't.

well that’s a sweeping generalisation. i think this is a better generalised answer to your question.

> It depends on the problem we’re trying solve and the surrounding conditions and constraints.

software engineering is primarily about understanding the problem space.

are 99% of us building a pacemaker? no. but that doesn’t mean we can automatically make the leap to assuming a set of tools known for being non-deterministic are good enough for our use case.

it depends.

> Once you accept that the next stage is accepting that most of the time the non-deterministic output of an LLM is good enough!

the next stage is working with whatever tool(s) is/are best suited to solve the problem.

and that depends on the problem you are solving.

Re: My article on why AI is great (or terrible) or how to use it

#168

I will never as long as I live understand the argument that AI development is more fun. If you want to argue that you’re more capable or whatever, fine. I disagree but I don’t have any data to disprove you. But saying that AI development is more fun because you don’t have to “wrestle the computer” is, to me, the same as saying you’re really into painting but you’re not really into the brush aspect so you pay someone…

Plenty of people will tell you that they enjoy solving business problems . Well, I'll have to take their word for it that they're passionate about maximizing shareholder value by improving key performance indicators, I know I personally didn't sign up for being in meetings all day to leverage cross functional synergies with the goal of increasing user retention in sales funnels, or something along those lines. I'm no…

Well, so far I tried using LLMs in hobby/open source/personal projects where I get benefits of code working.

Re: My article on why AI is great (or terrible) or how to use it

#169

Earlier quoted context omitted.

I am one of those, but that's why I went into the ops side of things and not dev, although the two sides have been merging for a while now and even though I deal with infrastructure, I do so by writing code. I don't mind ops code though. I dislike building software as in products, or user-facing apps but I don't mind glue code and scripting/automation. Don't ask me to do leetcode though, I'll fail and hate the experi…

i like delivering value, AI lets me do that better on low risk projects very fast

> I like delivering value

I understand where comedians get their source material now.

Re: My article on why AI is great (or terrible) or how to use it

#170

I clicked out of the article since it starts out with a contradiction. Experienced engineers can successfully vibe code? By definition it means not reading the output. If you’re not reading your output, then why does skill level even matter?

> If you’re not reading your output, then why does skill level even matter?

Few thoughts here.

Experience helps you "check" faster that what you asked for is actually what was delivered. You "know" what to check for. You know what a happy path is, and where it might fail. You're more likely to test outside the happy path. You've seen dozens of failure modes already, you know where to look for.

Experience also allows you to better define stuff. If you see that the output is mangled, you can make an educated guess that it's from css. And you can tell the model to check the css integration.

Experience gives you faster/better error parsing. You've seen thousands of them already. You probably know what the error means. You can c/p the error but you can also "guide" the model with something like "check that x is done before y". And so on.

Last, but not least, the "experience" in actually using the tools gives you a better understanding of their capabilities and failure modes. You learn where you can let it vibe away, or where you need to specify more stuff. You get a feeling for what it did from a quick glance. You learn when to prompt more and where to go with generic stuff like "fix this".

Post reply on HN