Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/developer-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install Node.js and basedpyright
run: |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
npm install -g basedpyright
Expand Down
107 changes: 1 addition & 106 deletions config_library/pattern-2/bank-statement-sample/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,7 @@ assessment:
image:
target_height: ""
target_width: ""
granular:
enabled: true
max_workers: "20"
simple_batch_size: "3"
list_batch_size: "1"
max_workers: "20"
default_confidence_threshold: "0.8"
top_p: "0.1"
max_tokens: "10000"
Expand Down Expand Up @@ -455,107 +451,6 @@ assessment:
- Provide tight, accurate bounding boxes around the actual text
</assessment-guidelines>

<spatial-localization-guidelines>
For each field, provide bounding box coordinates:
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
- page: Page number where the field appears (starting from 1)

Coordinate system:
- Use normalized scale 0-1000 for both x and y axes
- x1, y1 = top-left corner of bounding box
- x2, y2 = bottom-right corner of bounding box
- Ensure x2 > x1 and y2 > y1
- Make bounding boxes tight around the actual text content
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
</spatial-localization-guidelines>

<final-instructions>
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:

For SIMPLE attributes:
{
"simple_attribute_name": {
"confidence": 0.85,
"bbox": [100, 200, 300, 250],
"page": 1
}
}

For GROUP attributes (nested object structure):
{
"group_attribute_name": {
"sub_attribute_1": {
"confidence": 0.90,
"bbox": [150, 300, 250, 320],
"page": 1
},
"sub_attribute_2": {
"confidence": 0.75,
"bbox": [150, 325, 280, 345],
"page": 1
}
}
}

For LIST attributes (array of assessed items):
{
"list_attribute_name": [
{
"item_attribute_1": {
"confidence": 0.95,
"bbox": [100, 400, 200, 420],
"page": 1
},
"item_attribute_2": {
"confidence": 0.88,
"bbox": [250, 400, 350, 420],
"page": 1
}
},
{
"item_attribute_1": {
"confidence": 0.92,
"bbox": [100, 425, 200, 445],
"page": 1
},
"item_attribute_2": {
"confidence": 0.70,
"bbox": [250, 425, 350, 445],
"page": 1
}
}
]
}

IMPORTANT:
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
- Match the exact structure of the extracted data
- Provide page numbers for all bounding boxes (starting from 1)
</final-instructions>

<<CACHEPOINT>>

<document-image>
{DOCUMENT_IMAGE}
</document-image>

<ocr-text-confidence-results>
{OCR_TEXT_CONFIDENCE}
</ocr-text-confidence-results>

<<CACHEPOINT>>

<attributes-definitions>
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
</attributes-definitions>

<extraction-results>
{EXTRACTION_RESULTS}
</extraction-results>

evaluation:
enabled: true
llm_method:
Expand Down
111 changes: 5 additions & 106 deletions config_library/pattern-2/lending-package-sample/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ocr:
- name: LAYOUT
- name: TABLES
- name: SIGNATURES
max_workers: "20"
image:
target_width: ""
target_height: ""
Expand Down Expand Up @@ -1188,6 +1189,7 @@ classes:
classification:
classificationMethod: multimodalPageLevelClassification
maxPagesForClassification: "ALL"
max_workers: "20"
image:
target_height: ""
target_width: ""
Expand Down Expand Up @@ -1252,6 +1254,7 @@ extraction:
agentic:
enabled: false
review_agent: false
max_workers: "20"
image:
target_width: ""
target_height: ""
Expand Down Expand Up @@ -1425,14 +1428,10 @@ summarization:
assessment:
enabled: true
validation_enabled: false
max_workers: "20"
image:
target_height: ""
target_width: ""
granular:
enabled: true
max_workers: "20"
simple_batch_size: "3"
list_batch_size: "1"
default_confidence_threshold: "0.8"
top_p: "0.1"
max_tokens: "10000"
Expand Down Expand Up @@ -1479,106 +1478,6 @@ assessment:
- Provide tight, accurate bounding boxes around the actual text
</assessment-guidelines>

<spatial-localization-guidelines>
For each field, provide bounding box coordinates:
- bbox: [x1, y1, x2, y2] coordinates in normalized 0-1000 scale
- page: Page number where the field appears (starting from 1)

Coordinate system:
- Use normalized scale 0-1000 for both x and y axes
- x1, y1 = top-left corner of bounding box
- x2, y2 = bottom-right corner of bounding box
- Ensure x2 > x1 and y2 > y1
- Make bounding boxes tight around the actual text content
- If a field spans multiple lines, create a bounding box that encompasses all relevant text
</spatial-localization-guidelines>

<final-instructions>
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:

For SIMPLE attributes:
{
"simple_attribute_name": {
"confidence": 0.85,
"bbox": [100, 200, 300, 250],
"page": 1
}
}

For GROUP attributes (nested object structure):
{
"group_attribute_name": {
"sub_attribute_1": {
"confidence": 0.90,
"bbox": [150, 300, 250, 320],
"page": 1
},
"sub_attribute_2": {
"confidence": 0.75,
"bbox": [150, 325, 280, 345],
"page": 1
}
}
}

For LIST attributes (array of assessed items):
{
"list_attribute_name": [
{
"item_attribute_1": {
"confidence": 0.95,
"bbox": [100, 400, 200, 420],
"page": 1
},
"item_attribute_2": {
"confidence": 0.88,
"bbox": [250, 400, 350, 420],
"page": 1
}
},
{
"item_attribute_1": {
"confidence": 0.92,
"bbox": [100, 425, 200, 445],
"page": 1
},
"item_attribute_2": {
"confidence": 0.70,
"bbox": [250, 425, 350, 445],
"page": 1
}
}
]
}

IMPORTANT:
- For LIST attributes like "Transactions", assess EACH individual item in the list separately with individual bounding boxes
- Each transaction should be assessed as a separate object in the array with its own spatial coordinates
- Do NOT provide aggregate assessments for list items - assess each one individually with precise locations
- Include assessments AND bounding boxes for ALL attributes present in the extraction results
- Match the exact structure of the extracted data
- Provide page numbers for all bounding boxes (starting from 1)
</final-instructions>

<<CACHEPOINT>>

<document-image>
{DOCUMENT_IMAGE}
</document-image>

<ocr-text-confidence-results>
{OCR_TEXT_CONFIDENCE}
</ocr-text-confidence-results>

<<CACHEPOINT>>

<attributes-definitions>
{ATTRIBUTE_NAMES_AND_DESCRIPTIONS}
</attributes-definitions>

<extraction-results>
{EXTRACTION_RESULTS}
</extraction-results>
evaluation:
enabled: true
llm_method:
Expand Down Expand Up @@ -1811,7 +1710,7 @@ agents:
parameters:
max_log_events: 5
time_range_hours_default: 24

chat_companion:
model_id: us.anthropic.claude-sonnet-4-20250514-v1:0
pricing:
Expand Down
Loading
Loading