US 12,405,982 B2
Tool for providing contextual data for natural language queries
Dominik Kundel, Oakland, CA (US); Ian Morich, Oakland, CA (US); and Brian Partridge, Austin, TX (US)
Assigned to Twilio Inc., San Francisco, CA (US)
Filed by Twilio Inc, San Francisco, CA (US)
Filed on Jul. 27, 2023, as Appl. No. 18/360,431.
Claims priority of provisional application 63/496,763, filed on Apr. 18, 2023.
Prior Publication US 2024/0354321 A1, Oct. 24, 2024
Int. Cl. G06F 16/33 (2025.01); G06F 16/334 (2025.01)
CPC G06F 16/3344 (2019.01) 16 Claims
OG exemplary drawing
 
1. A method comprising:
receiving, by a processing device, a natural language (NL) query associated with a user identifier (ID);
generating, by the processing device executing instructions of a generative model application programming interface (API), an intermediate prompt to a first NL generative model to identify a scope of contextual data that is to facilitate processing of the NL query by at least one of the first NL generative model or a second NL generative model, wherein the intermediate prompt comprises a request to rank at least a subset of the contextual data in order of usefulness of the subset of the contextual data in facilitating processing of the NL query;
causing, by the processing device, the first NL generative model to process the intermediate prompt to identify the scope of the contextual data, wherein causing the first NL generative model to process the intermediate prompt comprises:
translating, using the generative model API, the intermediate prompt from an NL format to an input format of the first NL generative model;
communicating the translated intermediate prompt to the first NL generative model; and
receiving an intermediate response from the first NL generative model, wherein the intermediate response comprises the scope of the contextual data;
obtaining, from a data store, the contextual data stored in the data store in association with the user ID;
generating, by the processing device, an augmented NL query that is based on the NL query and the contextual data; and
communicating the augmented NL query to a recipient, wherein the recipient comprises at least one of:
the first NL generative model,
a second NL generative model, or
a user session associated with the user ID.