How aws-samples/sample-genai-underwriting-workbench-demo works
This is an AWS-backed underwriting workbench: users upload life or property-and-casualty submissions, then review extracted information, underwriting findings and scores, and ask questions about the job. The graph captures the documented processing stages and the sampled API, upload, classification, extraction, impairment, scoring, action, and chat responsibilities. The CDK excerpt shows S3-event and state-machine setup, but omits state-machine transitions, so uncertain step-to-step wiring is not inferred; several documented capabilities are represented at their known module paths.
Main entry points: cdk-stack.ts Processing workflow · App.tsx Workbench UI · api-handler/index.py API handler · chat/index.py Document chat
Components 22
Underwriter interface
- Workbench UI
frontend/src/App.tsx - Upload and landing
frontend/src/components/LandingPage.tsx - Job list
frontend/src/components/JobsPage.tsx - Job review
frontend/src/components/JobPage.tsx - Manual viewer
frontend/src/components/ManualPage.tsx
API and job access
- API client
frontend/src/utils/apiClient.ts - API handler
cdk/lambda-functions/api-handler/index.py - Document chat
cdk/lambda-functions/chat/index.py
Document processing
- Upload event
cdk/lib/cdk-stack.ts - Processing workflow
cdk/lib/cdk-stack.ts - Page batching
cdk/lambda-functions/batch-generator/index.py - Page classification
cdk/lambda-functions/classify/index.py - Page extraction
cdk/lambda-functions/bedrock-extract/index.py
Underwriting assessment
- Impairment detection
cdk/lambda-functions/detect-impairments/index.py - Underwriter analysis
cdk/lambda-functions/analyze/index.py - Risk scoring
cdk/lambda-functions/score/index.py - Underwriting actions
cdk/lambda-functions/act/index.py
AWS state and AI
- Document storage
cdk/lib/cdk-stack.ts - Job records
cdk/lib/cdk-stack.ts - Amazon Bedrock
- Manual knowledge base
cdk/lib/cdk-stack.ts
Other components
- Underwriter
Connections 42
- Underwriter → Workbench UI: uses
- Workbench UI → Upload and landing: routes to
- Workbench UI → Job list: routes to
- Workbench UI → Job review: routes to
- Workbench UI → Manual viewer: routes to
- Upload and landing → API client: requests upload
- Job list → API client: fetches jobs
- Job review → API client: fetches job
- Job review → Document chat: chats with
- API client → API handler: HTTP requests
- API handler → Document storage: presigns upload
- API handler → Job records: reads and writes
- API handler → Upload event: uploads trigger
- Upload event → Processing workflow: starts workflow
- Processing workflow → Page batching: dispatches
- Processing workflow → Page classification: dispatches
- Processing workflow → Page extraction: dispatches
- Processing workflow → Impairment detection: dispatches
- Processing workflow → Underwriter analysis: dispatches
- Processing workflow → Risk scoring: dispatches
- Processing workflow → Underwriting actions: dispatches
- Page batching → Document storage: reads document
- Page classification → Document storage: reads document
- Page classification → Amazon Bedrock: classifies with
- Page classification → Job records: reads and updates
- Page extraction → Document storage: reads pages
- Page extraction → Amazon Bedrock: extracts with
- Page extraction → Job records: updates status
- Impairment detection → Document storage: reads chunks
- Impairment detection → Amazon Bedrock: detects with
- Impairment detection → Manual knowledge base: searches manual
- Underwriter analysis → Amazon Bedrock: analyzes with
- Risk scoring → Amazon Bedrock: scores with
- Risk scoring → Manual knowledge base: searches manual
- Risk scoring → Job records: reads job data
- Underwriting actions → Amazon Bedrock: assesses with
- Underwriting actions → Document storage: writes outputs
- Underwriting actions → Job records: reads and updates
- Document chat → Job records: loads context and saves history
- Document chat → Amazon Bedrock: answers with
- Document chat → Manual knowledge base: uses manual
- API handler → Document storage: presigns document access