Multi-domain question answering system providing document level inference and related methods and computer program products
A method includes discarding a current knowledge corpus; selecting a new knowledge corpus; performing operations as follows using an Artificial Intelligence (AI) retriever engine: dividing the new knowledge corpus into a plurality of sub-documents; encoding a query for the plurality of sub-documents using a query encoding model; encoding each of the plurality of sub-documents using a document encoding model; and determining at least one matching sub-document of the plurality of sub-documents that is a match for containing an answer to the query based on the encoded query and each of the plurality of encoded sub-documents; performing operations as follows using an AI reader engine: generating an inference about the answer to the query based on a concatenation of each of the at least one matching sub-document with the query, each of the at least one matching sub-document having an associated reader loss function result for the inference; identifying one of the at least one matching sub-document having a lowest reader loss function result; and associating the identified one of the at least one matching sub-document with a truth label for the query.
1 . A method, comprising:
discarding, by one or more processors, a current knowledge corpus associated with a previous patient record to reduce the risk of mixing private information between patient records;
selecting, by the one or more processors, a new knowledge corpus associated with a new patient record which does not include the current knowledge corpus associated with the previous patient record;
dividing, by the one or more processors using an Artificial Intelligence (AI) retriever engine, the new knowledge corpus into a plurality of sub-documents;
encoding, by the one or more processors using the AI retriever engine, a query for the plurality of sub-documents using a query encoding model that generates a first vector representing the query;
encoding, by the one or more processors using the AI retriever engine, each of the plurality of sub-documents using a document encoding model that for each of the plurality of sub-documents, generates a second vector representing the sub-document; and
determining, by the one or more processors using the AI retriever engine, two or more matching sub-documents of the plurality of sub-documents that are a match for containing an answer to the query based on the encoded query and each of the plurality of encoded sub-documents by comparing the first vector to each second vector to identify the two or more matching sub-documents;
generating, by the one or more processors using an AI reader engine, an inference about the answer to the query based on a concatenation of each of the two or more matching sub-documents with the query, each of the two or more matching sub-documents having an associated reader loss function result for the inference;
identifying, by the one or more processors using the AI reader engine, one of the two or more matching sub-documents having a lowest reader loss function result; and
associating, by the one or more processors using the AI reader engine, the identified one of the two or more matching sub-documents with a truth label for the query.
2 . The method of claim 1 , further comprising:
updating, by the one or more processors, the AI reader engine based on the reader loss function results associated with the two or more matching sub-documents, respectively;
updating, by the one or more processors, the query encoding model based on at least one match loss function result between the query and the two or more matching sub-documents, respectively; and
updating, by the one or more processors, the document encoding model based on the at least one match loss function result between the query and the two or more matching sub-documents, respectively.
3 . The method of claim 1 , wherein each of the query encoding model and the document encoding model comprise a vector space model.
4 . The method of claim 3 , wherein the vector space model uses a term frequency-inverse document frequency weighting scheme.
5 . The method of claim 1 , wherein each of the query encoding model and the document encoding model comprise a neural information retrieval model.
6 . The method of claim 1 , wherein the reader engine comprises a Long Short-Term Memory (LSTM) artificial recurrent neural network.
7 . The method of claim 1 , wherein the reader engine comprises a Bidirectional Encoder Representations from Transformers (BERT) machine learning system.
8 . The method of claim 1 , wherein the query comprises a question about one or more medical records.
9 . A method, comprising:
discarding, by one or more processors, a current knowledge corpus associated with a previous patient record to reduce the risk of mixing private information between patient records;
selecting, by the one or more processors, a new knowledge corpus associated with a new patient record which does not include the current knowledge corpus associated with the previous patient record;
dividing, by the one or more processors using an Artificial Intelligence (AI) retriever engine, the new knowledge corpus into a plurality of sub-documents;
encoding, by the one or more processors using the AI retriever engine, a query for the plurality of sub-documents using a query encoding model that generates a first vector representing the query;
encoding, by the one or more processors using the AI retriever engine, each of the plurality of sub-documents using a document encoding model that for each of the plurality of sub-documents, generates a second vector representing the sub-document; and
determining, by the one or more processors using the AI retriever engine, two or more matching sub-documents of the plurality of sub-documents that are a match for containing an answer to the query based on the encoded query and each of the plurality of encoded sub-documents by comparing the first vector to each second vector to identify the two or more matching sub-documents;
generating, by the one or more processors using an AI reader engine, an inference about the answer to the query based on a concatenation of the two or more matching sub-documents with the query.
10 . The method of claim 9 , further comprising:
providing, by the one or more processors, a supplemental knowledge corpus.
11 . The method of claim 10 , further comprising:
querying, by the one or more processors, the supplemental knowledge corpus to generate a preliminary query result; and
modifying, by the one or more processors, the query for the plurality of sub-documents based on the preliminary query result.
12 . The method of claim 11 , wherein modifying the query for the plurality of sub-documents comprises concatenating the query with the preliminary query result.
13 . The method of claim 9 , wherein each of the query encoding model and the document encoding model comprise a vector space model; or
wherein each of the query encoding model and the document encoding model comprise a neural information retrieval model.
14 . The method of claim 9 , wherein the reader engine comprises a Long Short-Term Memory (LSTM) artificial recurrent neural network.
15 . The method of claim 9 , wherein the reader engine comprises a Bidirectional Encoder Representations from Transformers (BERT) machine learning system.
16 . The method of claim 9 , wherein the query comprises a question about one or more medical records.
17 . A system, comprising:
one or more processors; and
one or more memories storing processor-executable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
discarding a current knowledge corpus associated with a previous patient record to reduce the risk of mixing private information between patient records;
selecting a new knowledge corpus associated with a new patient record which does not include the current knowledge corpus associated with the previous patient record;
dividing, using an Artificial Intelligence (AI) retriever engine, the new knowledge corpus into a plurality of sub-documents;
encoding, using the AI retriever engine, a query for the plurality of sub-documents using a query encoding model that generates a first vector representing the query;
encoding, using the AI retriever engine, each of the plurality of sub-documents using a document encoding model that for each of the plurality of sub-documents, generates a second vector representing the sub-document; and
determining, using the AI retriever engine, two or more matching sub-documents of the plurality of sub-documents that are a match for containing an answer to the query based on the encoded query and each of the plurality of encoded sub-documents by comparing the first vector to each second vector to identify the two or more matching sub-documents;
generating, using an AI reader engine, an inference about the answer to the query based on a concatenation of each of the two or more matching sub-documents with the query, each of the two or more matching sub-documents having an associated reader loss function result for the inference;
identifying, using the AI reader engine, one of the two or more matching sub-documents having a lowest reader loss function result; and
associating, using the AI reader engine, the identified one of the two or more matching sub-documents with a truth label for the query.
18 . The system of claim 17 , wherein the one or more processors further perform operations comprising:
updating the AI reader engine based on the reader loss function results associated with the two or more matching sub-documents, respectively;
updating the query encoding model based on at least one match loss function result between the query and the two or more matching sub-documents, respectively; and
updating the document encoding model based on the at least one match loss function result between the query and the two or more matching sub-documents, respectively.
19 . One or more non-transitory computer-readable media storing processor-executable instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
discarding a current knowledge corpus associated with a previous patient record to reduce the risk of mixing private information between patient records;
selecting a new knowledge corpus associated with a new patient record which does not include the current knowledge corpus associated with the previous patient record;
dividing, using an Artificial Intelligence (AI) retriever engine, the new knowledge corpus into a plurality of sub-documents;
encoding, using the AI retriever engine, a query for the plurality of sub-documents using a query encoding model that generates a first vector representing the query;
encoding, using the AI retriever engine, each of the plurality of sub-documents using a document encoding mode that for each of the plurality of sub-documents, generates a second vector representing the sub-document; and
determining, using the AI retriever engine, two or more matching sub-documents of the plurality of sub-documents that are a match for containing an answer to the query based on the encoded query and each of the plurality of encoded sub-documents by comparing the first vector to each second vector to identify the two or more matching sub-documents;
generating, using an AI reader engine, an inference about the answer to the query based on a concatenation of each of the two or more matching sub-documents with the query, each of the two or more matching sub-documents having an associated reader loss function result for the inference;
identifying, using the AI reader engine, one of the two or more matching sub-documents having a lowest reader loss function result; and
associating, using the AI reader engine, the identified one of the two or more matching sub-documents with a truth label for the query.
20 . The one or more non-transitory computer-readable media of claim 19 , wherein the one or more processors further perform operations comprising:
updating the AI reader engine based on the reader loss function results associated with the two or more matching sub-documents, respectively;
updating the query encoding model based on at least one match loss function result between the query and the two or more matching sub-documents, respectively; and
updating the document encoding model based on the at least one match loss function result between the query and the two or more matching sub-documents, respectively.