CPC G06F 40/279 (2020.01) [G06F 40/126 (2020.01); G06N 3/044 (2023.01)] | 20 Claims |
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.
|