IP Library Granted Patent US 12711130
Granted Patent B1
US 12711130 · App. 19/185,769 · Granted Aug 18, 2026

Heterogenous data integration for LLM prompting

Inventors: Achille Belly Fokoue-Nkoutche (White Plains, NY); Srideepika Jayaraman (New York, NY); Elham Khabiri (Briarcliff Manor, NY); Jeffrey Owen Kephart (Cortlandt Manor, NY); Yingjie Li (Chappaqua, NY); Dhruv Shah (New York, NY); Youssef Drissi (Peekskill, NY); Fenno F. Heath, III (Woodbridge, CT); Anuradha Bhamidipaty (Yorktown Heights, NY); Fateh A. Tipu (Wappingers Falls, NY)
Assignee: International Business Machines Corporation
G06F16/243G06F16/21
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 12711130
App. No.
19/185,769
Granted
Aug 18, 2026
Kind
B1
Abstract

An embodiment establishes an integrated database comprising data from a set of heterogeneous data sources. The embodiment intercepts, by a database management application, a user input query transmitted to a target system, the user input query written in a natural language format. The embodiment transforms, by a natural language model within the database management application, the user input query into a structured query based on a relational schema, the transforming producing a formatted query. The embodiment modifies the formatted query, the modifying replacing a reference to a virtual table within a call to a user-defined functions (UDF), the modifying producing a final query. The embodiment executes the final query executing the final query, the executing comprising transmitting the final query to the integrated database, the transmitting causing executing a first responsive action based on the final query, the executing the first responsive action producing a first execution result.

Claims (41)

1 . A computer-implemented method comprising:

establishing an integrated database, the integrated database comprising data from a set of heterogeneous data sources;

intercepting, by a database management application, a user input query transmitted to a target system, the user input query written in a natural language format;

transforming, by a natural language model within the database management application, the user input query into a structured query based on a relational schema, the transforming producing a formatted query;

modifying the formatted query, the modifying replacing a reference to a virtual table within a call to a user-defined functions (UDF), the modifying producing a final query, wherein the virtual table corresponds to an application programming interface (API), and wherein modifying comprises replacing the virtual table reference with the user-defined function call that encapsulates an external API request; and

executing the final query, the executing comprising transmitting the final query to the integrated database, the transmitting causing executing a first responsive action based on the final query, the executing the first responsive action producing a first execution result.

2 . The computer-implemented method of claim 1 , wherein the relational schema includes a combination of a database table corresponding to database records and a virtual table corresponding to an application programming interface (API).

3 . The computer-implemented method of claim 1 , wherein the relational schema includes a combination of a database table corresponding to database records and a virtual table corresponding to a set of documents.

4 . The computer-implemented method of claim 1 , the method further comprising:

validating, by a guardrail module within the database management application, the formatted query prior to modifying the formatted query, the validating comprising checking for semantic consistency between the formatted query and the relational schema.

5 . The computer-implemented method of claim 1 , wherein transforming the user input query further comprises:

selecting, using a table selector module within the database management application, a subset of tables from the integrated database based on an analysis of content within the user input query.

6 . The computer-implemented method of claim 1 , wherein the modifying further comprises causing an execution of a first specific program instruction, the execution of the first specific program instruction causing analyzing the formatted query to determine argument values to pass into the UDF corresponding to the virtual table.

7 . The computer-implemented method of claim 1 , wherein the integrated database is configured to execute user-defined functions within SQL queries.

8 . The computer-implemented method of claim 1 , further comprising checking the first execution result against one or more conditions and returning an output based on the checking.

9 . A computer program product comprising one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by a processor to cause the processor to perform operations comprising:

establishing an integrated database, the integrated database comprising data from a set of heterogeneous data sources;

intercepting, by a database management application, a user input query transmitted to a target system, the user input query written in a natural language format;

transforming, by a natural language model within the database management application, the user input query into a structured query based on a relational schema, the transforming producing a formatted query;

modifying the formatted query, the modifying replacing a reference to a virtual table within a call to a user-defined functions (UDF), the modifying producing a final query, wherein the virtual table corresponds to an application programming interface (API), and wherein modifying comprises replacing the virtual table reference with the user-defined function call that encapsulates an external API request; and

executing the final query, the executing comprising transmitting the final query to the integrated database, the transmitting causing executing a first responsive action based on the final query, the executing the first responsive action producing a first execution result.

10 . The computer program product of claim 9 , wherein the stored program instructions are stored in a computer readable storage device in a data processing system, and wherein the stored program instructions are transferred over a network from a remote data processing system.

11 . The computer program product of claim 9 , wherein the stored program instructions are stored in a computer readable storage device in a server data processing system, and wherein the stored program instructions are downloaded in response to a request over a network to a remote data processing system for use in a computer readable storage device associated with the remote data processing system, further comprising:

program instructions to meter use of the program instructions associated with the request; and

program instructions to generate an invoice based on the metered use.

12 . The computer program product of claim 9 , wherein the relational schema includes a combination of a database table corresponding to database records and a virtual table corresponding to an application programming interfaces (API).

13 . The computer program product of claim 9 , wherein the relational schema includes a combination of a database table corresponding to database records and a virtual table corresponding to a set of documents.

14 . The computer program product of claim 9 , further comprising:

validating, by a guardrail module within the database management application, the formatted query prior to modifying the formatted query, the validating comprising checking for semantic consistency between the formatted query and the relational schema.

15 . The computer program product of claim 9 , wherein transforming the user input query further comprises:

selecting, using a table selector module within the database management application, a subset of tables from the integrated database based on an analysis of content within the user input query.

16 . The computer program product of claim 9 , wherein the modifying further comprises causing an execution of a first specific program instruction, the execution of the first specific program instruction causing analyzing the formatted query to determine argument values to pass into the UDF corresponding to the virtual table.

17 . The computer program product of claim 9 , wherein the integrated database is configured to execute user-defined functions within SQL queries.

18 . The computer program product of claim 9 , further comprising checking the first execution result against one or more conditions and returning an output based on the checking.

19 . A computer system comprising a processor and one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by the processor to cause the processor to perform operations comprising:

establishing an integrated database, the integrated database comprising data from a set of heterogeneous data sources;

intercepting, by a database management application, a user input query transmitted to a target system, the user input query written in a natural language format;

transforming, by a natural language model within the database management application, the user input query into a structured query based on a relational schema, the transforming producing a formatted query;

modifying the formatted query, the modifying replacing a reference to a virtual table within a call to a user-defined functions (UDF), the modifying producing a final query, wherein the virtual table corresponds to an application programming interface (API), and wherein modifying comprises replacing the virtual table reference with the user-defined function call that encapsulates an external API request; and

executing the final query, the executing comprising transmitting the final query to the integrated database, the transmitting causing executing a first responsive action based on the final query, the executing the first responsive action producing a first execution result.

20 . The computer system of claim 19 , wherein the relational schema includes a combination of a database table corresponding to database records and a virtual table corresponding to an application programming interfaces (API).