The Use of Large Language Model in Code Review Automation: An Examination of Enforcing SOLID Principles
摘要
Within the ever-evolving domain of software development, the practice of having teams located in different geographical locations presents distinct obstacles, including disparate time zones, language hurdles, and differing degrees of experience. This paper presents a novel approach to address these difficulties by using an automated GitHub bot that utilizes Large Language Models (LLMs) to enforce SOLID principles during code reviews. This bot, which incorporates advanced models such as OpenAI’s GPT-4 and the locally deployable Mixtral, has the objective of delivering immediate and practical feedback. Its purpose is to improve the quality of code and make learning easier for developers, particularly those who are new to programming. The bot’s structure enables effortless incorporation into GitHub, utilizing LLMs to examine code modifications and offer observations regarding adherence to SOLID principles. An important characteristic of this method is the incorporation of Mixtral, which may be operated on-site, providing advantages in terms of data confidentiality and operational adaptability, essential for global enterprises with strict privacy demands. Here, we explores the bot’s architecture, its incorporation with LLMs, and its capacity to revolutionize code reviews by offering a secure, efficient, and instructive instrument for geographically dispersed software development teams.