Skip to content

Commit 6cf8300

Browse files
author
Bob Strahan
committed
Merge branch 'develop' v0.3.8
2 parents a7f7650 + 9a79fd3 commit 6cf8300

File tree

69 files changed

+3669
-2231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3669
-2231
lines changed

1751146101381_classification_state.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,61 @@ SPDX-License-Identifier: MIT-0
77

88
### Added
99

10+
## [0.3.8]
11+
12+
### Added
13+
14+
- **Lending Package Configuration Support for Pattern-2**
15+
- Added new `lending-package-sample` configuration to Pattern-2, providing comprehensive support for lending and financial document processing workflows
16+
- New default configuration for Pattern-2 stack deployments, optimized for loan applications, mortgage processing, and financial verification documents
17+
- Previous `rvl-cdip-sample` configuration remains available by selecting `rvl-cdip-package-sample` for the `Pattern2Configuration` parameter when deploying or updating stacks
18+
19+
- **Text Confidence View for Document Pages**
20+
- Added support for displaying OCR text confidence data through new `TextConfidenceUri` field
21+
- New "Text Confidence View" option in the UI pages panel alongside existing Markdown and Text views
22+
- Fixed issues with view persistence - Text Confidence View button now always visible with appropriate messaging when content unavailable
23+
- Fixed view toggle behavior - switching between views no longer closes the viewer window
24+
- Reordered view buttons to: Markdown View, Text Confidence View, Text View for better user experience
25+
26+
- **Enhanced OCR DPI Configuration for PDF files**
27+
- DPI for PDF image conversion is now configurable in the configuration editor under OCR image processing settings
28+
- Default DPI improved from 96 to 150 DPI for better default quality and OCR accuracy
29+
- Configurable through Web UI without requiring code changes or redeployment
30+
31+
### Changed
32+
33+
- **Converted text confidence data format from JSON to markdown table for improved readability and reduced token usage**
34+
- Removed unnecessary "page_count" field
35+
- Changed "text_blocks" array to "text" field containing a markdown table with Text and Confidence columns
36+
- Reduces prompt size for assessment service while improving UI readability
37+
- OCR confidence values now rounded to 1 decimal point (e.g., 99.1, 87.3) for cleaner display
38+
- Markdown table headers now explicitly left-aligned using `|:-----|:-----------|` format for consistent appearance
39+
40+
- **Simplified OCR Service Initialization**
41+
- OCR service now accepts a single `config` dictionary parameter for cleaner, more consistent API
42+
- Aligned with classification service pattern for better consistency across IDP services
43+
- Backward compatibility maintained - old parameter pattern still supported with deprecation warning
44+
- Updated all lambda functions and notebooks to use new simplified pattern
45+
- Removed fixed image target_height and target_width from default configurations, so images are processed in original resolution by default.
46+
47+
- **Updated Default Configuration for Pattern1 and Pattern2**
48+
- Changed default configuration for new stacks from "default" to "lending-package-sample" for both Pattern1 and Pattern2
49+
- Maintains backward compatibility for stack updates by keeping the parameter value "default" mapped to the rvl-cdip-sample for pattern-2.
50+
51+
- **Reduce assessment step costs**
52+
- Default model for granular assessment is now `us.amazon.nova-lite-v1:0` - experimentation recommended
53+
- Improved placement of <<CACHEPOINT>> tags in assessment prompt to improve utilization of prompt caching
54+
1055
### Fixed
1156

57+
- **Fixed Image Resizing Behavior for High-Resolution Documents**
58+
- Fixed issue where empty strings in image configuration were incorrectly resizing images to default 951x1268 pixels instead of preserving original resolution
59+
- Empty strings (`""`) in `target_width` and `target_height` configuration now preserve original document resolution for maximum processing accuracy
60+
- Fixed issue where PNG files were being unnecessarily converted to JPEG format and resized to lower resolution with lost quality
61+
- Fixed issue where PNG and JPG image files were not rendering inline in the Document Details page
62+
- Fixed issue where PDF files were being downloaded instead of displayed inline
63+
- Fixed pricing data for cacheWrite tokens for Amazon Nova models to resolve innacurate cost estimation in UI.
64+
1265

1366
## [0.3.7]
1467

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ After deployment, you can quickly process a document and view results:
7373
- **Via S3**: Upload directly to the S3 input bucket (find the bucket URL in CloudFormation stack Outputs)
7474

7575
2. **Use Sample Documents**:
76-
- For Pattern 1 (BDA): Use [samples/lending_package.pdf](./samples/lending_package.pdf)
77-
- For Patterns 2 and 3: Use [samples/rvl_cdip_package.pdf](./samples/rvl_cdip_package.pdf)
76+
- For Patterns 1 (BDA) and Pattern 2: Use [samples/lending_package.pdf](./samples/lending_package.pdf)
77+
- For Pattern 3 (UDOP): Use [samples/rvl_cdip_package.pdf](./samples/rvl_cdip_package.pdf)
7878

7979
3. **Monitor Processing**:
8080
- **Via Web UI**: Track document status on the dashboard
@@ -105,8 +105,8 @@ To update an existing GenAIIDP stack to a new version:
105105
7. For detailed instructions, see the [Deployment Guide](./docs/deployment.md#updating-an-existing-stack)
106106

107107
For testing, use these sample files:
108-
- Pattern-1 BDA default project: `samples/lending_package.pdf`
109-
- Patterns 2 and 3 default configurations: `samples/rvl_cdip_package.pdf`
108+
- For Patterns 1 (BDA) and Pattern 2: Use [samples/lending_package.pdf](./samples/lending_package.pdf)
109+
- For Pattern 3 (UDOP): Use [samples/rvl_cdip_package.pdf](./samples/rvl_cdip_package.pdf)
110110

111111
For detailed deployment and testing instructions, see the [Deployment Guide](./docs/deployment.md).
112112

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.7
1+
0.3.8

config_library/pattern-1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ See the main [README.md](../README.md) for more detailed instructions on creatin
2727

2828
## Available Configurations
2929

30-
Currently, only the default configuration is available for Pattern 1. Contributions are welcome!
30+
Currently, only the default lending-package-sample configuration is available for Pattern 1. Contributions are welcome!

config_library/pattern-1/default/README.md renamed to config_library/pattern-1/lending-package-sample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
SPDX-License-Identifier: MIT-0
33

4-
# Default Configuration
4+
# Default Configuration (lending-package-sample)
55

66
This directory contains the default configuration for the GenAI IDP Accelerator. This configuration serves as the baseline for all document processing tasks and can be used as a starting point for creating custom configurations.
77

config_library/pattern-1/default/config.yaml renamed to config_library/pattern-1/lending-package-sample/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pricing:
121121
- name: cacheReadInputTokens
122122
price: '1.5E-8'
123123
- name: cacheWriteInputTokens
124-
price: '0'
124+
price: '6.0E-8'
125125
- name: bedrock/us.amazon.nova-pro-v1:0
126126
units:
127127
- name: inputTokens
@@ -131,7 +131,7 @@ pricing:
131131
- name: cacheReadInputTokens
132132
price: '2.0E-7'
133133
- name: cacheWriteInputTokens
134-
price: '0'
134+
price: '8.0E-7'
135135
- name: bedrock/us.amazon.nova-premier-v1:0
136136
units:
137137
- name: inputTokens

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ ocr:
1010
features:
1111
- name: LAYOUT
1212
image:
13-
target_width: '951'
14-
target_height: '1268'
13+
dpi: '150'
14+
target_width: ''
15+
target_height: ''
1516
classes:
1617
- name: Bank Statement
1718
description: Monthly bank account statement
@@ -68,8 +69,8 @@ classes:
6869
attributeType: list
6970
classification:
7071
image:
71-
target_height: '1268'
72-
target_width: '951'
72+
target_height: ''
73+
target_width: ''
7374
top_p: '0.1'
7475
max_tokens: '4096'
7576
top_k: '5'
@@ -210,8 +211,8 @@ classification:
210211
classificationMethod: textbasedHolisticClassification
211212
extraction:
212213
image:
213-
target_height: '1268'
214-
target_width: '951'
214+
target_height: ''
215+
target_width: ''
215216
top_p: '0.1'
216217
max_tokens: '10000'
217218
top_k: '5'
@@ -368,19 +369,19 @@ summarization:
368369
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.
369370
assessment:
370371
image:
371-
target_height: '1268'
372-
target_width: '951'
372+
target_height: ''
373+
target_width: ''
373374
granular:
374375
enabled: true
375376
max_workers: "20"
376377
simple_batch_size: "3"
377378
list_batch_size: "1"
378-
default_confidence_threshold: '0.9'
379+
default_confidence_threshold: '0.8'
379380
top_p: '0.1'
380381
max_tokens: '10000'
381382
top_k: '5'
382383
temperature: '0.0'
383-
model: us.anthropic.claude-3-7-sonnet-20250219-v1:0
384+
model: us.amazon.nova-pro-v1:0
384385
system_prompt: >-
385386
You are a document analysis assessment expert. Your task is to evaluate the confidence of extraction results by analyzing the source document evidence. Respond only with JSON containing confidence scores for each extracted attribute.
386387
task_prompt: >-
@@ -578,7 +579,7 @@ pricing:
578579
- name: cacheReadInputTokens
579580
price: '1.5E-8'
580581
- name: cacheWriteInputTokens
581-
price: '0'
582+
price: '6.0E-8'
582583
- name: bedrock/us.amazon.nova-pro-v1:0
583584
units:
584585
- name: inputTokens
@@ -588,7 +589,7 @@ pricing:
588589
- name: cacheReadInputTokens
589590
price: '2.0E-7'
590591
- name: cacheWriteInputTokens
591-
price: '0'
592+
price: '8.0E-7'
592593
- name: bedrock/us.amazon.nova-premier-v1:0
593594
units:
594595
- name: inputTokens

0 commit comments

Comments
 (0)