Evaluating Large Language Models for Detecting Architectural Decision Violations
This study evaluates the effectiveness of using a multi-model Large Language Model pipeline to detect architectural decision violations in open-source software, finding that while LLMs are highly accurate at identifying code-related violations, they still struggle with implicit or deployment-oriented decisions that require human expertise.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are building a massive, complex LEGO city. To make sure the city doesn't turn into a chaotic mess, you write a "Rule Book" (these are the Architectural Decision Records or ADRs). The rules might say, "All skyscrapers must be blue" or "No houses can be built next to the train tracks."
As the city grows, people start building things quickly. Eventually, someone builds a red skyscraper or a house right on the tracks. In software, this is called "architectural drift"—it’s when the code stops following the original plan, making the whole system messy and prone to breaking.
The Problem: The "Manual Inspector" Headache
Normally, to catch these mistakes, you’d need a human "Master Architect" to walk through the entire city, look at every single LEGO brick, and compare it to the Rule Book. This is exhausting, slow, and humans get tired and miss things.
The Experiment: Hiring "Robot Inspectors"
The researchers in this paper wanted to see if Large Language Models (LLMs)—the "brains" behind AI like ChatGPT—could act as automated inspectors.
They didn't just hire one robot; they set up a "Robot Jury."
- The Lead Inspector (LRM): One AI looked at the rules and the code and said, "I think this is a violation!"
- The Jury (Validators): Three other AIs looked at the Lead Inspector's work to see if they agreed.
- The Human Judges: Finally, real human experts checked the robots' work to see who was actually right.
The Results: How smart are the robots?
1. They are great at "Visual" Rules (The High Scores)
If the rule is simple and clearly visible in the code—like "All functions must use this specific naming style"—the robots were incredible. They were right over 90% of the time. It’s like a robot looking at a blue LEGO brick and instantly confirming it matches the "Blue Rule."
2. They struggle with "Vibe" and "Hidden" Rules (The Low Scores)
The robots hit a wall when the rules weren't about the "bricks" themselves, but about how the city functions.
- The "Invisible" Rules: If a rule is about how the city's electricity grid works (infrastructure) or how different neighborhoods talk to each other (system interaction), the robots got confused. They couldn't "see" the electricity; they could only see the bricks.
- The "Missing Info" Problem: Sometimes the robots couldn't tell if a rule was broken or if they just didn't have enough information to decide. This is like a robot looking at a house and saying, "I don't know if this house is allowed to be here because I can't see the map of the train tracks."
The Verdict: A Helpful Assistant, Not a Replacement
The paper concludes that AI is like a highly efficient junior inspector.
- What they can do: They can scan thousands of lines of code in seconds and flag obvious mistakes, saving the human architect a massive amount of boring work.
- What they can't do: They lack the "big picture" wisdom. They don't understand the intent behind a rule or the complex, invisible connections that keep a system running.
The takeaway: Don't fire your human architects! Instead, give them these "Robot Inspectors" to handle the grunt work, so the humans can focus on the complex, high-level thinking that requires true wisdom.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.