Skip to content

Commit 2bec34e

Browse files
committed
new assesment
1 parent b402582 commit 2bec34e

File tree

24 files changed

+2744
-2835
lines changed

24 files changed

+2744
-2835
lines changed

config_library/pattern-2/bank-statement-sample/config.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,7 @@ assessment:
404404
image:
405405
target_height: ""
406406
target_width: ""
407-
granular:
408-
enabled: true
409-
max_workers: "20"
410-
simple_batch_size: "3"
411-
list_batch_size: "1"
407+
max_workers: "20"
412408
default_confidence_threshold: "0.8"
413409
top_p: "0.1"
414410
max_tokens: "10000"
@@ -461,12 +457,15 @@ assessment:
461457
- page: Page number where the field appears (starting from 1)
462458
463459
Coordinate system:
460+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
461+
- Use these ruler markings to determine precise coordinates for bounding boxes
464462
- Use normalized scale 0-1000 for both x and y axes
465463
- x1, y1 = top-left corner of bounding box
466464
- x2, y2 = bottom-right corner of bounding box
467465
- Ensure x2 > x1 and y2 > y1
468466
- Make bounding boxes tight around the actual text content
469467
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
468+
- Reference the ruler markings on the image edges to provide accurate coordinates
470469
</spatial-localization-guidelines>
471470
472471
<final-instructions>
@@ -528,6 +527,9 @@ assessment:
528527
}
529528
530529
IMPORTANT:
530+
- The <task-schema> contains raw JSON schema for the attributes you should assess
531+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
532+
- The <task-instruction> specifies which attributes to focus on
531533
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
532534
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
533535
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -548,9 +550,13 @@ assessment:
548550
549551
<<CACHEPOINT>>
550552
551-
<attributes-definitions>
552-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
553-
</attributes-definitions>
553+
<task-schema>
554+
{TASK_SCHEMA}
555+
</task-schema>
556+
557+
<task-instruction>
558+
{TASK_INSTRUCTION}
559+
</task-instruction>
554560
555561
<extraction-results>
556562
{EXTRACTION_RESULTS}

config_library/pattern-2/lending-package-sample/config.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ocr:
1010
- name: LAYOUT
1111
- name: TABLES
1212
- name: SIGNATURES
13+
max_workers: "20"
1314
image:
1415
target_width: ""
1516
target_height: ""
@@ -1188,6 +1189,7 @@ classes:
11881189
classification:
11891190
classificationMethod: multimodalPageLevelClassification
11901191
maxPagesForClassification: "ALL"
1192+
max_workers: "20"
11911193
image:
11921194
target_height: ""
11931195
target_width: ""
@@ -1252,6 +1254,7 @@ extraction:
12521254
agentic:
12531255
enabled: false
12541256
review_agent: false
1257+
max_workers: "20"
12551258
image:
12561259
target_width: ""
12571260
target_height: ""
@@ -1425,14 +1428,10 @@ summarization:
14251428
assessment:
14261429
enabled: true
14271430
validation_enabled: false
1431+
max_workers: "20"
14281432
image:
14291433
target_height: ""
14301434
target_width: ""
1431-
granular:
1432-
enabled: true
1433-
max_workers: "20"
1434-
simple_batch_size: "3"
1435-
list_batch_size: "1"
14361435
default_confidence_threshold: "0.8"
14371436
top_p: "0.1"
14381437
max_tokens: "10000"
@@ -1485,12 +1484,15 @@ assessment:
14851484
- page: Page number where the field appears (starting from 1)
14861485
14871486
Coordinate system:
1487+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
1488+
- Use these ruler markings to determine precise coordinates for bounding boxes
14881489
- Use normalized scale 0-1000 for both x and y axes
14891490
- x1, y1 = top-left corner of bounding box
14901491
- x2, y2 = bottom-right corner of bounding box
14911492
- Ensure x2 > x1 and y2 > y1
14921493
- Make bounding boxes tight around the actual text content
14931494
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
1495+
- Reference the ruler markings on the image edges to provide accurate coordinates
14941496
</spatial-localization-guidelines>
14951497
14961498
<final-instructions>
@@ -1552,6 +1554,9 @@ assessment:
15521554
}
15531555
15541556
IMPORTANT:
1557+
- The <task-schema> contains raw JSON schema for the attributes you should assess
1558+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
1559+
- The <task-instruction> specifies which attributes to focus on
15551560
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
15561561
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
15571562
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1572,9 +1577,13 @@ assessment:
15721577
15731578
<<CACHEPOINT>>
15741579
1575-
<attributes-definitions>
1576-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1577-
</attributes-definitions>
1580+
<task-schema>
1581+
{TASK_SCHEMA}
1582+
</task-schema>
1583+
1584+
<task-instruction>
1585+
{TASK_INSTRUCTION}
1586+
</task-instruction>
15781587
15791588
<extraction-results>
15801589
{EXTRACTION_RESULTS}

config_library/pattern-2/rvl-cdip-package-sample-with-few-shot-examples/config.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ocr:
1111
- name: LAYOUT
1212
- name: TABLES
1313
- name: SIGNATURES
14+
max_workers: "20"
1415
image:
1516
dpi: "150"
1617
target_width: ""
@@ -809,6 +810,7 @@ classes:
809810
810811
classification:
811812
maxPagesForClassification: "ALL"
813+
max_workers: "20"
812814
image:
813815
target_height: ""
814816
target_width: ""
@@ -863,6 +865,7 @@ classification:
863865
5. Outputting in the exact JSON format specified in <output-format>
864866
</final-instructions>
865867
extraction:
868+
max_workers: "20"
866869
image:
867870
target_height: ""
868871
target_width: ""
@@ -963,14 +966,10 @@ extraction:
963966
assessment:
964967
enabled: true
965968
validation_enabled: false
969+
max_workers: "20"
966970
image:
967971
target_height: ""
968972
target_width: ""
969-
granular:
970-
enabled: true
971-
max_workers: "20"
972-
simple_batch_size: "3"
973-
list_batch_size: "1"
974973
default_confidence_threshold: "0.8"
975974
top_p: "0.1"
976975
max_tokens: "10000"
@@ -1023,12 +1022,15 @@ assessment:
10231022
- page: Page number where the field appears (starting from 1)
10241023
10251024
Coordinate system:
1025+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
1026+
- Use these ruler markings to determine precise coordinates for bounding boxes
10261027
- Use normalized scale 0-1000 for both x and y axes
10271028
- x1, y1 = top-left corner of bounding box
10281029
- x2, y2 = bottom-right corner of bounding box
10291030
- Ensure x2 > x1 and y2 > y1
10301031
- Make bounding boxes tight around the actual text content
10311032
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
1033+
- Reference the ruler markings on the image edges to provide accurate coordinates
10321034
</spatial-localization-guidelines>
10331035
10341036
<final-instructions>
@@ -1090,6 +1092,9 @@ assessment:
10901092
}
10911093
10921094
IMPORTANT:
1095+
- The <task-schema> contains raw JSON schema for the attributes you should assess
1096+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
1097+
- The <task-instruction> specifies which attributes to focus on
10931098
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
10941099
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
10951100
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1110,9 +1115,13 @@ assessment:
11101115
11111116
<<CACHEPOINT>>
11121117
1113-
<attributes-definitions>
1114-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1115-
</attributes-definitions>
1118+
<task-schema>
1119+
{TASK_SCHEMA}
1120+
</task-schema>
1121+
1122+
<task-instruction>
1123+
{TASK_INSTRUCTION}
1124+
</task-instruction>
11161125
11171126
<extraction-results>
11181127
{EXTRACTION_RESULTS}

config_library/pattern-2/rvl-cdip-package-sample/config.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ocr:
1010
- name: LAYOUT
1111
- name: TABLES
1212
- name: SIGNATURES
13+
max_workers: "20"
1314
image:
1415
dpi: "150"
1516
target_width: ""
@@ -764,6 +765,7 @@ classes:
764765
labeled 'notes', 'remarks', or 'comments'.
765766
classification:
766767
maxPagesForClassification: "ALL"
768+
max_workers: "20"
767769
image:
768770
target_height: ""
769771
target_width: ""
@@ -906,6 +908,7 @@ classification:
906908
You are a document classification expert who can analyze and classify multiple documents and their page boundaries within a document package from various domains. Your task is to determine the document type based on its content and structure, using the provided document type definitions. Your output must be valid JSON according to the requested format.
907909
classificationMethod: textbasedHolisticClassification
908910
extraction:
911+
max_workers: "20"
909912
image:
910913
target_width: ""
911914
target_height: ""
@@ -1067,14 +1070,10 @@ summarization:
10671070
assessment:
10681071
enabled: true
10691072
validation_enabled: false
1073+
max_workers: "20"
10701074
image:
10711075
target_height: ""
10721076
target_width: ""
1073-
granular:
1074-
enabled: true
1075-
max_workers: "20"
1076-
simple_batch_size: "3"
1077-
list_batch_size: "1"
10781077
default_confidence_threshold: "0.8"
10791078
top_p: "0.1"
10801079
max_tokens: "10000"
@@ -1127,12 +1126,15 @@ assessment:
11271126
- page: Page number where the field appears (starting from 1)
11281127
11291128
Coordinate system:
1129+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
1130+
- Use these ruler markings to determine precise coordinates for bounding boxes
11301131
- Use normalized scale 0-1000 for both x and y axes
11311132
- x1, y1 = top-left corner of bounding box
11321133
- x2, y2 = bottom-right corner of bounding box
11331134
- Ensure x2 > x1 and y2 > y1
11341135
- Make bounding boxes tight around the actual text content
11351136
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
1137+
- Reference the ruler markings on the image edges to provide accurate coordinates
11361138
</spatial-localization-guidelines>
11371139
11381140
<final-instructions>
@@ -1194,6 +1196,9 @@ assessment:
11941196
}
11951197
11961198
IMPORTANT:
1199+
- The <task-schema> contains raw JSON schema for the attributes you should assess
1200+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
1201+
- The <task-instruction> specifies which attributes to focus on
11971202
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
11981203
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
11991204
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1214,9 +1219,13 @@ assessment:
12141219
12151220
<<CACHEPOINT>>
12161221
1217-
<attributes-definitions>
1218-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1219-
</attributes-definitions>
1222+
<task-schema>
1223+
{TASK_SCHEMA}
1224+
</task-schema>
1225+
1226+
<task-instruction>
1227+
{TASK_INSTRUCTION}
1228+
</task-instruction>
12201229
12211230
<extraction-results>
12221231
{EXTRACTION_RESULTS}

config_library/pattern-3/rvl-cdip-package-sample/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ocr:
1111
- name: LAYOUT
1212
- name: TABLES
1313
- name: SIGNATURES
14+
max_workers: "20"
1415
image:
1516
dpi: "150"
1617
target_width: ""
@@ -766,6 +767,7 @@ classes:
766767
classification:
767768
model: Custom fine tuned UDOP model
768769
extraction:
770+
max_workers: "20"
769771
image:
770772
target_width: ""
771773
target_height: ""
@@ -926,6 +928,7 @@ summarization:
926928
You are a document summarization expert who can analyze and summarize documents from various domains including medical, financial, legal, and general business documents. Your task is to create a summary that captures the key information, main points, and important details from the document. Your output must be in valid JSON format. \nSummarization Style: Balanced\\nCreate a balanced summary that provides a moderate level of detail. Include the main points and key supporting information, while maintaining the document's overall structure. Aim for a comprehensive yet concise summary.\n Your output MUST be in valid JSON format with markdown content. You MUST strictly adhere to the output format specified in the instructions.
927929
assessment:
928930
enabled: true
931+
max_workers: "20"
929932
image:
930933
target_height: ""
931934
target_width: ""

idp_cli/pyproject.toml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,28 @@ build-backend = "setuptools.build_meta"
99
name = "idp-cli"
1010
version = "0.4.5"
1111
description = "Command-line interface for IDP Accelerator batch document processing"
12-
authors = [{name = "AWS"}]
13-
license = {text = "MIT-0"}
14-
requires-python = ">=3.10"
12+
authors = [{ name = "AWS" }]
13+
license = { text = "MIT-0" }
14+
requires-python = ">=3.12"
1515
classifiers = [
16-
"Development Status :: 4 - Beta",
17-
"Intended Audience :: Developers",
18-
"License :: OSI Approved :: MIT License",
19-
"Programming Language :: Python :: 3",
20-
"Programming Language :: Python :: 3.10",
21-
"Programming Language :: Python :: 3.11",
22-
"Programming Language :: Python :: 3.12",
23-
"Programming Language :: Python :: 3.13",
16+
"Development Status :: 4 - Beta",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: MIT License",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2424
]
2525
dependencies = [
26-
"click>=8.1.0",
27-
"rich>=13.0.0",
28-
"boto3>=1.28.0",
29-
"botocore>=1.31.0",
26+
"click>=8.1.0",
27+
"rich>=13.0.0",
28+
"boto3>=1.28.0",
29+
"botocore>=1.31.0",
3030
]
3131

3232
[project.optional-dependencies]
33-
test = [
34-
"pytest>=7.4.0",
35-
"pytest-mock>=3.11.0",
36-
"moto>=4.2.0",
37-
]
33+
test = ["pytest>=7.4.0", "pytest-mock>=3.11.0", "moto>=4.2.0"]
3834

3935
[project.scripts]
4036
idp-cli = "idp_cli.cli:main"

0 commit comments

Comments
 (0)