IP Library › Granted Patent US 12,737,395
Granted Patent B2
US 12,737,395 · App. 18/669,860 · Granted Sep 15, 2026

Generation of formula from natural language description

Inventor: Paul O'Hara (Dublin, IE)
Assignee: SAP IRELAND LIMITED
G06F16/3329G06F16/3347G06F16/383
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,737,395
App. No.
18/669,860
Granted
Sep 15, 2026
Kind
B2
Abstract

Systems and methods include reception of a natural language description of a calculation formula and metadata of a data source, generation of a first prompt to prompt determination of calculation components of the calculation formula based on the description, reception of a plurality of calculation components from a text generation model in response to the first prompt, determination, for each of the plurality of calculation components, of metadata of each of one or more similar operators to a calculation component, generation of a second prompt to determine the calculation formula based on the natural language description, the metadata of the data source and the metadata of each of the one or more similar operators, and reception of the calculation formula from the text generation model in response to the second prompt.

Claims (58)

1 . A system comprising:

a memory storing program code; and

one or more processing units to execute the program code to cause the system to:

receive a natural language description of a calculation formula and column names of a data source;

generate a first prompt to prompt determination of calculation components of the calculation formula based on the natural language description and the column names of the data source;

transmit the first prompt to a text generation model;

receive a plurality of calculation components from the text generation model in response to the first prompt;

for each of the plurality of calculation components, determine descriptions of each of one or more similar operators by:

transmission of each of the plurality of calculation components to an embedding model to determine an embedding for each of the plurality of calculation components;

querying of a vector database for each determined embedding; and

in response to the querying, reception of, for each of the plurality of calculation components, descriptions of each of one or more similar operators from the vector database;

generate a second prompt to determine the calculation formula based on the natural language description, the column names of the data source and the descriptions of each of the one or more similar operators of each of the plurality of calculation components;

transmit the second prompt to the text generation model;

receive the calculation formula from the text generation model in response to the second prompt; and

present the calculation formula.

2 . The system according to claim 1 , the one or more processing units to execute the program code to cause the system to:

execute a syntactic validation on the received calculation formula.

3 . The system according to claim 2 , the one or more processing units to execute the program code to cause the system to:

execute a functional validation on the received calculation formula.

4 . The system according to claim 1 , the first prompt including a first system prompt and a first user prompt, wherein the first user prompt includes the natural language description and the column names of the data source.

5 . The system according to claim 4 , the second prompt including a second system prompt and a second user prompt, wherein the second system prompt includes the column names of the data source and the descriptions of each of the one or more similar operators, and the second user prompt includes the natural language description.

6 . A method comprising:

receiving a natural language description of a calculation formula;

generating a first prompt to prompt determination of calculation components of the calculation formula based on the natural language description;

transmitting the first prompt to a text generation model;

receiving a plurality of calculation components from the text generation model in response to the first prompt;

for each of the plurality of calculation components, determining descriptions of each of one or more similar operators by:

transmitting each of the plurality of calculation components to an embedding model to determine an embedding for each of the plurality of calculation components;

querying a vector database for each determined embedding; and

in response to the querying, receiving, for each of the plurality of calculation components, descriptions of each of one or more similar operators from the vector database;

generating a second prompt to determine the calculation formula based on the natural language description, column names of a data source against which the calculation formula is to be applied, and the descriptions of each of the one or more similar operators of each of the plurality of calculation components;

transmitting the second prompt to the text generation model;

receiving the calculation formula from the text generation model in response to the second prompt; and

presenting the calculation formula.

7 . The method according to claim 6 , further comprising:

executing a syntactic validation on the received calculation formula.

8 . The method according to claim 7 , further comprising:

executing a functional validation on the received calculation formula.

9 . The method according to claim 6 , the first prompt including a first system prompt and a first user prompt, wherein the first user prompt includes the natural language description and the column names of the data source.

10 . The method according to claim 9 , the second prompt including a second system prompt and a second user prompt, wherein the second system prompt includes the column names of the data source and the descriptions of each of the one or more similar operators, and the second user prompt includes the natural language description.

11 . A non-transitory medium storing program code executable by one or more processing units of a computing system to cause the computing system to:

receive a natural language description of a calculation formula and column names of a data source;

generate a first prompt to prompt determination of calculation components of the calculation formula based on the natural language description;

transmit the first prompt to a text generation model;

receive a plurality of calculation components from the text generation model in response to the first prompt;

for each of the plurality of calculation components, determine descriptions of each of one or more operators similar to a calculation component by:

transmission of each of the plurality of calculation components to an embedding model to determine an embedding for each of the plurality of calculation components;

querying of a vector database for each determined embedding; and

in response to the querying, reception of, for each of the plurality of calculation components, descriptions of each of one or more similar operators from the vector database;

generate a second prompt to determine the calculation formula based on the natural language description, the column names of the data source and the descriptions of each of the one or more similar operators determined for each of the plurality of calculation components;

transmit the second prompt to the text generation model; and

receive the calculation formula from the text generation model in response to the second prompt.

12 . The medium according to claim 11 , the program code executable by one or more processing units of a computing system to cause the computing system to:

execute a syntactic validation on the received calculation formula.

13 . The medium according to claim 12 , the program code executable by one or more processing units of a computing system to cause the computing system to:

execute a functional validation on the received calculation formula.

14 . The medium according to claim 11 , the first prompt including a first system prompt and a first user prompt, wherein the first user prompt includes the natural language description and the column names of the data source, and

the second prompt including a second system prompt and a second user prompt, wherein the second system prompt includes the column names of the data source and the descriptions of each of the one or more similar operators, and the second user prompt includes the natural language description.

Assignments (2)
CHANGE OF NAME Recorded Jan 26, 2026
From: BUSINESS OBJECTS SOFTWARE LIMITED
To: SAP IRELAND LIMITED
Reel/Frame 074510/0354 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 21, 2024
From: O'HARA, PAUL
To: BUSINESS OBJECTS SOFTWARE LTD
Reel/Frame 067478/0638 →
Continuity (1)
Related Publication 20250363138A1 · Nov 27, 2025
References Cited (14)
US 12032918B1 · Garvey · 2024 [cited by examiner]
US 20210118431A1 · Zhang · 2021 [cited by examiner]
US 20210142164A1 · Liu · 2021 [cited by examiner]
US 20220318507A1 · Barkan · 2022 [cited by examiner]
US 20240411896A1 · Myers · 2024 [cited by examiner]
US 20250013963A1 · Qazvinian · 2025 [cited by examiner]
US 20250217174A1 · Shoshan · 2025 [cited by examiner]
US 20250252121A1 · Sulser · 2025 [cited by examiner]
US 20250298583A1 · Carrara · 2025 [cited by examiner]
US 20250307236A1 · Tang · 2025 [cited by examiner]
US 20250321718A1 · Toub · 2025 [cited by examiner]
US 20250335434A1 · Chen · 2025 [cited by examiner]
US 20250342191A1 · Noel · 2025 [cited by examiner]
US 20250348360A1 · Abadi · 2025 [cited by examiner]