logoalt Hacker News

_wire_today at 1:15 AM4 repliesview on HN

"Even if it works?"

How do you verify that it works?


Replies

archargelodtoday at 9:01 AM

You can't. You must prove it. And I don't mean that you need a rigorous scientific proof - that would obviously be too hard to do for every single function/library/program.

Human developer can work on a program incrementally, ensuring at each step that it is mostly correct.

But LLMs can't think, they fake reasoning and explore problem space in random walk until they stumble into something that looks like a solution. And these "solutions" will have hilarious and absolutely unexpected failure modes.

serious_angeltoday at 2:13 AM

For example, the following "works":

    json='{ "left":2, "right":2 }';    
    result="$(
        perl -e '($_)=<>; / "left":(\d+), "right":(\d+)/; print $1 + $2, "\n";' <<< "$json";
    )";
    printf '%s\n' "$result";
Yet, it is literally the same as:

    printf '%s\n' "$(( 2 + 2 ))";
p1024ktoday at 1:56 AM

According to the author's intention, it is the code that he cannot understand or control. Even if the solution provided by the AI works, he will not adopt it. This is unless he can understand or control it. This should be an assumption.

However, if AI provides a solution, as the person using AI, one should conduct research before making a decision. This is not in conflict with or hindered by the use of the ideas provided by AI.

show 3 replies
xigoitoday at 7:10 AM

Vibe coders seem to have the misconception that if the LLM’s code passes all tests (also generated by the LLM), then it must be correct.