Here’s a lovely example of an LLM going awry in a deployed software product, causing a service to slow to a crawl.
A section of code was “refactored” by an LLM – meaning it was restructured without intending to change its behaviour. The refactoring involved moving a block of code between files, but in the process the LLM made a subtle edit that did dramatically alter the code’s behaviour.
Originally, the code included a loop that checked for errors on each iteration. If an error occurred, the loop exited. In the refactored version, the loop instead continued after encountering an error, which meant that errors became infinite loops. This tiny change – in code, the word “break” becoming “continue” – was missed during human review, buried among other edits. But if a human developer had done the refactor, they probably would have copy-pasted the entire block and so preserved the original logic.
Here’s the software company’s blog post explaining what happened.
