# US 12,596,838 B2 · Method and system for performing table question-answering tasks while preserving data security

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

- Number: US 12,596,838 B2
- Document ID: US12596838B2
- Status: Granted
- Kind: B2
- Application number: 18/535,428
- Filed: 2023-12-11
- Published: 2025-06-12
- Granted: 2026-04-07
- Earliest claimed: 2023-12-11
- Assignees: JPMorgan Chase Bank, N.A.
- Applicants: JPMorgan Chase Bank, N.A.
- Inventors: William Watson; Naan Cho; Tucker Richard Balch; Manuela Veloso
- Web page: https://patentgrep.com/patent/US12596838B2

## CPC

- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F 21/6227: {where protection concerns the structure of data, e.g. records, types, queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for using a large language model to perform complex table question-answering tasks while preserving data security and privacy with respect to the underlying data included in a table is provided. The method includes: receiving a user query that relates to a table; generating, based on the user query, a prompt that includes a role, at least one instruction, schema, and a question; transmitting the prompt to an external processor that does not have access to the underlying data included in the table; receiving, from the external processor, a set of executable code which has been generated by the external processor in response to the prompt and which is applicable to the table; generating an answer to the user query by executing the set of executable code; and transmitting, to the user, the answer to the user query.

## Claims

### Claim 1

A method for performing a question-answering task relating to a table while preserving data security and privacy with respect to underlying data included in the table, the method being implemented by a first processor, the method comprising:
receiving, by the first processor residing in a first network from a user, a user query that relates to the table;
generating, by the first processor based on the user query, a prompt that includes a role, at least one instruction, schema, and a question,
wherein the prompt is structured to guide a second processor residing on a second network that is outside of the first network to generate an executable code that is applicable to the table, and
wherein the prompt dictates a format of a response to the prompt;
transmitting, by the first processor of the first network to the second processor of the second network that is external to the first network, the prompt;
receiving, by the first processor from the second processor, a first set of executable code that is applicable to the table, the first set of executable code having been generated by the second processor in response to the prompt,
wherein the second processor generates the first set of executable code without knowledge of tabular content of the table for preserving data security and privacy with respect to the underlying data included in the table, and
wherein the second processor specifies a sequence of commands for the generating of the first set of executable code in response to the prompt;
evaluating, by the first processor, the first set of executable code;
in response to the evaluating, generating, by the first processor, a follow-up prompt for modification of the first set of executable code;
transmitting, from the first processor and to the second processor, the follow-up prompt;
modifying, by the second processor, the first set of executable code based on the follow-up prompt;
generating, by the first processor, an answer to the user query by executing the modified first set of executable code; and
transmitting, by the first processor to the user, the answer to the user query.

### Claim 2 (depends on 1)

The method of claim 1, wherein the role includes an explanation that the second processor is an artificial intelligence assistant that is designed to answer questions from tables by generating executable code and that the second processor is provided with information that relates to columns included in the table but not provided with the underlying data included in the table.

### Claim 3 (depends on 1)

The method of claim 1, wherein the at least one instruction includes information indicating a type of the executable code to be generated and at least one suggestion that relates to how to overcome a potential determination by the second processor that the question is not answerable.

### Claim 4 (depends on 1)

The method of claim 1, wherein the schema includes information that indicates a number of columns included in the table and column header information for each of the columns included in the table.

### Claim 5 (depends on 1)

The method of claim 1, wherein the question includes information that relates to the user query.

### Claim 6 (depends on 1)

The method of claim 1, further comprising determining whether the answer to the user query corresponds to a successful retrieval of information from the table.

### Claim 7 (depends on 6)

The method of claim 6, wherein the successful retrieval includes at least one from among a text entry from the table, an aggregated numerical value, and a list of entries from the table.

### Claim 8

A computing system for performing a question-answering task relating to a table while preserving data security and privacy with respect to underlying data included in the table, the computing system comprising:
a first processor residing on a first network;
a second processor residing on a second network that is outside of the first network;
a memory; and
a communication interface coupled to each of the first processor and the memory,
wherein the first processor is configured to:
receive, from a user via the communication interface, a user query that relates to the table;
generate, based on the user query, a prompt that includes a role, at least one instruction, schema, and a question,
wherein the prompt is structured to guide a second processor residing outside of a first network to generate an executable code that is applicable to the table, and
wherein the prompt dictates a format of a response to the prompt;
transmit, via the communication interface to the second processor of the second network that is external to the first network, the prompt;
receive, from the external processor via the communication interface, a first set of executable code that is applicable to the table, the first set of executable code having been generated by the external processor in response to the prompt;
wherein the second processor generates the first set of executable code without knowledge of tabular content of the table for preserving data security and privacy with respect to the underlying data included in the table, and
wherein the second processor specifies a sequence of commands for the generating of the first set of executable code in response to the prompt;
evaluate the first set of executable code;
in response to the evaluation, generate a follow-up prompt for modification of the first set of executable code;
transmit, to the second processor, the follow-up prompt;
modify, by the second processor, the first set of executable code based on the follow-up prompt;
generate an answer to the user query by executing the modified first set of executable code; and
transmit, to the user via the communication interface, the answer to the user query.

### Claim 9 (depends on 8)

The computing apparatus of claim 8, wherein the role includes an explanation that the external processor is an artificial intelligence assistant that is designed to answer questions from tables by generating executable code and that the external processor is provided with information that relates to columns included in the table but not provided with the underlying data included in the table.

### Claim 10 (depends on 8)

The computing apparatus of claim 8, wherein the at least one instruction includes information indicating a type of the executable code to be generated and at least one suggestion that relates to how to overcome a potential determination by the external processor that the question is not answerable.

### Claim 11 (depends on 8)

The computing apparatus of claim 8, wherein the schema includes information that indicates a number of columns included in the table and column header information for each of the columns included in the table.

### Claim 12 (depends on 8)

The computing apparatus of claim 8, wherein the question includes information that relates to the user query.

### Claim 13 (depends on 8)

The computing apparatus of claim 8, wherein the first processor is further configured to determine whether the answer to the user query corresponds to a successful retrieval of information from the table.

### Claim 14 (depends on 13)

The computing apparatus of claim 13, wherein the successful retrieval includes at least one from among a text entry from the table, an aggregated numerical value, and a list of entries from the table.

### Claim 15

A non-transitory computer readable storage medium storing instructions for performing a question-answering task relating to a table while preserving data security and privacy with respect to underlying data included in the table, the storage medium comprising a first set of executable code which, when executed by a first processor residing on a first network, causes the first processor to:
receive, from a user, a user query that relates to the table;
generate, based on the user query, a prompt that includes a role, at least one instruction, schema, and a question,
wherein the prompt is structured to guide a second processor residing on a second network that is outside of the first network to generate an executable code that is applicable to the table, and
wherein the prompt dictates a format of a response to the prompt;
transmit, to the second processor of the second network that is external to the first network, the prompt;
receive, from the second processor, a second set of executable code that is applicable to the table, the second set of executable code having been generated by the second processor in response to the prompt,
wherein the second processor generates the first set of executable code without knowledge of tabular content of the table for preserving data security and privacy with respect to the underlying data included in the table, and
wherein the second processor specifies a sequence of commands for the generating of the first set of executable code in response to the prompt;
evaluate the first set of executable code;
in response to the evaluation, generate a follow-up prompt for modification of the first set of executable code;
transmit, to the second processor, the follow-up prompt;
modify, by the second processor, the first set of executable code based on the follow-up prompt;
generate an answer to the user query by executing the modified first set of executable code; and
transmit, to the user, the answer to the user query.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the role includes an explanation that the second processor is an artificial intelligence assistant that is designed to answer questions from tables by generating executable code and that the second processor is provided with information that relates to columns included in the table but not provided with the underlying data included in the table.
