Skip to content

Commit ba50772

Browse files
committed
further streamlining
1 parent bb335e3 commit ba50772

File tree

12 files changed

+969
-1165
lines changed

12 files changed

+969
-1165
lines changed

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

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -451,117 +451,6 @@ assessment:
451451
- Provide tight, accurate bounding boxes around the actual text
452452
</assessment-guidelines>
453453
454-
<spatial-localization-guidelines>
455-
For each field, provide bounding box coordinates:
456-
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
457-
- page: Page number where the field appears (starting from 1)
458-
459-
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
462-
- Use normalized scale 0-1000 for both x and y axes
463-
- x1, y1 = top-left corner of bounding box
464-
- x2, y2 = bottom-right corner of bounding box
465-
- Ensure x2 > x1 and y2 > y1
466-
- Make bounding boxes tight around the actual text content
467-
- 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
469-
</spatial-localization-guidelines>
470-
471-
<final-instructions>
472-
Analyze the extraction results against the source document and provide confidence assessments with spatial localization. Return a JSON object with the following structure based on the attribute type:
473-
474-
For SIMPLE attributes:
475-
{
476-
"simple_attribute_name": {
477-
"confidence": 0.85,
478-
"bbox": [100, 200, 300, 250],
479-
"page": 1
480-
}
481-
}
482-
483-
For GROUP attributes (nested object structure):
484-
{
485-
"group_attribute_name": {
486-
"sub_attribute_1": {
487-
"confidence": 0.90,
488-
"bbox": [150, 300, 250, 320],
489-
"page": 1
490-
},
491-
"sub_attribute_2": {
492-
"confidence": 0.75,
493-
"bbox": [150, 325, 280, 345],
494-
"page": 1
495-
}
496-
}
497-
}
498-
499-
For LIST attributes (array of assessed items):
500-
{
501-
"list_attribute_name": [
502-
{
503-
"item_attribute_1": {
504-
"confidence": 0.95,
505-
"bbox": [100, 400, 200, 420],
506-
"page": 1
507-
},
508-
"item_attribute_2": {
509-
"confidence": 0.88,
510-
"bbox": [250, 400, 350, 420],
511-
"page": 1
512-
}
513-
},
514-
{
515-
"item_attribute_1": {
516-
"confidence": 0.92,
517-
"bbox": [100, 425, 200, 445],
518-
"page": 1
519-
},
520-
"item_attribute_2": {
521-
"confidence": 0.70,
522-
"bbox": [250, 425, 350, 445],
523-
"page": 1
524-
}
525-
}
526-
]
527-
}
528-
529-
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
533-
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
534-
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
535-
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
536-
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
537-
- Match the exact structure of the extracted data
538-
- Provide page numbers for all bounding boxes (starting from 1)
539-
</final-instructions>
540-
541-
<<CACHEPOINT>>
542-
543-
<document-image>
544-
{DOCUMENT_IMAGE}
545-
</document-image>
546-
547-
<ocr-text-confidence-results>
548-
{OCR_TEXT_CONFIDENCE}
549-
</ocr-text-confidence-results>
550-
551-
<<CACHEPOINT>>
552-
553-
<task-schema>
554-
{TASK_SCHEMA}
555-
</task-schema>
556-
557-
<task-instruction>
558-
{TASK_INSTRUCTION}
559-
</task-instruction>
560-
561-
<extraction-results>
562-
{EXTRACTION_RESULTS}
563-
</extraction-results>
564-
565454
evaluation:
566455
enabled: true
567456
llm_method:

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

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,116 +1478,6 @@ assessment:
14781478
- Provide tight, accurate bounding boxes around the actual text
14791479
</assessment-guidelines>
14801480
1481-
<spatial-localization-guidelines>
1482-
For each field, provide bounding box coordinates:
1483-
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
1484-
- page: Page number where the field appears (starting from 1)
1485-
1486-
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
1489-
- Use normalized scale 0-1000 for both x and y axes
1490-
- x1, y1 = top-left corner of bounding box
1491-
- x2, y2 = bottom-right corner of bounding box
1492-
- Ensure x2 > x1 and y2 > y1
1493-
- Make bounding boxes tight around the actual text content
1494-
- 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
1496-
</spatial-localization-guidelines>
1497-
1498-
<final-instructions>
1499-
Analyze the extraction results against the source document and provide confidence assessments with spatial localization. Return a JSON object with the following structure based on the attribute type:
1500-
1501-
For SIMPLE attributes:
1502-
{
1503-
"simple_attribute_name": {
1504-
"confidence": 0.85,
1505-
"bbox": [100, 200, 300, 250],
1506-
"page": 1
1507-
}
1508-
}
1509-
1510-
For GROUP attributes (nested object structure):
1511-
{
1512-
"group_attribute_name": {
1513-
"sub_attribute_1": {
1514-
"confidence": 0.90,
1515-
"bbox": [150, 300, 250, 320],
1516-
"page": 1
1517-
},
1518-
"sub_attribute_2": {
1519-
"confidence": 0.75,
1520-
"bbox": [150, 325, 280, 345],
1521-
"page": 1
1522-
}
1523-
}
1524-
}
1525-
1526-
For LIST attributes (array of assessed items):
1527-
{
1528-
"list_attribute_name": [
1529-
{
1530-
"item_attribute_1": {
1531-
"confidence": 0.95,
1532-
"bbox": [100, 400, 200, 420],
1533-
"page": 1
1534-
},
1535-
"item_attribute_2": {
1536-
"confidence": 0.88,
1537-
"bbox": [250, 400, 350, 420],
1538-
"page": 1
1539-
}
1540-
},
1541-
{
1542-
"item_attribute_1": {
1543-
"confidence": 0.92,
1544-
"bbox": [100, 425, 200, 445],
1545-
"page": 1
1546-
},
1547-
"item_attribute_2": {
1548-
"confidence": 0.70,
1549-
"bbox": [250, 425, 350, 445],
1550-
"page": 1
1551-
}
1552-
}
1553-
]
1554-
}
1555-
1556-
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
1560-
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
1561-
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
1562-
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
1563-
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
1564-
- Match the exact structure of the extracted data
1565-
- Provide page numbers for all bounding boxes (starting from 1)
1566-
</final-instructions>
1567-
1568-
<<CACHEPOINT>>
1569-
1570-
<document-image>
1571-
{DOCUMENT_IMAGE}
1572-
</document-image>
1573-
1574-
<ocr-text-confidence-results>
1575-
{OCR_TEXT_CONFIDENCE}
1576-
</ocr-text-confidence-results>
1577-
1578-
<<CACHEPOINT>>
1579-
1580-
<task-schema>
1581-
{TASK_SCHEMA}
1582-
</task-schema>
1583-
1584-
<task-instruction>
1585-
{TASK_INSTRUCTION}
1586-
</task-instruction>
1587-
1588-
<extraction-results>
1589-
{EXTRACTION_RESULTS}
1590-
</extraction-results>
15911481
evaluation:
15921482
enabled: true
15931483
llm_method:

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

Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,116 +1016,6 @@ assessment:
10161016
- Provide tight, accurate bounding boxes around the actual text
10171017
</assessment-guidelines>
10181018
1019-
<spatial-localization-guidelines>
1020-
For each field, provide bounding box coordinates:
1021-
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
1022-
- page: Page number where the field appears (starting from 1)
1023-
1024-
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
1027-
- Use normalized scale 0-1000 for both x and y axes
1028-
- x1, y1 = top-left corner of bounding box
1029-
- x2, y2 = bottom-right corner of bounding box
1030-
- Ensure x2 > x1 and y2 > y1
1031-
- Make bounding boxes tight around the actual text content
1032-
- 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
1034-
</spatial-localization-guidelines>
1035-
1036-
<final-instructions>
1037-
Analyze the extraction results against the source document and provide confidence assessments with spatial localization. Return a JSON object with the following structure based on the attribute type:
1038-
1039-
For SIMPLE attributes:
1040-
{
1041-
"simple_attribute_name": {
1042-
"confidence": 0.85,
1043-
"bbox": [100, 200, 300, 250],
1044-
"page": 1
1045-
}
1046-
}
1047-
1048-
For GROUP attributes (nested object structure):
1049-
{
1050-
"group_attribute_name": {
1051-
"sub_attribute_1": {
1052-
"confidence": 0.90,
1053-
"bbox": [150, 300, 250, 320],
1054-
"page": 1
1055-
},
1056-
"sub_attribute_2": {
1057-
"confidence": 0.75,
1058-
"bbox": [150, 325, 280, 345],
1059-
"page": 1
1060-
}
1061-
}
1062-
}
1063-
1064-
For LIST attributes (array of assessed items):
1065-
{
1066-
"list_attribute_name": [
1067-
{
1068-
"item_attribute_1": {
1069-
"confidence": 0.95,
1070-
"bbox": [100, 400, 200, 420],
1071-
"page": 1
1072-
},
1073-
"item_attribute_2": {
1074-
"confidence": 0.88,
1075-
"bbox": [250, 400, 350, 420],
1076-
"page": 1
1077-
}
1078-
},
1079-
{
1080-
"item_attribute_1": {
1081-
"confidence": 0.92,
1082-
"bbox": [100, 425, 200, 445],
1083-
"page": 1
1084-
},
1085-
"item_attribute_2": {
1086-
"confidence": 0.70,
1087-
"bbox": [250, 425, 350, 445],
1088-
"page": 1
1089-
}
1090-
}
1091-
]
1092-
}
1093-
1094-
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
1098-
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
1099-
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
1100-
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
1101-
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
1102-
- Match the exact structure of the extracted data
1103-
- Provide page numbers for all bounding boxes (starting from 1)
1104-
</final-instructions>
1105-
1106-
<<CACHEPOINT>>
1107-
1108-
<document-image>
1109-
{DOCUMENT_IMAGE}
1110-
</document-image>
1111-
1112-
<ocr-text-confidence-results>
1113-
{OCR_TEXT_CONFIDENCE}
1114-
</ocr-text-confidence-results>
1115-
1116-
<<CACHEPOINT>>
1117-
1118-
<task-schema>
1119-
{TASK_SCHEMA}
1120-
</task-schema>
1121-
1122-
<task-instruction>
1123-
{TASK_INSTRUCTION}
1124-
</task-instruction>
1125-
1126-
<extraction-results>
1127-
{EXTRACTION_RESULTS}
1128-
</extraction-results>
11291019
evaluation:
11301020
enabled: true
11311021
llm_method:
@@ -1442,7 +1332,7 @@ agents:
14421332
parameters:
14431333
max_log_events: 5
14441334
time_range_hours_default: 24
1445-
1335+
14461336
chat_companion:
14471337
model_id: us.anthropic.claude-sonnet-4-20250514-v1:0
14481338
pricing:

0 commit comments

Comments
 (0)