You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Cost Optimization**: When disabled, no LLM API calls or S3 operations are performed
14
14
-**Configuration Example**: Set `summarization.enabled: false` to disable, `enabled: true` to enable (default)
15
15
16
-
### Changed
17
-
-**State Machine Simplification**: Removed `SummarizationChoice` conditional states from all patterns (Pattern 1, 2, 3) for cleaner workflows
18
-
-**Service Logic Enhancement**: SummarizationService now checks configuration `enabled` flag at the beginning of `process_document()`
19
-
-**Configuration Schema Updates**: Added `enabled` boolean property to summarization sections in all CloudFormation template schemas
16
+
-**Configuration-Based Assessment Control**
17
+
- Assessment can now be enabled/disabled via configuration file `assessment.enabled` property instead of CloudFormation stack parameter
18
+
-**Key Benefits**: Runtime control without stack redeployment, zero LLM costs when disabled, simplified state machine architecture, backward compatible defaults
19
+
-**Implementation**: Always calls AssessmentStep but service skips processing when `enabled: false`
20
+
-**Cost Optimization**: When disabled, no LLM API calls or S3 operations are performed
21
+
-**Configuration Example**: Set `assessment.enabled: false` to disable, `enabled: true` to enable (default)
22
+
23
+
### Changed
24
+
-**State Machine Simplification**: Removed `SummarizationChoice` and `AssessmentChoice` conditional states from all patterns (Pattern 2, 3) for cleaner workflows
25
+
-**Service Logic Enhancement**: SummarizationService and AssessmentService now check configuration `enabled` flag at the beginning of processing methods
26
+
-**Configuration Schema Updates**: Added `enabled` boolean property to summarization and assessment sections in all CloudFormation template schemas
27
+
- Updated all sample configurations to include `summarization.enabled: true` and `assessment.enabled: true`
28
+
- Updated configuration documentation with new summarization and assessment control approaches
20
29
21
30
### Removed
22
-
-**CloudFormation Parameter**: Removed `IsSummarizationEnabled` parameter from all pattern templates (patterns/pattern-1, pattern-2, pattern-3)
23
-
-**Related Conditions**: Removed `IsSummarizationEnabled` conditions and state machine definition substitutions
31
+
-**CloudFormation Parameters**: Removed `IsSummarizationEnabled` and `IsAssessmentEnabled` parameters from all pattern templates
32
+
-**Related Conditions**: Removed parameter conditions and state machine definition substitutions for both features
33
+
-**Conditional Logic**: Eliminated complex conditional logic from state machine definitions for summarization and assessment steps
34
+
35
+
### Fixed
36
+
-**CloudFormation Template Deployment Error**: Fixed "Template format error: Unresolved resource dependencies [IsAssessmentEnabled]" by removing final parameter reference in main template PATTERN3STACK parameters
37
+
-**State Machine Logic**: Simplified conditional assessment/summarization steps that were causing complex workflow logic
38
+
-**Parameter Dependencies**: Cleaned up all CloudFormation parameter dependencies and references
24
39
25
40
### Documentation
26
41
-**Updated Documentation**: Enhanced docs/configuration.md, docs/architecture.md, and all pattern-specific docs (pattern-1.md, pattern-2.md, pattern-3.md)
Copy file name to clipboardExpand all lines: config_library/pattern-2/bank-statement-sample/config.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -369,6 +369,7 @@ summarization:
369
369
system_prompt: >-
370
370
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.
Copy file name to clipboardExpand all lines: config_library/pattern-2/lending-package-sample/config.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1144,6 +1144,7 @@ summarization:
1144
1144
system_prompt: >-
1145
1145
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.
Copy file name to clipboardExpand all lines: config_library/pattern-2/rvl-cdip-package-sample/config.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -609,6 +609,7 @@ summarization:
609
609
system_prompt: >-
610
610
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.
Copy file name to clipboardExpand all lines: config_library/pattern-3/rvl-cdip-package-sample/config.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -469,6 +469,7 @@ summarization:
469
469
system_prompt: >-
470
470
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.
Copy file name to clipboardExpand all lines: docs/assessment.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,19 +54,33 @@ The assessment step is conditionally integrated into Pattern-2's ProcessSections
54
54
55
55
## Configuration
56
56
57
-
### Deployment Parameter
57
+
### Configuration-Based Control
58
58
59
-
Enable assessment during stack deployment:
59
+
Assessment can now be controlled via the configuration file rather than CloudFormation stack parameters. This provides more flexibility and eliminates the need for stack redeployment when changing assessment behavior.
60
60
61
+
**Configuration-based Control (Recommended):**
61
62
```yaml
62
-
Parameters:
63
-
IsAssessmentEnabled:
64
-
Type: String
65
-
Default: "false"
66
-
AllowedValues: ["true", "false"]
67
-
Description: Enable assessment functionality for extraction confidence evaluation
63
+
assessment:
64
+
enabled: true # Set to false to disable assessment
65
+
model: us.amazon.nova-lite-v1:0
66
+
temperature: 0.0
67
+
# ... other assessment settings
68
68
```
69
69
70
+
**Key Benefits:**
71
+
-**Runtime Control**: Enable/disable without stack redeployment
72
+
-**Cost Optimization**: Zero LLM costs when disabled (`enabled: false`)
73
+
-**Simplified Architecture**: No conditional logic in state machines
74
+
-**Backward Compatible**: Defaults to `enabled: true` when property is missing
75
+
76
+
**Behavior When Disabled:**
77
+
- Assessment lambda is still called (minimal overhead)
78
+
- Service immediately returns with logging: "Assessment is disabled via configuration"
79
+
- No LLM API calls or S3 operations are performed
80
+
- Document processing continues to completion
81
+
82
+
**Migration Note**: The previous `IsAssessmentEnabled` CloudFormation parameter has been removed in favor of this configuration-based approach.
83
+
70
84
### Assessment Configuration Section
71
85
72
86
Add the assessment section to your configuration YAML:
@@ -808,7 +822,7 @@ The assessment feature implements several cost optimization techniques:
808
822
809
823
1. **Text Confidence Data**: Uses condensed OCR confidence information instead of full raw OCR results (80-90% token reduction)
810
824
2. **Conditional Image Processing**: Images only processed when `{DOCUMENT_IMAGE}` placeholder is present
811
-
3. **Optional Deployment**: Assessment infrastructure only deployed when `IsAssessmentEnabled=true`
825
+
3. **Configuration-Based Control**: Assessment can be enabled/disabled via configuration `enabled` property for flexible deployment
Copy file name to clipboardExpand all lines: docs/configuration.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,35 @@ summarization:
56
56
57
57
**Migration Note**: The previous `IsSummarizationEnabled` CloudFormation parameter has been removed in favor of this configuration-based approach.
58
58
59
+
## Assessment Configuration
60
+
61
+
### Enable/Disable Assessment
62
+
63
+
Similar to summarization, assessment can now be controlled via the configuration file rather than CloudFormation stack parameters. This provides more flexibility and eliminates the need for stack redeployment when changing assessment behavior.
64
+
65
+
**Configuration-based Control (Recommended):**
66
+
```yaml
67
+
assessment:
68
+
enabled: true # Set to false to disable assessment
69
+
model: us.amazon.nova-lite-v1:0
70
+
temperature: 0.0
71
+
# ... other assessment settings
72
+
```
73
+
74
+
**Key Benefits:**
75
+
-**Runtime Control**: Enable/disable without stack redeployment
76
+
-**Cost Optimization**: Zero LLM costs when disabled (`enabled: false`)
77
+
-**Simplified Architecture**: No conditional logic in state machines
78
+
-**Backward Compatible**: Defaults to `enabled: true` when property is missing
79
+
80
+
**Behavior When Disabled:**
81
+
- Assessment lambda is still called (minimal overhead)
82
+
- Service immediately returns with logging: "Assessment is disabled via configuration"
83
+
- No LLM API calls or S3 operations are performed
84
+
- Document processing continues to completion
85
+
86
+
**Migration Note**: The previous `IsAssessmentEnabled` CloudFormation parameter has been removed in favor of this configuration-based approach.
87
+
59
88
## Stack Parameters
60
89
61
90
Key parameters that can be configured during CloudFormation deployment:
Copy file name to clipboardExpand all lines: docs/evaluation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The framework supports multiple comparison methods:
43
43
44
44
## Assessment Confidence Integration
45
45
46
-
The evaluation framework automatically integrates with the assessment feature to provide enhanced quality insights. When documents have been processed with assessment enabled, the evaluation reports include confidence scores alongside traditional accuracy metrics.
46
+
The evaluation framework automatically integrates with the assessment feature to provide enhanced quality insights. When documents have been processed with assessment enabled via the configuration `assessment.enabled: true` property, the evaluation reports include confidence scores alongside traditional accuracy metrics.
Copy file name to clipboardExpand all lines: docs/pattern-2.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -619,16 +619,32 @@ The assessment feature runs after successful extraction and provides:
619
619
620
620
### Enabling Assessment
621
621
622
-
Assessment is controlled by the `IsAssessmentEnabled` deployment parameter:
622
+
Assessment can now be controlled via the configuration file rather than CloudFormation stack parameters. This provides more flexibility and eliminates the need for stack redeployment when changing assessment behavior.
623
623
624
-
```bash
625
-
# Deploy with assessment enabled
626
-
aws cloudformation deploy \
627
-
--template-file template.yaml \
628
-
--parameter-overrides IsAssessmentEnabled=true
624
+
**Configuration-based Control (Recommended):**
625
+
```yaml
626
+
assessment:
627
+
enabled: true # Set to false to disable assessment
628
+
model: us.amazon.nova-lite-v1:0
629
+
temperature: 0.0
630
+
# ... other assessment settings
629
631
```
630
632
631
-
When enabled, the assessment step is conditionally added to the state machine workflow:
633
+
**Key Benefits:**
634
+
- **Runtime Control**: Enable/disable without stack redeployment
635
+
- **Cost Optimization**: Zero LLM costs when disabled (`enabled: false`)
636
+
- **Simplified Architecture**: No conditional logic in state machines
637
+
- **Backward Compatible**: Defaults to `enabled: true` when property is missing
638
+
639
+
**Behavior When Disabled:**
640
+
- Assessment lambda is still called (minimal overhead)
641
+
- Service immediately returns with logging: "Assessment is disabled via configuration"
642
+
- No LLM API calls or S3 operations are performed
643
+
- Document processing continues to completion
644
+
645
+
**Migration Note**: The previous `IsAssessmentEnabled` CloudFormation parameter has been removed in favor of this configuration-based approach.
646
+
647
+
The assessment step is always called in the state machine workflow, but the service itself handles the enablement decision:
0 commit comments