# US 2025/0085934 A1 · Programming language to interact with large language model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0085934 A1
- Document ID: US20250085934A1
- Status: Published application
- Kind: A1
- Application number: 18/367,798
- Filed: 2023-09-13
- Published: 2025-03-13
- Earliest claimed: 2023-09-13
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: David Kunz
- Web page: https://patentgrep.com/patent/US20250085934A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 8/35: model driven
- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F 11/3668: Testing of software
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06N 3/02: Neural networks
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/08: Learning methods
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

In an example, a software package is provided that provides an interface such that when the software is executed, a user is able to provide a natural language prompt using a scripting language that directs the interface to interact with a Large Language Model (LLM), adding contextual information to prompts sent to the LLM. The interface is then also able to extract and evaluate programming code generated by the LLM, so that the generated code may be used immediately in a software package, without the need for user edits and/or copy/pasting.

## Claims

### Claim 1

A system comprising:
at least one hardware processor; and
a computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
identifying, by a scripting language interface, a command in software programming code, the command defined in a scripting language interface library;
converting the command into a user portion of a natural language prompt;
adding a predefined system portion to the natural language prompt;
sending the natural language prompt to a Large Language Model (LLM) to generate a first piece of software code in a first programming language based on the natural language prompt;
validating the first piece of software code using a validation function of the first programming language; and
inserting the first piece of software code into the software programming code.

### Claim 2 (depends on 1)

The system of claim 1, wherein the command includes a natural language portion in which a desired piece of programming code is described in natural language, and one or more test functions.

### Claim 3 (depends on 2)

The system of claim 2, wherein the operations further comprise:
executing the one or more test functions on the first piece of software code; and
wherein the inserting is performed in response to a determination that the first piece of software code passes all of the one or more test functions.

### Claim 4 (depends on 1)

The system of claim 1, wherein, in response to a determination that the first piece of software code fails the validation function, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 5 (depends on 3)

The system of claim 3, wherein, in response to a determination that the first piece of software code fails one or more of the one or more test functions, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 6 (depends on 1)

The system of claim 1, wherein the operations further comprise:
generating a hash for the command by applying a hash function to the command; and
saving the hash and the first piece of software code in a file system cache.

### Claim 7 (depends on 6)

The system of claim 6, wherein the operations further comprise:
identifying, by a scripting language interface, a second command in software programming code;
generating a hash for the second command by applying the hash function to the command;
determining whether the hash for the second command is contained in the file system cache; and
in response to a determination that the hash for the second command is contained in the file system cache, retrieving the first piece of software code from the file system cache and inserting the first piece of software code into the software programming code in lieu of converting the command into a user portion of a second natural language prompt and sending the second natural language prompt to the LLM.

### Claim 8

A method comprising:
identifying, by a scripting language interface, a command in software programming code, the command defined in a scripting language interface library;
converting the command into a user portion of a natural language prompt;
adding a predefined system portion to the natural language prompt;
sending the natural language prompt to a Large Language Model (LLM) to generate a first piece of software code in a first programming language based on the natural language prompt;
validating the first piece of software code using a validation function of the first programming language; and
inserting the first piece of software code into the software programming code.

### Claim 9 (depends on 8)

The method of claim 8, wherein the command includes a natural language portion in which a desired piece of programming code is described in natural language, and one or more test functions.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
executing the one or more test functions on the first piece of software code; and
wherein the inserting is performed in response to a determination that the first piece of software code passes all of the one or more test functions.

### Claim 11 (depends on 8)

The method of claim 8, wherein, in response to a determination that the first piece of software code fails the validation function, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 12 (depends on 10)

The method of claim 10, wherein, in response to a determination that the first piece of software code fails one or more of the one or more test functions, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
generating a hash for the command by applying a hash function to the command; and
saving the hash and the first piece of software code in a file system cache.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
identifying, by a scripting language interface, a second command in software programming code;
generating a hash for the second command by applying the hash function to the command;
determining whether the hash for the second command is contained in the file system cache; and
in response to a determination that the hash for the second command is contained in the file system cache, retrieving the first piece of software code from the file system cache and inserting the first piece of software code into the software programming code in lieu of converting the command into a user portion of a second natural language prompt and sending the second natural language prompt to the LLM.

### Claim 15

A non-transitory machine-readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to perform operations comprising:
identifying, by a scripting language interface, a command in software programming code, the command defined in a scripting language interface library;
converting the command into a user portion of a natural language prompt;
adding a predefined system portion to the natural language prompt;
sending the natural language prompt to a Large Language Model (LLM) to generate a first piece of software code in a first programming language based on the natural language prompt;
validating the first piece of software code using a validation function of the first programming language; and
inserting the first piece of software code into the software programming code.

### Claim 16 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the command includes a natural language portion in which a desired piece of programming code is described in natural language, and one or more test functions.

### Claim 17 (depends on 16)

The non-transitory machine-readable medium of claim 16, wherein the operations further comprise:
executing the one or more test functions on the first piece of software code; and
wherein the inserting is performed in response to a determination that the first piece of software code passes all of the one or more test functions.

### Claim 18 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein, in response to a determination that the first piece of software code fails the validation function, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 19 (depends on 17)

The non-transitory machine-readable medium of claim 17, wherein, in response to a determination that the first piece of software code fails one or more of the one or more test functions, regenerating the first piece of software code by resending the natural language prompt to the LLM.

### Claim 20 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the operations further comprise:
generating a hash for the command by applying a hash function to the command; and
saving the hash and the first piece of software code in a file system cache.
