Location of key value pairs
Computer implemented methods, systems, and computer program products include program code executing on a processor(s) extract formerly missing KVP from fields in a document. The program code utilizes an extractor to monitor KVP data in a document. Based on the monitoring, the program code determines that accuracy of a field in the document, is below a pre-defined threshold. The program code dynamically generates a new extractor comprising a KVP extractor to target the field in the document.
1 . A computer-implemented method for obtaining missing key value pair (KVP) data from a document, comprising:
utilizing, by one or more processors, an extractor, to monitor KVP data in a document;
based on the monitoring, determining, by the one or more processors, that accuracy of a field in the document, is below a pre-defined threshold; and
dynamically generating, by the one or more processors, based on the determining, a new extractor comprising a KVP extractor to target the field in the document, comprising:
based on determining that the accuracy of the field in the document is below the pre-defined threshold, activating, by the one or more processors, the dynamic generation of the new extractor, wherein the dynamically generating comprises designing the new extractor for the field for which the accuracy is below the pre-defined threshold.
2 . The computer-implemented method of claim 1 , further comprising:
monitoring, by the one or more processors, the KVP data in the document based in utilizing the new extractor.
3 . The computer-implemented method of claim 1 , wherein the utilizing the extractor to monitor the KVP data in the document comprises:
monitoring, by the one or more processors, existence of KVPs within the document, wherein by utilizing a model to compute deliberated selected attributes for the monitored KVPs;
collecting, by the one or more processors, the KVP data;
storing, by the one or more processors, the KVP data for subsequent verification, wherein the subsequent verification comprises evaluating accuracy of the field in the document; and
accessing, by the one or more processors, the stored KVP data to determine if the accuracy of the field in the document, is below the pre-defined threshold.
4 . The computer-implemented method of claim 3 , wherein the collected KVP data comprises runtime KVP data.
5 . The computer-implemented method of claim 3 , wherein the monitoring is periodic at pre-defined intervals.
6 . The computer-implemented method of claim 1 , further comprising:
based on the activating, utilizing, by the one or more processors, aspects selected from the group consisting of: user-labeled fields, ontology, and a knowledge base, to generate new templates;
instantiating, by the one or more processors, the templates with information from the document to generates one or more objects; and
generating, by the one or more processors multiple KVP extractors, wherein the new KVP extractors comprise the objects, wherein the KVP extractor to target the field in the document in the new extractor is one of the KVP extractors.
7 . The computer-implemented method of claim 6 , wherein the one or more objects are selected from the group consisting of: executable code and model parameters.
8 . The computer-implemented method of claim 6 , wherein the templates comprise prompt templates.
9 . The computer-implemented method of claim 6 , wherein generating the new prompt templates comprises applying a large language model to predict one or more prompts for the field.
10 . The computer-implemented method of claim 6 , wherein dynamically generating the new extractor comprising the KVP extractor to target the field in the document, further comprises:
executing, by the one or more processors, each of the multiple KVP extractors; and
applying, by the one or more processors, a ranking model to rank results of the executing for each KVP extractor of the multiple KVP extractors to identify a best KVP extractor for the field in the document, wherein the KVP extractor us the best KVP extractors for the field in the document.
11 . The computer-implemented method of claim 10 , wherein applying the ranking model comprises:
providing, by the one or more processors, the results of the executing, via a graphical interface, to a user;
obtaining, by the one or more processors, via the graphical user interface, feedback related to ranking of the results by the ranking model; and
automatically modifying, by the one or more processors, the ranking model based on the feedback.
12 . A computer system for obtaining missing key value pair (KVP) data from a document, the computer system comprising:
a memory; and
one or more processors in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:
utilizing, by the one or more processors, an extractor, to monitor KVP data in a document;
based on the monitoring, determining, by the one or more processors, that accuracy of a field in the document, is below a pre-defined threshold; and
dynamically generating, by the one or more processors, based on the determining, a new extractor comprising a KVP extractor to target the field in the document, comprising:
based on determining that the accuracy of the field in the document is below the pre-defined threshold, activating, by the one or more processors, the dynamic generation of the new extractor, wherein the dynamically generating comprises designing the new extractor for the field for which the accuracy is below the pre-defined threshold.
13 . The system of claim 12 , the method further comprising:
monitoring, by the one or more processors, the KVP data in the document based in utilizing the new extractor.
14 . The system of claim 12 , wherein the utilizing the extractor to monitor the KVP data in the document comprises:
monitoring, by the one or more processors, existence of KVPs within the document, wherein by utilizing a model to compute deliberated selected attributes for the monitored KVPs;
collecting, by the one or more processors, the KVP data;
storing, by the one or more processors, the KVP data for subsequent verification, wherein the subsequent verification comprises evaluating accuracy of the field in the document; and
accessing, by the one or more processors, the stored KVP data to determine if the accuracy of the field in the document, is below the pre-defined threshold.
15 . The system of claim 14 , wherein the collected KVP data comprises runtime KVP data.
16 . The system of claim 14 , wherein the monitoring is periodic at pre-defined intervals.
17 . The system of claim 12 , the method further comprising:
based on the activating, utilizing, by the one or more processors, aspects selected from the group consisting of: user-labeled fields, ontology, and a knowledge base, to generate new templates;
instantiating, by the one or more processors, the templates with information from the document to generates one or more objects; and
generating, by the one or more processors multiple KVP extractors, wherein the new KVP extractors comprise the objects, wherein the KVP extractor to target the field in the document in the new extractor is one of the KVP extractors.
18 . A computer program product for obtaining missing key value pair (KVP) data from a document, the computer system comprising:
one or more computer readable storage media and program instructions collectively stored on the one or more computer readable storage media readable by at least one processing circuit to:
utilize an extractor to monitor KVP data in a document;
based on the monitoring, determine that accuracy of a field in the document, is below a pre-defined threshold; and
dynamically generate a new extractor comprising a KVP extractor to target the field in the document, comprising:
based on determining that the accuracy of the field in the document is below the pre-defined threshold, activate the dynamic generation of the new extractor, wherein the dynamically generating comprises designing the new extractor for the field for which the accuracy is below the pre-defined threshold.