US 12,112,131 B2
Systems and methods for factual extraction from language model
Benjamin Newman, Great Neck, NY (US); Nazneen Rajani, Mountain View, CA (US); and Prafulla Kumar Choubey, San Jose, CA (US)
Assigned to Salesforce, Inc., San Francisco, CA (US)
Filed by Salesforce, Inc., San Francisco, CA (US)
Filed on Jan. 28, 2022, as Appl. No. 17/588,043.
Claims priority of provisional application 63/242,862, filed on Sep. 10, 2021.
Prior Publication US 2023/0083512 A1, Mar. 16, 2023
Int. Cl. G06F 40/30 (2020.01); G06F 3/08 (2006.01); G06F 40/126 (2020.01); G06F 40/279 (2020.01); G06N 3/044 (2023.01)
CPC G06F 40/279 (2020.01) [G06F 40/126 (2020.01); G06N 3/044 (2023.01)] 20 Claims
OG exemplary drawing
 
1. A method for extracting factual information from a language model, the method comprising:
receiving, via a communication interface, a query for factual information;
encoding, via an embedding layer of a pre-trained language model, the natural language prompt into a first embedding;
encoding, via an adapter model the first embedding into a second embedding that includes a continuous representation based on a probability that the second embedding will return the factual information when the second embedding is fed to a first attention layer of the pre-trained language model, wherein the adapter model is placed between the embedding layer of the pre-trained language model and a first attention layer of the pre-trained language model;
decoding, via the first attention layer of the pre-trained language model, the second embedding into a response to the query; and
extracting the factual information from the decoded response to the query.