Recent submissions

Comment · 12 minutes ago
The question should really be the other way around - LLMs are just computer programs, and in general, computer programs are theoretically deterministic. Given the same inputs and the same initial state, they produce the same outputs. So the question is, what would make an LLM non-deterministic?

For any computer program, there are two main ways determinism can be lost:

1. Randomization is introduced deliberately, e.g. via random number generators.

2. The program's behavior depends on factors beyond its explicit inputs, e.g. its execution environment, timing, concurrency, or interactions with other systems.

Actual deployed LLMs typically lose determinism because of both of the above factors:

1. On each request, the core model outputs a list of likely tokens, ranked in probability order. To avoid repetitiveness or getting "stuck", particularly in natural language output, it's common to introduce randomization when picking a token from this list. This is what's called "temperature". This is deliberate non-determinism that's applied to the output of the core neural network model. Setting temperature to zero can eliminate this kind of non-determinism.

2. In practice, consumer-facing deployments run in complex hardware environments - distributed processing, GPUs, hardware shared with other processes, etc. This leads to non-determinism due to things like concurrency and timing issues. Calculations can execute in different orders, numerical errors can accumulate in different ways, etc.

For companies like OpenAI or Anthropic, which serve millions of concurrent sessions, eliminating non-determinism from #2 would be difficult, and not worth the effort.

But if you're running an LLM on e.g. a single machine, it's certainly possible to eliminate non-determinism. People do this for various kinds of models. Machine learning frameworks have explicit options to help with this. E.g. with Pytorch, you can use `use_deterministic_algorithms(True)` to force it to use deterministic algorithms where possible.

One point that sometimes confuses people here is that even if you run a perfectly deterministic LLM, the output is unpredictable in general. That's because the output of the model depends on a large number of trained weights, and the only practical way to "predict" what output a model will produce is to run input through the model. This is not non-determinism, though.

In diagram terms, at a high level an LLM looks like this: input --> neural network --> token selection --> output

Token selection can be randomized, but doesn't have to be. When it's not, the above is perfectly deterministic in theory, and can also be run that way in practice.

Now take that diagram and run it across a data center full of machines, and achieving determinism gets more difficult. It could be done if we wanted to, but in general it's not important enough to try in that scenario.

Comment · 8 hours ago
> claims to have reviewed it all

I specifically wrote an "initial review".

The code in question was split into modules, the largest of which was about 500 lines. Overall, the quality was higher than a lot of unaided human code that I've reviewed.

That code is greenfield code, so doesn't fit what was being requested above. But here's an example that illustrates the point I mentioned about functional pipelines:

    cmd_kw("spatial_context")
        .or(cmd_kw("spatial"))
        .padded_by(ws())
        .then_ignore(just('(').padded_by(ws()))
        .then(group.separated_by(just('|').padded_by(ws())).at_least(1))
        .then_ignore(just(')').padded_by(ws()))
        .map(|((), groups)| Statement::SpatialContext(groups))
        .labelled("spatial_context command")
        .boxed()
This particular fragment is parsing input using the Chumsky parser combinator library. That imposes a structure that has to be followed. It's all heavily type-driven, which means that it's naturally structured as type cases, where each case handler is pretty small. The longest one in this code is around 20 lines, but most are more like 5 lines or so.

As a result, the modules, functions, and case handlers naturally follow the single responsibility principle. This makes it easy to review. Again, this goes to the points I made in my other comment - if you give a model a good type schema, have it use good libraries in a good language, so that it has a well-structured framework in which to operate, you're likely to get good results.

Perhaps a simpler way to describe it is the old saying, "garbage in, garbage out". If you're vibe coding, say, PHP you're much less likely to get the same quality results.

Comment · 9 hours ago
Comment · 16 hours ago
The accurate statement is that LLMs are not inherently non-deterministic. From a mathematical perspective, they’re obviously deterministic. But choices in the way we deploy them introduce non-determinism.
Comment · 17 hours ago
You want them to make code more simple and elegant by themselves, no other direction? "Make this code simple and elegant, no mistakes, no hallucinations"? I don't think that's realistic at the moment.

But with suitable direction, they can definitely improve codebases - especially a typical enterprise codebase, which, if you don't like LLM code, you would hate with a passion. (I can only assume you've never seen such code otherwise your perspective would be different.)

> Fully leaning into LLM doing as much of the coding and understanding as can be handed off to them seems insane to me, I don't mean this to offend though.

I essentially agree, but there's a huge spectrum before you get to that point, and lots of ways to use it effectively that doesn't create tech debt.

Comment · 17 hours ago
> The thing is, you start to run out of that as you lean in. Tricky.

I think it depends how you lean in. I generated a few thousand lines of Rust code today. It was actually pretty high quality. On my initial review, I only identified one change I wanted to make.

Most functions were pretty short and well factored. I wonder if using Rust as a target helps, because (1) the training data doesn't include all the terrible Javascript and Python etc. found on the internet, and (2) Rust and many of its libraries encourage good architecture - code factored into traits, functional pipelines, a powerful type system, etc.

LLMs trained on bad code for mediocre languages naturally write corresponding quality code.

A big part of it still boils down to prompting - what you're asking it to do and how much freedom you give them. If you let them make all the architectural decisions, you're likely to end up with issues.

Comment · 17 hours ago
It helps you communicate your ideas, which you seem incapable of.

I'm not using an LLM to write comments, because I'm capable of expressing my thoughts in writing on my own. Which goes back to what I wrote earlier - the issue is how people use AI. AIs aren't forcing people to abdicate their intellectual abilities. And in a case like yours, where expressing yourself is not your strong suit, they can help.

Comment · 18 hours ago
You're apparently a software developer. That means you've spent your career automating things that put people out of work. Why are you suddenly deciding to draw the line now? You think it's ok if you're the one putting people out of work writing code by hand?

This reminds me of the people who think they're having economic trouble because immigrants are taking their jobs.

You'd have to tell me what you see when you "look around", because it's clearly not what I see. All the problems I see come from people doing things that they shouldn't be allowed to do, that should be taxed, regulated, etc. I see monopolies that should be broken up, money being used to drown out opposition with the backing of law, financial scams of all kinds propping up the supposedly most valuable companies in the world. The idea that "AI" is the bogeyman that's somehow causing any of this is drivel.

But you write one-sentence comments that don't actually describe your position, so it's impossible to know what you're actually trying to say. Perhaps you should ask an LLM to help articulate your ideas, if you want people to take you seriously. And then you'd find that AI can actually be a force for good.

Comment · 22 hours ago
Isn’t that just the result of a good marketing campaign, particularly on HN?

I don’t really see what they’re actually doing that justifies the reputation they’ve carefully cultivated.

Comment · 23 hours ago
But what if they’re getting a blowjob while they’re sitting at their desk?

That was the solution that the movie Swordfish came up with to solve this tricky problem.

Comment · 1 day ago
Serious question: why are you reading this site?
Comment · 1 day ago
That's a non-responsive response. You're not engaging with anything I wrote, or even describing how you believe your response relates to what I wrote.

What you're doing is engaging in major denial in response to a change that, for whatever reason, you're unable to handle.

Max Planck's famous quote is relevant here: "A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it." Much the same often goes for new technologies.

Of course it's not purely an age issue; plenty of older people are embracing AI. But the kind of people who are completely unwilling to entertain the idea that it could be a useful tool fit Planck's quote perfectly.

Comment · 1 day ago
Typically, when you say “X engineer”, X refers to the kinds of problems you solve. Civil engineer, mechanical engineer, electrical engineer, software engineer.

Unless you’re actually engineering agents, “agentic engineering” is not the correct term for what you’re doing.

Comment · 1 day ago
That’s taking the wrong lesson from this. The fault here lies entirely with people who are unable to recognize when AI output is subpar, or else don’t care. “AI” here is just a scapegoat for people’s intellectual laziness, lack of discernment, and/or inability to reflect on their actions.

There isn’t any doubt that AI can be a useful tool. So what you’re essentially saying is that we should avoid using a useful tool because many people, without any relevant training, use it badly.

By that standard, you should not be pro-car, pro-airplane, pro-boat, etc. etc.

Comment · 1 day ago
That $100 billion is exchange holdings, i.e. customer funds, not market cap. It would be highly illegal for Binance to use any of that $100 billion to cover this loss.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton