←back to thread

358 points andrewstetsenko | 1 comments | | HN request time: 0.284s | source
Show context
sysmax ◴[] No.44360302[source]
AI can very efficiently apply common patterns to vast amounts of code, but it has no inherent "idea" of what it's doing.

Here's a fresh example that I stumbled upon just a few hours ago. I needed to refactor some code that first computes the size of a popup, and then separately, the top left corner.

For brevity, one part used an "if", while the other one had a "switch":

    if (orientation == Dock.Left || orientation == Dock.Right)
        size = /* horizontal placement */
    else
        size = /* vertical placement */

    var point = orientation switch
    {
        Dock.Left => ...
        Dock.Right => ...
        Dock.Top => ...
        Dock.Bottom => ...
    };
I wanted the LLM to refactor it to store the position rather than applying it immediately. Turns out, it just could not handle different things (if vs. switch) doing a similar thing. I tried several variations of prompts, but it very strongly leaning to either have two ifs, or two switches, despite rather explicit instructions not to do so.

It sort of makes sense: once the model has "completed" an if, and then encounters the need for a similar thing, it will pick an "if" again, because, well, it is completing the previous tokens.

Harmless here, but in many slightly less trivial examples, it would just steamroll over nuance and produce code that appears good, but fails in weird ways.

That said, splitting tasks into smaller parts devoid of such ambiguities works really well. Way easier to say "store size in m_StateStorage and apply on render" than manually editing 5 different points in the code. Especially with stuff like Cerebras, that can chew through complex code at several kilobytes per second, expanding simple thoughts faster than you could physically type them.

replies(2): >>44360561 #>>44360985 #
soulofmischief ◴[] No.44360985[source]
> AI can very efficiently apply common patterns to vast amounts of code, but it has no inherent "idea" of what it's doing.

AI stands for Artificial Intelligence. There are no inherent limits around what AI can and can't do or comprehend. What you are specifically critiquing is the capability of today's popular models, specifically transformer models, and accompanying tooling. This is a rapidly evolving landscape, and your assertions might no longer be relevant in a month, much less a year or five years. In fact, your criticism might not even be relevant between current models. It's one thing to speak about idiosyncrasies between models, but any broad conclusions drawn outside of a comprehensive multi-model review with strict procedure and controls is to be taken with a massive grain of salt, and one should be careful to avoid authoritative language about capabilities.

It would be useful to be precise in what you are critiquing, so that the critique actually has merit and applicability. Even saying "LLM" is a misnomer, as modern transformer models are multi-modal and trained on much more than just textual language.

replies(3): >>44361085 #>>44363335 #>>44364768 #
mattbee ◴[] No.44361085[source]
What a ridiculous response, to scold the GP for criticising today's AI because tomorrow's might be better. Sure, it might! But it ain't here yet buddy.

Lots of us are interested in technology that's actually available, and we can all read date stamps on comments.

replies(1): >>44361213 #
soulofmischief ◴[] No.44361213[source]
You're projecting that I am scolding OP, but I'm not. My language was neutral and precise. I presented no judgment, but gave OP the tools to better clarify their argument and express valid, actionable criticism instead of wholesale criticizing "AI" in a manner so imprecise as to reduce the relevance and effectiveness of their argument.

> But it ain't here yet buddy . . . we can all read date stamps on comments.

That has no bearing on the general trajectory that we are currently on in computer science and informatics. Additionally, your language is patronizing and dismissive, trading substance for insult. This is generally frowned upon in this community.

You failed to actually address my comment, both by failing to recognize that it was mainly about using the correct terminology instead of criticizing an entire branch of research that extends far beyond transformers or LLMs, and by failing to establish why a rapidly evolving landscape does not mean that certain generalizations cannot yet be made, unless they are presented with several constraints and caveats, which includes not making temporally-invariant claims about capabilities.

I would ask that you reconsider your approach to discourse here, so that we can avoid this thread degenerating into an emotional argument.

replies(1): >>44361419 #
mattbee ◴[] No.44361419[source]
The GP was very precise in the experience they shared, and I thought it was interesting.

They were obviously not trying to make a sweeping comment about the entire future of the field.

Are you using ChatGPT to write your loquacious replies?

replies(1): >>44361497 #
soulofmischief ◴[] No.44361497[source]
> They were obviously not trying to make a sweeping comment about the entire future of the field

OP said “AI can very efficiently apply common patterns to vast amounts of code, but it has no inherent "idea" of what it's doing.”

I'm not going to patronize you by explaining why this is not "very precise", or why its lack of temporal caveats is an issue, as I've already done so in an earlier comment. If you're still confused, you should read the sentence a few times until you understand. OP did not even mention which specific model they tested, and did not provide any specific prompt example.

> Are you using ChatGPT to write your loquacious replies?

If you can't handle a few short paragraphs as a reply, or find it unworthy of your time, you are free to stop arguing. The Hacker News guidelines actually encourage substantive responses.

I also assume that in the future, accusing a user of using ChatGPT will be against site guidelines, so you may as well start phasing that out of your repertoire now.

Here are some highlights from the Hacker News guidelines regarding comments:

- Don't be snarky

- Comments should get more thoughtful and substantive, not less, as a topic gets more divisive.

- Assume good faith

- Please don't post insinuations about astroturfing, shilling, brigading, foreign agents, and the like. It degrades discussion and is usually mistaken.

https://news.ycombinator.com/newsguidelines.html

replies(1): >>44362890 #
anonymars ◴[] No.44362890[source]
This is a lot of words, but does any of it contradict this:

> AI can very efficiently apply common patterns to vast amounts of code, but it has no inherent "idea" of what it's doing.”

Are you saying that AI does have an inherent idea of what it's doing or is doing more than that? Today?

We're in an informal discussion forum. I don't think the bar we're looking for is some rigorous deductive proof. The above matches my experience as well. Its a handy applied interactive version of an Internet search.

If someone has a different experience that would be interesting. But this just seems like navel-gazing over semantics.

replies(1): >>44363491 #
1. soulofmischief ◴[] No.44363491[source]
> Are you saying that AI does have an inherent idea of what it's doing or is doing more than that?

No. I stated that OP cannot make that kind of blanket, non-temporally constrained statements about artificial intelligence.

> We're in an informal discussion forum. I don't think the bar we're looking for is some rigorous deductive proof

We're in a technology-oriented discussion forum, the minimum bar to any claim should be that it is supported by evidence, otherwise it should be presented as what it is: opinion.

> this just seems like navel-gazing over semantics.

In my opinion, conversation is much easier when we can agree that words should mean something. Imprecise language matched with an authoritative tone can mislead an audience. This topic in particular is rife with imprecise and uninformed arguments, and so we should take more care to use our words correctly, not less.

Furthermore, my argument goes beyond semantics, as it also deals with the importance of constraints when making broad, unbacked claims.