Software Engineering Meets Legal Texts: Using LLMs to Detect 'Contract Smells'

Professor Katz co-authored a new paper on using Large Language Models to improve contract drafting.

Forschung & Fakultät |

In software engineering, there is a well-known concept of “code smells” which are easily detected code drafting patterns that provide a good indication of deeper problems within a particular software system. Early detection of such issues significantly improves system maintainability. Furthermore, it prevents major repair and editing costs when otherwise identifiable defects are deployed in widely used software systems. 

 

Although not completely analogous, there are interesting parallels between software development and contract drafting. In this paper, the authors port and apply code smells principles to smells in contractual agreements. While this is an initial effort, we believe the approach we begin to chart herein, can potentially bring real benefits to the legal sector, reducing risk, promoting best practices standards and quality improvement in contract drafting, leading to impactful benefits to individuals, professionals, organizations, and even the justice system itself. 

Dechtiar, Moriya, Daniel Martin Katz, and Hongming Wang.
“Software Engineering Meets Legal Texts: LLMs for Auto Detection of Contract Smells.”
Machine Learning with Applications, Volume 20 (2025): Article 100639.
Access the paper