You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Output format is configuration via View/Edit configuration. JSON format should follow custom classes format.
1238
1238
- Output in any other format will result in failure.
1239
+
**Production Usage**
1240
+
- We recommend not to use the Discovery module in production. This is to reduce the risk of any hallunication during the document discovery.
1241
+
- We recommend to use discovery module in your lower environment to discovery and construct the configurations. Export the tested configuration to production deployment.
1239
1242
1240
1243
1241
1244
The Discovery module provides a powerful foundation for understanding and processing new document types. By following these guidelines and best practices, you can effectively leverage the module to bootstrap document processing workflows and continuously improve their accuracy and coverage.
"system_prompt": "You are an expert in processing forms. Extracting data from images and documents. Analyze forms line by line to identify field names, data types, and organizational structure. Focus on creating comprehensive blueprints for document processing without extracting actual values.",
59
-
"user_prompt": """This image contains forms data. Analyze the form line by line.
60
-
Image may contains multiple pages, process all the pages.
61
-
Form may contain multiple name value pair in one line.
62
-
Extract all the names in the form including the name value pair which doesn't have value.
63
-
Organize them into groups, extract field_name, data_type and field description.
64
-
Field_name should be less than 60 characters, should not have space use '-' instead of space.
65
-
field_description is a brief description of the field and the location of the field like box number or line number in the form and section of the form.
66
-
Field_name should be unique within the group.
67
-
Add two fields document_class and document_description.
68
-
For document_class generate a short name based on the document content like W4, I-9, Paystub.
69
-
For document_description generate a description about the document in less than 50 words.
70
-
Group the fields based on the section they are grouped in the form. Group should have attributeType as "group".
71
-
If the group repeats and follows table format, update the attributeType as "list".
"system_prompt": "You are an expert in processing forms. Extracting data from images and documents. Use provided ground truth data as reference to optimize field extraction and ensure consistency with expected document structure and field definitions.",
81
-
"user_prompt": """This image contains unstructured data. Analyze the data line by line using the provided ground truth as reference.
82
-
<GROUND_TRUTH_REFERENCE>
83
-
{ground_truth_json}
84
-
</GROUND_TRUTH_REFERENCE>
85
-
Ground truth reference JSON has the fields we are interested in extracting from the document/image. Use the ground truth to optimize field extraction. Match field names, data types, and groupings from the reference.
86
-
Image may contain multiple pages, process all pages.
87
-
Extract all field names including those without values.
88
-
Do not change the group name and field name from ground truth in the extracted data json.
89
-
Add field_description field for every field which will contain instruction to LLM to extract the field data from the image/document. Add data_type field for every field.
90
-
Add two fields document_class and document_description.
91
-
For document_class generate a short name based on the document content like W4, I-9, Paystub.
92
-
For document_description generate a description about the document in less than 50 words.
93
-
If the group repeats and follows table format, update the attributeType as "list".
94
-
Do not extract the values.""",
95
-
},
96
-
"output_format": {
97
-
"sample_json": """{
98
-
"document_class" : "Form-1040",
99
-
"document_description" : "Brief summary of the document",
100
-
"groups" : [
101
-
{
102
-
"name" : "PersonalInformation",
103
-
"description" : "Personal information of Tax payer",
0 commit comments