Skip to content

Commit aada180

Browse files
committed
further streamlining
1 parent e1f0b92 commit aada180

File tree

12 files changed

+969
-1052
lines changed

12 files changed

+969
-1052
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
@@ -452,117 +452,6 @@ assessment:
452452
- Provide tight, accurate bounding boxes around the actual text
453453
</assessment-guidelines>
454454
455-
<spatial-localization-guidelines>
456-
For each field, provide bounding box coordinates:
457-
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
458-
- page: Page number where the field appears (starting from 1)
459-
460-
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
463-
- Use normalized scale 0-1000 for both x and y axes
464-
- x1, y1 = top-left corner of bounding box
465-
- x2, y2 = bottom-right corner of bounding box
466-
- Ensure x2 > x1 and y2 > y1
467-
- Make bounding boxes tight around the actual text content
468-
- 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
470-
</spatial-localization-guidelines>
471-
472-
<final-instructions>
473-
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:
474-
475-
For SIMPLE attributes:
476-
{
477-
"simple_attribute_name": {
478-
"confidence": 0.85,
479-
"bbox": [100, 200, 300, 250],
480-
"page": 1
481-
}
482-
}
483-
484-
For GROUP attributes (nested object structure):
485-
{
486-
"group_attribute_name": {
487-
"sub_attribute_1": {
488-
"confidence": 0.90,
489-
"bbox": [150, 300, 250, 320],
490-
"page": 1
491-
},
492-
"sub_attribute_2": {
493-
"confidence": 0.75,
494-
"bbox": [150, 325, 280, 345],
495-
"page": 1
496-
}
497-
}
498-
}
499-
500-
For LIST attributes (array of assessed items):
501-
{
502-
"list_attribute_name": [
503-
{
504-
"item_attribute_1": {
505-
"confidence": 0.95,
506-
"bbox": [100, 400, 200, 420],
507-
"page": 1
508-
},
509-
"item_attribute_2": {
510-
"confidence": 0.88,
511-
"bbox": [250, 400, 350, 420],
512-
"page": 1
513-
}
514-
},
515-
{
516-
"item_attribute_1": {
517-
"confidence": 0.92,
518-
"bbox": [100, 425, 200, 445],
519-
"page": 1
520-
},
521-
"item_attribute_2": {
522-
"confidence": 0.70,
523-
"bbox": [250, 425, 350, 445],
524-
"page": 1
525-
}
526-
}
527-
]
528-
}
529-
530-
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
534-
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
535-
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
536-
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
537-
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
538-
- Match the exact structure of the extracted data
539-
- Provide page numbers for all bounding boxes (starting from 1)
540-
</final-instructions>
541-
542-
<<CACHEPOINT>>
543-
544-
<document-image>
545-
{DOCUMENT_IMAGE}
546-
</document-image>
547-
548-
<ocr-text-confidence-results>
549-
{OCR_TEXT_CONFIDENCE}
550-
</ocr-text-confidence-results>
551-
552-
<<CACHEPOINT>>
553-
554-
<task-schema>
555-
{TASK_SCHEMA}
556-
</task-schema>
557-
558-
<task-instruction>
559-
{TASK_INSTRUCTION}
560-
</task-instruction>
561-
562-
<extraction-results>
563-
{EXTRACTION_RESULTS}
564-
</extraction-results>
565-
566455
evaluation:
567456
enabled: true
568457
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
@@ -1026,116 +1026,6 @@ assessment:
10261026
- Provide tight, accurate bounding boxes around the actual text
10271027
</assessment-guidelines>
10281028
1029-
<spatial-localization-guidelines>
1030-
For each field, provide bounding box coordinates:
1031-
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
1032-
- page: Page number where the field appears (starting from 1)
1033-
1034-
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
1037-
- Use normalized scale 0-1000 for both x and y axes
1038-
- x1, y1 = top-left corner of bounding box
1039-
- x2, y2 = bottom-right corner of bounding box
1040-
- Ensure x2 > x1 and y2 > y1
1041-
- Make bounding boxes tight around the actual text content
1042-
- 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
1044-
</spatial-localization-guidelines>
1045-
1046-
<final-instructions>
1047-
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:
1048-
1049-
For SIMPLE attributes:
1050-
{
1051-
"simple_attribute_name": {
1052-
"confidence": 0.85,
1053-
"bbox": [100, 200, 300, 250],
1054-
"page": 1
1055-
}
1056-
}
1057-
1058-
For GROUP attributes (nested object structure):
1059-
{
1060-
"group_attribute_name": {
1061-
"sub_attribute_1": {
1062-
"confidence": 0.90,
1063-
"bbox": [150, 300, 250, 320],
1064-
"page": 1
1065-
},
1066-
"sub_attribute_2": {
1067-
"confidence": 0.75,
1068-
"bbox": [150, 325, 280, 345],
1069-
"page": 1
1070-
}
1071-
}
1072-
}
1073-
1074-
For LIST attributes (array of assessed items):
1075-
{
1076-
"list_attribute_name": [
1077-
{
1078-
"item_attribute_1": {
1079-
"confidence": 0.95,
1080-
"bbox": [100, 400, 200, 420],
1081-
"page": 1
1082-
},
1083-
"item_attribute_2": {
1084-
"confidence": 0.88,
1085-
"bbox": [250, 400, 350, 420],
1086-
"page": 1
1087-
}
1088-
},
1089-
{
1090-
"item_attribute_1": {
1091-
"confidence": 0.92,
1092-
"bbox": [100, 425, 200, 445],
1093-
"page": 1
1094-
},
1095-
"item_attribute_2": {
1096-
"confidence": 0.70,
1097-
"bbox": [250, 425, 350, 445],
1098-
"page": 1
1099-
}
1100-
}
1101-
]
1102-
}
1103-
1104-
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
1108-
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
1109-
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
1110-
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
1111-
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
1112-
- Match the exact structure of the extracted data
1113-
- Provide page numbers for all bounding boxes (starting from 1)
1114-
</final-instructions>
1115-
1116-
<<CACHEPOINT>>
1117-
1118-
<document-image>
1119-
{DOCUMENT_IMAGE}
1120-
</document-image>
1121-
1122-
<ocr-text-confidence-results>
1123-
{OCR_TEXT_CONFIDENCE}
1124-
</ocr-text-confidence-results>
1125-
1126-
<<CACHEPOINT>>
1127-
1128-
<task-schema>
1129-
{TASK_SCHEMA}
1130-
</task-schema>
1131-
1132-
<task-instruction>
1133-
{TASK_INSTRUCTION}
1134-
</task-instruction>
1135-
1136-
<extraction-results>
1137-
{EXTRACTION_RESULTS}
1138-
</extraction-results>
11391029
evaluation:
11401030
enabled: true
11411031
llm_method:
@@ -1452,7 +1342,7 @@ agents:
14521342
parameters:
14531343
max_log_events: 5
14541344
time_range_hours_default: 24
1455-
1345+
14561346
chat_companion:
14571347
model_id: us.anthropic.claude-haiku-4-5-20251001-v1:0
14581348
pricing:

0 commit comments

Comments
 (0)