LLM Prompt Augmentation for Software Standards Violation Correction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for correcting software code standards violations are time-consuming, error-prone, and computationally inefficient, often requiring manual review and search of multiple resources, and existing large language models (LLMs) lack sufficient domain-specific information for effective corrective suggestions.
Innovation Solution
The disclosed techniques automatically retrieve relevant contextual information from various sources, generate augmented prompts for LLMs, and apply the LLM-generated suggestions directly to the codebase to correct standards violations, without manual training or extensive domain-specific data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual review and search of information resources is used to correct standards violations, then comprehensive understanding of the violation can be achieved, but the process becomes time-consuming and error-prone
Solution Approach 1:
The patent introduces an intermediary system comprising a retrieval module and a generation module that acts as a mediator between the standards violation detection and the correction process. The retrieval module automatically searches and retrieves relevant information from multiple sources (documentation, codebase, discussions), and the generation module synthesizes this information into corrective suggestions, eliminating the need for manual review while maintaining comprehensive understanding.
Solution Approach 2:
The system enables self-service correction by automatically retrieving relevant information and generating corrective suggestions without human intervention. The retrieval module queries multiple information sources autonomously, and the generation module produces actionable corrections based on the retrieved information, allowing the system to correct standards violations independently.
2Productivity
If pre-trained large language model is used to generate corrective suggestions, then automated correction can be achieved, but the model lacks sufficient domain-specific information for effective suggestions
Solution Approach 1:
The patent applies preliminary action by having the retrieval module search and retrieve relevant domain-specific information from multiple sources before the generation module creates corrective suggestions. This pre-retrieval of contextually relevant information ensures that the LLM has access to necessary domain-specific knowledge (standards documentation, codebase patterns, industry discussions) before generating corrections, eliminating the information deficiency.
Solution Approach 2:
The retrieval module serves as an intermediary that bridges the gap between the pre-trained LLM and domain-specific information sources. It automatically queries documentation, codebase, and discussion records to gather relevant context, then provides this information to the generation module, enabling the LLM to generate accurate domain-specific corrections without requiring manual fine-tuning.
3Loss of information
If entire software codebase or all published documentation is provided to augment LLM prompt, then comprehensive contextual information is available, but the system becomes computationally inefficient
Solution Approach 1:
The retrieval module extracts only the specific portions of information that are relevant to the detected standards violation, rather than processing the entire codebase or all documentation. It queries multiple sources and retrieves only the contextual snippets necessary for understanding and correcting the specific violation, significantly reducing computational overhead while maintaining information completeness.
Solution Approach 2:
The system applies partial action by retrieving a selective subset of information from multiple sources that is sufficient for generating effective corrections. Rather than providing all possible information (excessive action), the retrieval module identifies and retrieves only the relevant portions needed for the specific violation context, optimizing the balance between information completeness and computational efficiency.
Data Source
AI summary
In various examples, a technique for resolving a standards violation includes receiving a violation notification of a standards violation detected in a software codebase. The technique also includes determining additional information relevant to the standards violation and included in one or more information sources. The technique further includes generating a prompt based at least on the violation notification and the additional information, generating, using a machine learning model and based at least on the prompt, one or more corrective suggestions associated with the standards violation, and modifying the software codebase based at least on the one or more software code changes.


