Code Generation Model Training via Interpreter Validation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current code copilot chat models are inadequate for generating functional code in low-resource or scarcely-documented programming languages, often producing incorrect, invalid, or inferior code responses due to lack of abundant internet-accessible documentation and examples.

Innovation Solution

A computer-program product that identifies code synthesis items for a target programming language, generates a code synthesis prompt, synthesizes raw code segments using a large language model, and executes these segments with a code interpreter to validate and train a code generation model with aggregated valid code segments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code copilot chat models are trained on internet-sourced data, then they can serve users well for internet-dominant programming languages, but they fail to provide accurate code generation for low-resource languages with scarce documentation

Engineering Contradiction:
Improvecode generation accuracyVSAvoidlanguage coverage
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system performs preliminary actions by proactively identifying code synthesis items and generating code synthesis prompts before actual code generation requests are made. This advance preparation creates a curated training dataset that specifically addresses low-resource languages, enabling the model to be pre-adapted to these languages' unique features and functionalities before deployment.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A code interpreter serves as an intermediary component that validates generated code segments and provides feedback to the training process. This intermediary layer ensures that only syntactically correct and functionally valid code segments are included in the training dataset, thereby improving the reliability of code generation for low-resource languages without requiring extensive internet documentation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If code generation models are trained with abundant internet documentation, then they achieve high performance for popular languages, but they cannot adequately serve developers in critical industries using scarcely-documented languages

Engineering Contradiction:
Improvecode generation capabilityVSAvoidlanguage documentation availability
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The system implements self-service by automatically synthesizing code segments and validating them through execution without requiring human annotation or extensive external documentation. The code interpreter autonomously evaluates generated code, and the system automatically aggregates valid segments into training samples, enabling the model to serve low-resource languages independently of internet documentation availability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system changes the parameter of training data quality by transforming unvalidated synthetic code into validated training samples through execution testing. This parameter change from raw synthesis to validated segments ensures that the training data meets high standards of correctness, enabling productive code generation even for languages with scarce documentation.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If code copilot models generate code for low-resource languages, then they may provide some responses, but the code often contains more development problems than solutions

Engineering Contradiction:
Improvecode usabilityVSAvoidcode correctness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The code interpreter provides automated feedback by executing generated code segments and identifying syntactic errors or execution failures. This feedback loop allows the system to distinguish between valid and invalid code segments, ensuring that only correct code is included in the training dataset. The feedback mechanism continuously improves code correctness by learning from validation results.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary validation of code segments through execution testing before they are used for training. This advance verification ensures that the training data consists of pre-validated, correct code patterns, thereby improving the ease of operation and reliability of generated code from the outset rather than requiring post-generation correction.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12277409B1Systems, methods, and graphical user interfaces for training a code generation model for low-resource languages
Publication Date: 2025.04.15 SAS INSTITUTE INC
  • US12277409B1 patent drawing
  • US12277409B1 patent drawing
  • US12277409B1 patent drawing

AI summary

A system, method, and computer-program product includes identifying a plurality of code synthesis items for a target programming language, generating a code synthesis prompt based on a first sampling of the plurality of code synthesis items, synthesizing, via a large language model, a plurality of raw code segments using the code synthesis prompt, executing the plurality of raw code segments with a code interpreter associated with the target programming language, determining one or more valid code segments of the plurality of raw code segments that the code interpreter successfully executed, aggregating, via a second sampling, the one or more valid code segments into one or more validated code synthesis training samples, and training a code generation model using the one or more validated code synthesis training samples. User interfaces may be provided to allow target coding tasks to be specified via text or speech.