Programming Languages Where AI Code Generation Fails Most

AI code generation accuracy varies significantly; for instance, a study found ChatGPT's C++ code execution correctness at only ~7%, starkly contrasting with over 80% for Julia, highlighting AI's struggle with complex, low-level languages [7].

The top 3

  1. Esoteric Languages: AI's Lowest Code Generation Accuracy: AI models, which achieve ~90% accuracy on languages like Python, plummet to a mere 3.8% on esoteric programming languages (esolangs) such as Brainfuck or Whitespace, with some, like Whitespace, remaining at 0% due to extreme data scarcity and unconventional paradigms.
  2. Domain-Specific Languages: AI's Struggle with Niche Context: AI coding agents' accuracy on Domain-Specific Languages (DSLs) often starts below 20% due to minimal training exposure, unique syntax, and a lack of domain context, making it challenging for general-purpose LLMs to generate reliable code for specialized applications.
  3. Assembly Language: AI's Challenge with Low-Level Precision: Assembly language poses significant hurdles for AI code generation due to its low-level nature, direct hardware interaction, and architecture-specific instructions (e.g., x86, ARM), requiring precise context and making it less forgiving than high-level languages.

Sources

Open the full topic