LLM Code Generation Using Data Summaries for Privacy Protection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for using large language models to generate executable code do not adequately preserve the privacy and confidentiality of proprietary data, posing a significant risk for financial institutions that handle sensitive information.

Innovation Solution

A method and system that utilizes a large language model to generate executable code by receiving structured information, defining rules, and generating outputs that preserve privacy, without exposing proprietary data, by leveraging generative and autoregressive LLMs to produce outputs rooted from internal data summaries and user intents, using predefined summaries and rules to create executable code that can be executed within secure environments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If proprietary data is input into large language models to generate executable code, then code generation capability is improved, but data privacy and confidentiality are compromised

Engineering Contradiction:
Improvecode generation capabilityVSAvoiddata privacy risk
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent extracts only the essential structural information from proprietary data tables, creating simplified schemas that contain column names, data types, and relationships without including actual proprietary values. This extracted schema is then input to the LLM for code generation, maintaining productivity while eliminating privacy risks.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary layer (data schema representation) between the proprietary data and the LLM. This intermediary contains only structural metadata而非 actual data values, serving as a safe mediator that enables code generation without exposing sensitive information to the model.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If structured information and rules are provided to language models for code generation, then code accuracy and reliability are improved, but system complexity increases

Engineering Contradiction:
Improvecode accuracyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the information input to the LLM into distinct, organized components: data schema definitions, table relationship descriptions, and output format specifications. This segmentation allows the system to provide comprehensive guidance for accurate code generation while maintaining manageable system complexity through structured organization.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12585439B2Method and system for code generation by large language models
Publication Date: 2026.03.24 JPMORGAN CHASE BANK NA
  • US12585439B2 patent drawing
  • US12585439B2 patent drawing
  • US12585439B2 patent drawing

AI summary

A method for using a large language model (LLM) to generate executable code in a manner that preserves privacy and confidentiality of proprietary data is provided. The method includes: receiving information that relates to a summarization of a data table; defining a set of rules for facilitating a generation of executable code by an LLM; receiving an inquiry from a user; inputting each of the summarization information, the set of rules, and the inquiry into the LLM; receiving, in response to the input, a set of executable code that is generated by the LLM; and executing the set of executable code in order to generate an output. The summarization information may be received from an external source that has access to proprietary data included in the data table, and the summarization information may be structured so as to preserve a privacy of the proprietary data.