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
Copy file name to clipboardExpand all lines: docs/extraction.md
+206Lines changed: 206 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,212 @@ extraction:
226
226
4. **Handle OCR Limitations**: Use images to fill gaps where OCR may miss visual-only content
227
227
5. **Consider Document Types**: Different document types benefit from different image placement strategies
228
228
229
+
## Custom Prompt Generator Lambda Functions
230
+
231
+
The extraction service supports custom Lambda functions for advanced prompt generation, allowing you to inject custom business logic into the extraction process while leveraging the existing IDP infrastructure.
232
+
233
+
### Overview
234
+
235
+
Custom prompt generator Lambda functions enable:
236
+
237
+
- **Document type-specific processing** with specialized extraction logic
238
+
- **Integration with external systems** for dynamic configuration retrieval
239
+
- **Conditional processing** based on document content analysis
240
+
- **Regulatory compliance** with industry-specific prompt requirements
241
+
- **Multi-tenant customization** for different customer requirements
242
+
243
+
### Configuration
244
+
245
+
Add the `custom_prompt_lambda_arn` field to your extraction configuration:
Create your production Lambda with business-specific logic and deploy with appropriate IAM permissions.
403
+
404
+
### Use Cases
405
+
406
+
**Financial Services:**
407
+
- Regulatory compliance prompts for different financial products
408
+
- Multi-currency transaction handling with exchange rate awareness
409
+
- Customer-specific formatting for different banking institutions
410
+
411
+
**Healthcare:**
412
+
- HIPAA compliance with privacy-focused prompts
413
+
- Medical terminology enhancement for clinical documents
414
+
- Provider-specific templates for different healthcare systems
415
+
416
+
**Legal:**
417
+
- Jurisdiction-specific legal language processing
418
+
- Contract type specialization (NDAs, service agreements, etc.)
419
+
- Compliance requirements for regulatory documents
420
+
421
+
**Insurance:**
422
+
- Policy type customization for different insurance products
423
+
- Claims processing with adjuster-specific requirements
424
+
- Risk assessment integration with underwriting systems
425
+
426
+
### Security and Compliance
427
+
428
+
-**Scoped IAM Permissions**: Only Lambda functions with `GENAIIDP-*` naming can be invoked
429
+
-**Audit Trail**: All Lambda invocations are logged for security monitoring
430
+
-**Input Validation**: Lambda response structure is validated before use
431
+
-**Fail-Safe Operation**: Lambda failures cause extraction to fail rather than continue with potentially incorrect prompts
432
+
433
+
For complete examples and deployment instructions, see `notebooks/examples/demo-lambda/README.md`.
434
+
229
435
## Using CachePoint for Extraction
230
436
231
437
CachePoint is a feature of select Bedrock models that caches partial computations to improve performance and reduce costs. When used with extraction, it provides:
0 commit comments