IP Library Granted Patent US 12705238
Granted Patent B2
US 12705238 · App. 18/999,825 · Granted Aug 11, 2026

Record snapshot

Inventors: Minhaj Khan (New York, NY); Avanthika Ramesh (San Francisco, CA); Karen Yin (San Jose, CA); Jan Adriaan Kruger (Fuquay-Varina, NC)
Assignee: Salesforce, Inc.
G06F16/24534G06F16/2246G06F16/248G06F40/186G06Q30/01
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 12705238
App. No.
18/999,825
Granted
Aug 11, 2026
Kind
B2
Abstract

Disclosed herein are system, method, and computer program product embodiments for implementing grounding of prompt templates using record snapshot. An embodiment operates by parsing a data record to generate a hierarchical tree graph of context data corresponding to a prompt template selected based on a type of a prompt request, and the data record is identified based on a data-record reference in the prompt request. The embodiment then generates a prompt from the prompt template by grounding the prompt template with a data object comprising the hierarchical tree graph of context data. The embodiment then queries a large language model with the prompt to generate an output specific to the data record.

Claims (46)

1 . A computer-implemented method, comprising:

parsing a data record responsive to a selection of the data record by a user, by at least one computer processor, into a plurality of data fields;

generating, by the at least one computer processor, a hierarchical tree graph of context data based on the plurality of data fields and corresponding to a prompt template selected based on a type of a prompt request, wherein the data record is identified based on a data-record reference in the prompt request;

generating a prompt from the prompt template by grounding the prompt template with a data object comprising the hierarchical tree graph of context data, the grounding including entering data from the data record into corresponding fields of the prompt template; and

querying a large language model with the prompt to generate an output specific to the data record.

2 . The method of claim 1 , wherein parsing the data record to generate the hierarchical tree graph of context data comprises:

extracting a plurality of fields of the data record based on a page layout of the data record; and

generating, based on the extracted plurality of fields, the hierarchical tree graph of context data corresponding to the page layout of the data record.

3 . The method of claim 1 , wherein identifying the data record comprises:

matching a characteristic of the data record to the data-record reference in the prompt request.

4 . The method of claim 1 , wherein generating the prompt from the prompt template comprises:

resolving a plurality of merge fields of the prompt template using the data object.

5 . The method of claim 1 , wherein the prompt template is grounded by embedding the data object within the prompt template in a single merge field.

6 . The method of claim 1 , wherein the data record is customer relationship management data.

7 . The method of claim 1 , wherein the type of the prompt request is a request to generate a type of email based on the data record.

8 . The method of claim 1 , wherein the data object is a JavaScript object notation (JSON) object.

9 . A system, comprising:

a memory; and

at least one processor coupled to the memory and configured to perform operations comprising:

parsing a data record responsive to a selection of the data record by a user into a plurality of data fields;

generating a hierarchical tree graph of context data based on the plurality of data fields and corresponding to a prompt template selected based on a type of a prompt request, wherein the data record is identified based on a data-record reference in the prompt request,

generating a prompt from the prompt template by grounding the prompt template with a data object comprising the hierarchical tree graph of context data, the grounding including entering data from the data record into corresponding fields of the prompt template; and

querying a large language model with the prompt to generate an output specific to the data record.

10 . The system of claim 9 , wherein to parse the data record to generate the hierarchical tree graph of context data, the operations further comprise:

extracting a plurality of fields of the data record based on a page layout of the data record; and

generating, based on the extracted plurality of fields, the hierarchical tree graph of context data corresponding to the page layout of the data record.

11 . The system of claim 9 , to the operations further comprising:

matching a characteristic of the data record to the data-record reference in the prompt request.

12 . The system of claim 9 , wherein to generate the prompt from the prompt template, the operations further comprising:

resolving a plurality of merge fields of the prompt template using the data object.

13 . The system of claim 9 , wherein the prompt template is grounded by embedding the data object within the prompt template in a single merge field.

14 . The system of claim 9 , wherein the data record is customer relationship management data.

15 . A non-transitory computer-readable medium (CRM) having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:

parsing a data record responsive to a selection of the data record by a user into a plurality of data fields;

generating a hierarchical tree graph of context data based on the plurality of data fields and corresponding to a prompt template selected based on a type of a prompt request, wherein the data record is identified based on a data-record reference in the prompt request;

generating a prompt from the prompt template by grounding the prompt template with a data object comprising the hierarchical tree graph of context data, the grounding including entering data from the data record into corresponding fields of the prompt template; and

querying a large language model with the prompt to generate an output specific to the data record.

16 . The non-transitory CRM of claim 15 , wherein parsing the data record to generate the hierarchical tree graph of context data comprises:

extracting a plurality of fields of the data record based on a page layout of the data record; and

generating, based on the extracted plurality of fields, the hierarchical tree graph of context data corresponding to the page layout of the data record.

17 . The non-transitory CRM of claim 15 , wherein identifying the data record comprises:

matching a characteristic of the data record to the data record reference in the prompt request.

18 . The non-transitory CRM of claim 15 , wherein generating the prompt from the prompt template comprises:

resolving a plurality of merge fields of the prompt template using the data object.

19 . The non-transitory CRM of claim 15 , wherein the prompt template is grounded by embedding the data object within the prompt template in a single merge field.

20 . The non-transitory CRM of claim 15 , wherein the data record is customer relationship management data.