Ai

Purdue Study: ChatGPT Gives Wrong Coding Answers More Than Half the Time

Purdue Study: ChatGPT Gives Wrong Coding Answers More Than Half the Time

Compiled by the editorial desk with reference to the Purdue University study presented at the Computer-Human Interaction conference and public reports on Stack Overflow's workforce changes.

Developers who turn to ChatGPT for coding help may be getting incorrect guidance more often than not, according to new research from Purdue University. A study presented this month at the Computer-Human Interaction conference found that 52 percent of the chatbot's responses to programming questions contained misinformation, a figure that raises concerns about the reliability of AI tools in technical fields.

The researchers examined 517 questions drawn from Stack Overflow, a popular forum where programmers seek and share solutions. They compared ChatGPT's answers to those given by human users and found that 77 percent of the AI's responses were more verbose than human answers, while 78 percent showed varying degrees of inconsistency with human-provided solutions. The findings were detailed in a paper presented at the conference, which took place in Hamburg, Germany.

The study also included a linguistic analysis of 2,000 randomly selected ChatGPT answers. The responses were described as "more formal and analytical" and displayed "less negative sentiment" compared to human replies, a tone that may make the AI's answers seem more authoritative. The researchers noted that this polished, textbook-style language could lead users to lower their guard and overlook errors.

In a small follow-up survey, the team polled 12 programmers and found that 35 percent preferred ChatGPT's answers over human ones, and 39 percent failed to spot mistakes in the AI-generated responses. While the sample size is limited, the results suggest that the AI's confident and polite style can mask inaccuracies.

Why the Findings Matter for Developers

The study comes at a time when AI chatbots are increasingly integrated into developer workflows, often replacing traditional resources like Stack Overflow. The platform, which once served as a primary destination for coding questions, laid off nearly 30 percent of its staff last year, partly due to the rise of AI tools. The Purdue research underscores that while these tools offer convenience, they are not yet a substitute for human expertise.

The researchers wrote that "the polite language, articulated and text-book style answers, and comprehensiveness" are some of the main reasons ChatGPT answers appeared more convincing, leading participants to "lower their guard and overlook some misinformation." This finding aligns with broader concerns about AI hallucination, where models generate plausible but incorrect information.

For programmers, the study serves as a reminder to verify AI-generated code and solutions, especially in critical applications. It also highlights the need for continued development of AI systems that can better distinguish between accurate and inaccurate information.