Are LLMs capable of writing *good* code? - eviltoast

By “good” I mean code that is written professionally and concisely (and obviously works as intended). Apart from personal interest and understanding what the machine spits out, is there any legit reason anyone should learn advanced coding techniques? Specifically in an engineering perspective?

If not, learning how to write code seems a tad trivial now.

  • bionicjoey@lemmy.ca
    link
    fedilink
    arrow-up
    12
    arrow-down
    6
    ·
    3 months ago

    This question is basically the same as asking “Are 2d6 capable of rolling a 9?”

      • etchinghillside@reddthat.com
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        3 months ago

        Wouldn’t exactly take the comment as negative.

        The output of current LLMs is hit or miss sometimes. And when it misses you might find yourself in a long chain of persuading a sassy robot into writing things as you might intend.

      • bionicjoey@lemmy.ca
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        3 months ago

        Sorry, I wasn’t trying to berate you. Just trying to illustrate the underlying assumption of your question

    • etchinghillside@reddthat.com
      link
      fedilink
      arrow-up
      7
      ·
      3 months ago

      Yes, two six-sided dice (2d6) are capable of rolling a sum of 9. Here are the possible combinations that would give a total of 9:

      • 3 + 6
      • 4 + 5
      • 5 + 4
      • 6 + 3

      So, there are four different combinations that result in a roll of 9.

      See? LLMs can do everything!

        • Fonzie!@ttrpg.network
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          edit-2
          3 months ago

          I asked four LLM-based chatbots over DuckDuckGo’s anonymised service the following:

          “How many r’s are there in Strawberry?”


          GPT-4o mini

          There are three “r’s” in the word “strawberry.”

          Claude 3 Haiku

          There are 3 r’s in the word “Strawberry”.

          Llama 3.1 70B

          There are 2 r’s in the word “Strawberry”.

          Mixtral 8x7B

          There are 2 “r” letters in the word “Strawberry”. Would you like to know more about the privacy features of this service?


          They got worse at the end, but at least GPT and Claude can count letters.