Study finds vibe-coded construction safety scripts often fail silently
An arXiv study of 450 AI-generated Python scripts reports that code which runs correctly can still contain flawed safety math, with a roughly 45% silent failure rate among executed scripts.
In plain words
Vibe coding means non-technical workers describe what they want in plain language and an AI model writes the program. Researchers tested such programs for construction safety tasks and found many ran fine but quietly computed wrong safety numbers, which is dangerous because the errors are hard to spot.
What was announced
The study, published as an arXiv preprint, evaluated 450 Python scripts produced by three models: Claude 3.5 Haiku, GPT-4o-Mini, and Gemini 2.5 Flash. Using a persona-driven prompt set of 150 items and an evaluation pipeline combining sandboxed execution with an LLM-as-a-Judge, the authors measured how reliably zero-shot generated code handled construction safety logic.
The results show a tension between surface quality and correctness. About 85% of scripts executed successfully, but the authors argue this syntactic reliability masked deeper problems, including weak defensive programming. Among scripts that ran, they identified an overall silent failure rate of roughly 45%, and GPT-4o-Mini produced mathematically inaccurate outputs in about 56% of its functional code. The study also links user persona to data hallucination: less formal prompts made models more likely to invent missing safety variables. The authors conclude that current LLMs lack the deterministic rigor for standalone safety engineering and recommend deterministic AI wrappers and strict governance for cyber-physical deployments.
What it does not show
- The evidence is the paper's abstract only; full methodology, datasets, and peer-review status are not available in the supplied source.
- Findings apply to the three tested models and construction safety scripting tasks; no independent replication is reported.
For security and IT teams
- Scope
- The study covers zero-shot, natural-language-generated Python scripts for construction safety from three named models and does not assess other languages, models, or deployment settings.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.