LLM Code Generation Using Proprietary Mapping and Pseudocode
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language models (LLMs) are not trained on proprietary software code, preventing organizations from leveraging their processing power to generate code that complies with organizational rules and conventions.
Innovation Solution
A system that prompts LLMs with non-proprietary code and proprietary code mappings to generate proprietary software code, using feedback to iteratively update the mappings and ensure compliance with organizational rules.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If LLMs are trained on generic code data from the Internet, then they can generate code based on widely available examples, but they cannot generate code that complies with organizational proprietary rules and conventions
Solution Approach 1:
The system performs preliminary action by collecting proprietary code examples from the organization's codebase before the code generation task. These examples are used to create a few-shot prompt that is injected into the LLM along with the code generation request, enabling the model to adapt to organizational rules without requiring full retraining
Solution Approach 2:
The patent introduces an intermediary component that acts as a bridge between the organization's proprietary codebase and the LLM. This intermediary collects, processes, and formats proprietary code examples into a suitable prompt structure, allowing the LLM to access organizational conventions without direct access to the proprietary code repository
2Reliability
If proprietary code mappings are provided to LLMs, then code compliance with organizational standards is achieved, but system complexity increases due to iterative mapping updates
Solution Approach 1:
The system implements feedback by automatically evaluating generated code against organizational standards and using the results to iteratively improve the few-shot prompt. The feedback loop includes code generation, compliance evaluation, and prompt refinement, which continuously enhances code compliance reliability while automating the complexity management
Solution Approach 2:
The system performs self-service by automatically collecting proprietary code examples from the organization's existing codebase and using them to update its own prompt structure. The system autonomously identifies relevant code patterns and incorporates them into future generation tasks, reducing manual intervention in mapping updates
3Measurement precision
If organizations collect and store proprietary code examples for LLM prompting, then code generation accuracy improves, but data security and privacy risks increase
Solution Approach 1:
The patent introduces an intermediary layer that sits between the proprietary codebase and the LLM processing pipeline. This intermediary selectively extracts and anonymizes code patterns, removing sensitive information while preserving structural and stylistic conventions. The intermediary ensures that only non-sensitive code characteristics are transmitted to the LLM, maintaining security while improving generation accuracy
Solution Approach 2:
The system applies extraction by selectively removing sensitive information from proprietary code examples before using them in prompting. The extraction process identifies and strips out confidential data, personal information, and proprietary algorithms while retaining the essential code structure and organizational conventions needed for accurate code generation
Data Source
AI summary
Techniques for generating proprietary software code using large language models (LLMs) are disclosed. An LLM is trained on billions of words, tokens, and code segments to generate non-proprietary software code. A system uses the LLM to generate proprietary software code by generating a set of LLM prompts and a proprietary code mapping. Based on receiving an instruction to generate a set of software code, a system generates a set of LLM prompts. The system prompts the LLM to generate a set of non-proprietary software code. The system further prompts the LLM to generate a set of pseudocode from the non-proprietary software code. The system further prompts the LLM to generate proprietary software code from the pseudocode and the proprietary code mapping.


