Researchers have found that large language models (LLMs) tend to parrot buggy code when tasked with completing flawed snippets.

That is to say, when shown a snippet of shoddy code and asked to fill in the blanks, AI models are just as likely to repeat the mistake as to fix it.

  • Hathaway@lemmy.zip
    link
    fedilink
    English
    arrow-up
    7
    ·
    23 hours ago

    Almost as if most models are trained to give the most predictable answer, which in this case, would be flawed code. I don’t know why people are surprised by this.

    • jecxjo@midwest.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      22 hours ago

      Thinking about the code I’ve written over the last quarter century I’d wager that a majority of it was somewhere between mediocre and bad. Some is good and a very small bit is actually exceptional. I think that’s a pretty common rating of our output.

      This is what coding LLM learn from. No one is selective and only trains on the most elite code ever written. Nope, just the buggy stuff we all put up on Github. So of course these LLMs are gonna be writing junk code half the time.