Skip to content

Commit 049c4fe

Browse files
committed
new assesment
1 parent cbedb14 commit 049c4fe

File tree

24 files changed

+2743
-2833
lines changed

24 files changed

+2743
-2833
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
@@ -405,11 +405,7 @@ assessment:
405405
image:
406406
target_height: ""
407407
target_width: ""
408-
granular:
409-
enabled: true
410-
max_workers: "20"
411-
simple_batch_size: "3"
412-
list_batch_size: "1"
408+
max_workers: "20"
413409
default_confidence_threshold: "0.8"
414410
top_p: "0.0"
415411
max_tokens: "10000"
@@ -462,12 +458,15 @@ assessment:
462458
- page: Page number where the field appears (starting from 1)
463459
464460
Coordinate system:
461+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
462+
- Use these ruler markings to determine precise coordinates for bounding boxes
465463
- Use normalized scale 0-1000 for both x and y axes
466464
- x1, y1 = top-left corner of bounding box
467465
- x2, y2 = bottom-right corner of bounding box
468466
- Ensure x2 > x1 and y2 > y1
469467
- Make bounding boxes tight around the actual text content
470468
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
469+
- Reference the ruler markings on the image edges to provide accurate coordinates
471470
</spatial-localization-guidelines>
472471
473472
<final-instructions>
@@ -529,6 +528,9 @@ assessment:
529528
}
530529
531530
IMPORTANT:
531+
- The <task-schema> contains raw JSON schema for the attributes you should assess
532+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
533+
- The <task-instruction> specifies which attributes to focus on
532534
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
533535
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
534536
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -549,9 +551,13 @@ assessment:
549551
550552
<<CACHEPOINT>>
551553
552-
<attributes-definitions>
553-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
554-
</attributes-definitions>
554+
<task-schema>
555+
{TASK_SCHEMA}
556+
</task-schema>
557+
558+
<task-instruction>
559+
{TASK_INSTRUCTION}
560+
</task-instruction>
555561
556562
<extraction-results>
557563
{EXTRACTION_RESULTS}

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

Lines changed: 16 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: ""
@@ -1253,6 +1254,7 @@ extraction:
12531254
agentic:
12541255
enabled: false
12551256
review_agent: false
1257+
max_workers: "20"
12561258
image:
12571259
target_width: ""
12581260
target_height: ""
@@ -1426,14 +1428,10 @@ summarization:
14261428
assessment:
14271429
enabled: true
14281430
validation_enabled: false
1431+
max_workers: "20"
14291432
image:
14301433
target_height: ""
14311434
target_width: ""
1432-
granular:
1433-
enabled: true
1434-
max_workers: "20"
1435-
simple_batch_size: "3"
1436-
list_batch_size: "1"
14371435
default_confidence_threshold: "0.8"
14381436
top_p: "0.0"
14391437
max_tokens: "10000"
@@ -1486,12 +1484,15 @@ assessment:
14861484
- page: Page number where the field appears (starting from 1)
14871485
14881486
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
14891489
- Use normalized scale 0-1000 for both x and y axes
14901490
- x1, y1 = top-left corner of bounding box
14911491
- x2, y2 = bottom-right corner of bounding box
14921492
- Ensure x2 > x1 and y2 > y1
14931493
- Make bounding boxes tight around the actual text content
14941494
- 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
14951496
</spatial-localization-guidelines>
14961497
14971498
<final-instructions>
@@ -1553,6 +1554,9 @@ assessment:
15531554
}
15541555
15551556
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
15561560
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
15571561
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
15581562
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1573,9 +1577,13 @@ assessment:
15731577
15741578
<<CACHEPOINT>>
15751579
1576-
<attributes-definitions>
1577-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1578-
</attributes-definitions>
1580+
<task-schema>
1581+
{TASK_SCHEMA}
1582+
</task-schema>
1583+
1584+
<task-instruction>
1585+
{TASK_INSTRUCTION}
1586+
</task-instruction>
15791587
15801588
<extraction-results>
15811589
{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: ""
@@ -868,6 +870,7 @@ classification:
868870
5. Outputting in the exact JSON format specified in <output-format>
869871
</final-instructions>
870872
extraction:
873+
max_workers: "20"
871874
image:
872875
target_height: ""
873876
target_width: ""
@@ -973,14 +976,10 @@ extraction:
973976
assessment:
974977
enabled: true
975978
validation_enabled: false
979+
max_workers: "20"
976980
image:
977981
target_height: ""
978982
target_width: ""
979-
granular:
980-
enabled: true
981-
max_workers: "20"
982-
simple_batch_size: "3"
983-
list_batch_size: "1"
984983
default_confidence_threshold: "0.8"
985984
top_p: "0.0"
986985
max_tokens: "10000"
@@ -1033,12 +1032,15 @@ assessment:
10331032
- page: Page number where the field appears (starting from 1)
10341033
10351034
Coordinate system:
1035+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
1036+
- Use these ruler markings to determine precise coordinates for bounding boxes
10361037
- Use normalized scale 0-1000 for both x and y axes
10371038
- x1, y1 = top-left corner of bounding box
10381039
- x2, y2 = bottom-right corner of bounding box
10391040
- Ensure x2 > x1 and y2 > y1
10401041
- Make bounding boxes tight around the actual text content
10411042
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
1043+
- Reference the ruler markings on the image edges to provide accurate coordinates
10421044
</spatial-localization-guidelines>
10431045
10441046
<final-instructions>
@@ -1100,6 +1102,9 @@ assessment:
11001102
}
11011103
11021104
IMPORTANT:
1105+
- The <task-schema> contains raw JSON schema for the attributes you should assess
1106+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
1107+
- The <task-instruction> specifies which attributes to focus on
11031108
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
11041109
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
11051110
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1120,9 +1125,13 @@ assessment:
11201125
11211126
<<CACHEPOINT>>
11221127
1123-
<attributes-definitions>
1124-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1125-
</attributes-definitions>
1128+
<task-schema>
1129+
{TASK_SCHEMA}
1130+
</task-schema>
1131+
1132+
<task-instruction>
1133+
{TASK_INSTRUCTION}
1134+
</task-instruction>
11261135
11271136
<extraction-results>
11281137
{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: ""
@@ -907,6 +909,7 @@ classification:
907909
classificationMethod: textbasedHolisticClassification
908910
sectionSplitting: llm_determined
909911
extraction:
912+
max_workers: "20"
910913
image:
911914
target_width: ""
912915
target_height: ""
@@ -1068,14 +1071,10 @@ summarization:
10681071
assessment:
10691072
enabled: true
10701073
validation_enabled: false
1074+
max_workers: "20"
10711075
image:
10721076
target_height: ""
10731077
target_width: ""
1074-
granular:
1075-
enabled: true
1076-
max_workers: "20"
1077-
simple_batch_size: "3"
1078-
list_batch_size: "1"
10791078
default_confidence_threshold: "0.8"
10801079
top_p: "0.0"
10811080
max_tokens: "10000"
@@ -1128,12 +1127,15 @@ assessment:
11281127
- page: Page number where the field appears (starting from 1)
11291128
11301129
Coordinate system:
1130+
- The document images have ruler markings along all edges showing the 0-1000 coordinate scale
1131+
- Use these ruler markings to determine precise coordinates for bounding boxes
11311132
- Use normalized scale 0-1000 for both x and y axes
11321133
- x1, y1 = top-left corner of bounding box
11331134
- x2, y2 = bottom-right corner of bounding box
11341135
- Ensure x2 > x1 and y2 > y1
11351136
- Make bounding boxes tight around the actual text content
11361137
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
1138+
- Reference the ruler markings on the image edges to provide accurate coordinates
11371139
</spatial-localization-guidelines>
11381140
11391141
<final-instructions>
@@ -1195,6 +1197,9 @@ assessment:
11951197
}
11961198
11971199
IMPORTANT:
1200+
- The <task-schema> contains raw JSON schema for the attributes you should assess
1201+
- The <extraction-results> contains the FULL extraction data (you have complete context for cross-referencing)
1202+
- The <task-instruction> specifies which attributes to focus on
11981203
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
11991204
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
12001205
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
@@ -1215,9 +1220,13 @@ assessment:
12151220
12161221
<<CACHEPOINT>>
12171222
1218-
<attributes-definitions>
1219-
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
1220-
</attributes-definitions>
1223+
<task-schema>
1224+
{TASK_SCHEMA}
1225+
</task-schema>
1226+
1227+
<task-instruction>
1228+
{TASK_INSTRUCTION}
1229+
</task-instruction>
12211230
12221231
<extraction-results>
12231232
{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)