Code-to-Docstring Language Models for Intent-Aware Code Understanding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods and systems for writing or explaining computer code lack integration with natural language processing models, require extensive knowledge of programming languages and syntax, struggle with context understanding, and fail to learn and improve through interaction with users or self-generated data, leading to inefficiencies and errors in code generation.

Innovation Solution

A method and system that utilize a trained machine-learning model to generate computer code from natural language input, execute and verify code samples, and fine-tune the model based on feedback, enabling efficient and accurate code generation and understanding of code context.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional methods for writing or explaining computer code are used, then extensive knowledge of programming languages and syntax is required, but this increases the difficulty of operation and excludes users without advanced skills

Engineering Contradiction:
Improveease of code generationVSAvoidknowledge requirement
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

A natural language processing model serves as an intermediary between the user and the code generation system. The model translates natural language input into computer code, eliminating the need for users to directly manipulate programming syntax and reducing the knowledge barrier while maintaining code generation capability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical system of manual code writing with an automated machine learning model that generates code from natural language. This substitution eliminates the need for users to mechanically follow programming syntax rules while achieving the same functional outcome

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If conventional code writing methods are used, then time-consuming and repetitive processes are required, but this reduces productivity

Engineering Contradiction:
Improvecode generation efficiencyVSAvoidtime for code writing
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The machine learning model is pre-trained on extensive code datasets before deployment, performing the learning action in advance. This preliminary training enables the model to rapidly generate code during actual use without requiring users to spend time learning syntax or manually writing repetitive code patterns

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system performs self-service by automatically generating code from natural language input without requiring manual intervention for syntax construction. The model independently completes the code writing task, eliminating the time users would otherwise spend on repetitive coding activities

Inventive Principle:
Principle #25Self-service

3Manufacturing precision

If conventional code generation systems are used, then context understanding capabilities are lacking, but this worsens manufacturing precision of code quality

Engineering Contradiction:
Improvecode accuracyVSAvoidcontext understanding capability
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent adds a new dimension to code generation by incorporating natural language processing capabilities alongside traditional code synthesis. This dimensional expansion enables the system to understand contextual requirements expressed in natural language, improving code accuracy without overwhelming complexity through multi-modal input processing

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

4Reliability

If conventional methods are used, then the ability to learn and improve through interaction is absent, but this prevents continuous improvement of system performance

Engineering Contradiction:
Improvesystem performanceVSAvoidlearning capability
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system implements feedback mechanisms where the machine learning model receives input from user interactions, code execution results, and performance metrics. This feedback loop enables continuous learning and improvement of the model, enhancing reliability through iterative optimization based on real-world usage data

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20260017023A1Systems and methods for generating natural language using language models trained on computer code
Publication Date: 2026.01.15 OPENAI OPCO LLC
  • US20260017023A1 patent drawing
  • US20260017023A1 patent drawing
  • US20260017023A1 patent drawing

AI summary

Disclosed herein are methods, systems, and computer-readable media for generating natural language based on computer code input. In an embodiment, a method may comprise one or more of: accessing a docstring generation model configured to generate docstrings from computer code; receiving one or more computer code samples; generating, using the docstring generation model and based on the received one or more computer code samples, one or more candidate docstrings representing natural language text, each of the one or more candidate docstrings being associated with at least a portion of the one or more computer code samples; identifying at least one of the one or more candidate docstrings that provides an intent of the at least a portion of the one or more computer code samples; and/or outputting, via a user interface, the at least one identified docstring with the at least a portion of the one or more computer code samples.