Skip to content

Commit ea06239

Browse files
committed
add readme for default-lending config
1 parent 7378978 commit ea06239

File tree

1 file changed

+213
-0
lines changed
  • config_library/pattern-2/default-lending

1 file changed

+213
-0
lines changed
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
SPDX-License-Identifier: MIT-0
3+
4+
# Default-Lending Configuration
5+
6+
This directory contains the default-lending configuration for the GenAI IDP Accelerator. This configuration is specifically designed for processing lending and financial document packages commonly used in loan applications, underwriting, and financial verification processes.
7+
8+
## Pattern Association
9+
10+
**Pattern**: Pattern-2 - Uses Textract or Amazon Bedrock models for both page classification/grouping and information extraction
11+
12+
## Validation Level
13+
14+
**Level**: 2 - Comprehensive Testing
15+
16+
- **Testing Evidence**: This configuration has been tested with lending sample document including payslips, driver's licenses, bank statements, checks, W2 forms, and insurance applications. It demonstrates robust performance in classifying and extracting detailed financial information from standard lending documents.
17+
- **Known Limitations**: Performance may vary with non-standard document formats, heavily redacted financial documents, or documents with poor image quality that affect OCR accuracy.
18+
19+
## Overview
20+
21+
The default-lending configuration is designed to handle comprehensive lending document packages typically encountered in:
22+
23+
- **Loan Applications**: Personal and commercial lending
24+
- **Mortgage Processing**: Home loan documentation
25+
- **Credit Assessment**: Income and asset verification
26+
- **Underwriting**: Risk assessment documentation
27+
- **Compliance Verification**: Financial record validation
28+
29+
It includes specialized settings for document classification, detailed financial information extraction, and document summarization using Amazon Bedrock models optimized for financial document processing.
30+
31+
## Key Components
32+
33+
### Document Classes
34+
35+
The configuration defines 6 specialized lending document classes, each with comprehensive attributes for detailed financial data extraction:
36+
37+
- **payslip**: Employee wage statements with detailed earnings, deductions, taxes, and year-to-date totals (24 attributes)
38+
- **driver-licenses**: Government-issued identification documents with personal information and driving privileges (22 attributes)
39+
- **bank-checks**: Written financial instruments with payment details and account information (11 attributes)
40+
- **bank-statement**: Periodic financial reports with account activity and transaction details (10 attributes)
41+
- **w2**: Annual tax documents with comprehensive wage and tax withholding information (26 attributes)
42+
- **homeowners-insurance-application**: Insurance coverage applications with detailed applicant and property information (37 attributes)
43+
44+
### Classification Settings
45+
46+
- **Model**: Amazon Nova Pro
47+
- **Method**: Text-based holistic classification
48+
- **Temperature**: 0 (deterministic outputs)
49+
- **Top-k**: 5
50+
- **OCR Backend**: Amazon Textract with LAYOUT, TABLES, and SIGNATURES features
51+
52+
The classification component analyzes document content and structure to accurately identify lending document types and establish proper page boundaries within multi-document packages.
53+
54+
### Extraction Settings
55+
56+
- **Model**: Amazon Nova Pro
57+
- **Temperature**: 0 (deterministic outputs)
58+
- **Top-k**: 5
59+
- **Max Tokens**: 10,000 (increased for detailed financial data)
60+
61+
The extraction component performs comprehensive attribute extraction tailored to each lending document type, capturing critical financial information including:
62+
- Detailed income and deduction breakdowns
63+
- Personal identification information
64+
- Account numbers and financial institution details
65+
- Tax withholding and year-to-date totals
66+
- Insurance coverage details and applicant information
67+
68+
### Assessment Settings
69+
70+
- **Model**: Amazon Claude 3.7 Sonnet
71+
- **Granular Assessment**: Enabled with parallel processing
72+
- **Default Confidence Threshold**: 0.9
73+
- **Max Workers**: 20 for improved performance
74+
75+
Enhanced confidence assessment ensures high accuracy for financial data extraction, critical for lending decisions.
76+
77+
### Summarization Settings
78+
79+
- **Model**: Amazon Claude 3.7 Sonnet
80+
- **Temperature**: 0 (deterministic outputs)
81+
- **Top-k**: 5
82+
83+
The summarization component creates structured summaries of lending documents with proper citations, essential for loan documentation and compliance.
84+
85+
## Sample Documents
86+
87+
This configuration is optimized for processing lending document packages that typically include:
88+
89+
- **Income Verification**: Payslips, W2 forms, tax returns
90+
- **Identity Verification**: Driver's licenses, state IDs
91+
- **Asset Verification**: Bank statements, investment accounts
92+
- **Payment History**: Bank checks, payment records
93+
- **Insurance Documentation**: Homeowner's insurance applications and policies
94+
95+
## How to Use
96+
97+
To use this default-lending configuration:
98+
99+
1. **Direct Deployment**: Deploy the GenAI IDP Accelerator with this configuration for lending document processing workflows:
100+
```bash
101+
# Deploy with lending configuration
102+
./deploy.sh --config config_library/pattern-2/default-lending/config.yaml
103+
```
104+
105+
2. **Loan Processing Integration**: Integrate with existing loan origination systems for automated document processing and data extraction.
106+
107+
3. **Compliance Workflows**: Use for regulatory compliance documentation and audit trail generation.
108+
109+
4. **Custom Lending Workflows**: Adapt for specific lending scenarios:
110+
```bash
111+
cp -r config_library/pattern-2/default-lending config_library/pattern-2/mortgage-processing
112+
```
113+
114+
## Common Customization Scenarios
115+
116+
### Adding New Financial Document Classes
117+
118+
To add additional lending document types (e.g., tax returns, employment verification letters):
119+
120+
1. Add a new entry to the `classes` array:
121+
```yaml
122+
- name: tax_return
123+
description: Individual or business tax return documents containing income and deduction information
124+
attributes:
125+
- name: tax_year
126+
description: The tax year for which the return was filed. Look for 'Tax Year' or year designation at the top of the form.
127+
- name: filing_status
128+
description: The taxpayer's filing status such as Single, Married Filing Jointly, etc.
129+
```
130+
131+
2. Test with representative tax return documents.
132+
133+
### Customizing Extraction Prompts for Compliance
134+
135+
For enhanced compliance and audit requirements:
136+
137+
1. Modify the extraction `task_prompt` to include compliance-specific instructions:
138+
```yaml
139+
task_prompt: |
140+
Extract financial information with particular attention to:
141+
- Verification of income sources and amounts
142+
- Identification of any discrepancies or missing information
143+
- Compliance with lending regulatory requirements
144+
```
145+
146+
### Adjusting Confidence Thresholds for Financial Data
147+
148+
For critical lending decisions, you may want higher confidence thresholds:
149+
150+
1. Update the `default_confidence_threshold` in the assessment section:
151+
```yaml
152+
assessment:
153+
default_confidence_threshold: '0.95' # Higher threshold for financial data
154+
```
155+
156+
### Regional Customization
157+
158+
For different geographic regions with varying document formats:
159+
160+
1. Create region-specific configurations:
161+
```bash
162+
cp -r default-lending default-lending-ca # Canadian lending documents
163+
cp -r default-lending default-lending-uk # UK lending documents
164+
```
165+
166+
2. Modify document classes and attributes for regional requirements.
167+
168+
## Performance Considerations
169+
170+
The default-lending configuration is optimized for:
171+
172+
- **High Accuracy**: Temperature 0 and elevated confidence thresholds for reliable financial data extraction
173+
- **Comprehensive Coverage**: Detailed attribute definitions covering all critical lending information
174+
- **Compliance**: Structured outputs suitable for regulatory documentation and audit trails
175+
- **Scalability**: Granular assessment with parallel processing for high-volume lending workflows
176+
177+
### Financial Data Specific Optimizations
178+
179+
- **OCR Enhancement**: Uses SIGNATURES feature to detect signed documents
180+
- **Table Processing**: TABLES feature for structured financial data in statements
181+
- **Layout Preservation**: LAYOUT feature maintains document structure for complex forms
182+
- **Extended Token Limits**: 10,000 tokens for comprehensive financial document processing
183+
184+
## Security and Compliance Considerations
185+
186+
When processing lending documents:
187+
188+
- **Data Privacy**: Ensure compliance with financial privacy regulations (GLBA, CCPA, etc.)
189+
- **Encryption**: Use encrypted storage and transmission for all financial documents
190+
- **Access Controls**: Implement proper authentication and authorization
191+
- **Audit Logging**: Maintain comprehensive logs for regulatory compliance
192+
- **Data Retention**: Follow applicable data retention policies for financial records
193+
194+
## Integration Guidelines
195+
196+
### Loan Origination Systems (LOS)
197+
198+
This configuration can be integrated with popular LOS platforms:
199+
- Automated document classification upon upload
200+
- Real-time data extraction for loan application prefill
201+
- Exception handling for documents requiring manual review
202+
203+
### Credit Decisioning
204+
205+
Extracted data can feed directly into credit decisioning engines:
206+
- Income verification from payslips and W2s
207+
- Asset verification from bank statements
208+
- Identity verification from driver's licenses
209+
210+
## Contributors
211+
212+
- GenAI IDP Accelerator Team
213+
- Lending Solutions Architecture Team

0 commit comments

Comments
 (0)