A demonstration project showcasing the power of Amazon Bedrock and Claude Haiku 4.5 in transforming life and property & casualty underwriting workflows.
This solution leverages intelligent document processing to streamline the underwriting process by automatically extracting, analyzing, and making accessible critical information from insurance applications and related documents.
π Interested in learning more about how to build this solution? Check out our workshop: Build an AI-Powered Underwriting Assistant with Amazon Bedrock
- genai-underwriting-workbench-demo
- Business Purpose
- Key Features
- Sample Documents
- Insurance Types: Life vs P&C
- Deployment
- Technical Overview
This demo addresses a key challenge in life insurance underwriting: the time-consuming process of reviewing lengthy applications and related documentation. By combining Amazon Bedrock's capabilities with advanced AI models, the solution helps underwriters:
- π Reduce time spent on manual document review
- π Automatically extract and organize relevant information from complex documents
- π Surface key insights and potential risk factors
- π¬ Enable natural language interaction with document contents
- β Increase consistency in information extraction
- π― Allow underwriters to focus on decision-making rather than information gathering
- Page-by-page analysis of insurance applications and supporting documents
- Efficient batch processing of multiple pages at a time to optimize performance and resource usage
- Intelligent extraction of key data points from each page, enabling comprehensive analysis without token limitations
- Automatic classification of document sections with useful bookmarks
- AI-driven analysis of the document to detect discrepancies and extract underwriting-relevant insights
- Evaluation of medical history, medications, and lifestyle factors to identify risk indicators
- Automated identification of potential risk factors and summary of key findings
- Highlighting of areas requiring additional review and cross-referencing of information across sections
- Optional integration with customer's proprietary underwriting manuals for specialized insights
- Natural language chat interface for querying document contents
- Context-aware responses leveraging the extracted document insights
- Persistent chat history ensuring coherent conversation flow
- Quick navigation to relevant document sections using markdown links
- Contextual understanding of underwriting terminology for detailed inquiries
We have included sample PDF documents in the sample_documents/ folder. These can be used to test the application's document processing capabilities:
life_submission.pdf: A sample life insurance application.p&c_submission.pdf: A sample property & casualty insurance application.
This demo supports both Life and Property & Casualty (P&C) underwriting modes. The selected mode controls prompts, tools, and knowledge usage endβtoβend.
- A Life Underwriting Manual is included in
knowledge-base/manual/and is indexed into an Amazon Bedrock Knowledge Base during deployment. - The manual is consulted by agents only when
insuranceTypeislife. - For
property_casualty, the manual is not used and the knowledge base tool is not attached to the agents.
-
Analyze (
cdk/lambda-functions/analyze/index.py)- Life: Runs with a Life Underwriter prompt and includes a
kb_searchtool to reference the manual when identifying impairments and scoring factors. - P&C: Runs with a P&C Underwriter prompt focused on P&C risk drivers; no knowledge base tool is attached.
- Life: Runs with a Life Underwriter prompt and includes a
-
Score (
cdk/lambda-functions/score/index.py)- Life: Uses the knowledge base (
kb_search) plus acalculatortool to compute subβtotals and a final total, explaining reasons with references to manual content. - P&C: Uses a P&C scoring prompt with only the
calculatortool; no knowledge base tool is available.
- Life: Uses the knowledge base (
-
Classify (
cdk/lambda-functions/classify/index.py)- Uses an insuranceβtype specific classification prompt for Life vs P&C document types.
-
Chat (
cdk/lambda-functions/chat/index.py)- Tailors guidance and sample tools by insurance type (e.g., Life:
calculate_mortality_risk; P&C:calculate_property_premium).
- Tailors guidance and sample tools by insurance type (e.g., Life:
- Frontend sends
insuranceTypewith upload. - API stores
insuranceTypeon the job record in DynamoDB. - Downstream lambdas read
insuranceTypeand adapt prompts/tools accordingly (KB only in Life).
The project is designed to be deployed on AWS using the AWS Cloud Development Kit (CDK) for a seamless deployment of both backend and frontend services along with all necessary AWS infrastructure.
-
π³ Docker: Required for containerization
- Install Docker Desktop for your OS
- Verify the installation by running
docker run hello-world
-
βοΈ AWS CLI: Install and configure with your credentials:
aws configure # You'll need access key, secret key, default region (us-east-1 recommended) -
π¦ Node.js and npm: Ensure you have Node.js (version 14 or later) and npm installed
node --version # Should be >= 14 npm --version -
ποΈ AWS CDK: Install globally:
npm install -g aws-cdk cdk --version # Verify installation -
π CDK Dependencies: From the
cdkdirectory, install necessary packages:cd cdk npm install
git clone https://github.com/aws-samples/sample-genai-underwriting-workbench-demo/
cd sample-genai-underwriting-workbench-demo- If necessary, bootstrap your AWS environment (required once per account/region):
cd cdk
cdk bootstrap aws://ACCOUNT-NUMBER/REGION # Replace with your AWS account number and region- Deploy the stack:
cdk deployThis process will:
- Create all necessary AWS resources (Lambda functions, Load Balancers, DynamoDB tables, S3 buckets, etc.)
- Deploy backend services and the frontend application
- Output API endpoints and frontend URLs once complete
Note: Ensure your AWS account has appropriate permissions to create and manage these resources, including:
- Lambda function creation and management
- DynamoDB table creation
- S3 bucket management
- IAM role and policy management
- CloudFormation full access
This demo streamlines the underwriting process through a powerful AI-driven workflow, which can be broken down into four key stages:
- Ingest: Incoming documents are uploaded to S3.
- Classify: Documents are then classified to determine their type (e.g., application, medical report, financial statement). This ensures the correct processing path and relevant extraction models are applied.
- Extract: Key information and data points are extracted from the classified documents. This includes details like applicant information, medical history, financial data, and other relevant underwriting criteria.
- Analyze: The extracted data is then analyzed by advanced AI models to identify potential risks, discrepancies, and generate comprehensive underwriting insights. This stage highlights critical information and suggests recommendations.
- Act: Underwriters can then interact with the analyzed data through a chat interface, review insights, and make informed decisions, leveraging the AI-generated analysis to accelerate their workflow.
The project consists of three main components:
-
Backend: A serverless backend built with AWS Lambda functions and orchestrated by AWS Step Functions. It leverages Amazon Bedrock and Anthropic's Claude models for intelligent document processing.
- API Gateway (api-handler Lambda): Handles all API requests, including document uploads (via presigned S3 URLs), retrieving job statuses, and fetching analysis results.
- Document Extraction (bedrock-extract Lambda): Triggered by new document uploads to S3. It converts PDF documents to images, extracts key-value information from each page using Amazon Bedrock's Claude 3 model, classifies pages, and stores the raw extracted data.
- Document Analysis (analyze Lambda): Processes the extracted data from the
bedrock-extractfunction. It uses Amazon Bedrock's Claude 3.5 Sonnet model to perform comprehensive underwriting analysis, identifying risks, discrepancies, and generating final recommendations. - Agentic Actions (act Lambda): Uses the Strands Agents SDK to perform agentic actions, such as auto declining or requesting additional documentation.
- Orchestration: AWS Step Functions coordinate the flow between the document upload, extraction, and analysis steps, ensuring a robust and scalable workflow.
- Data Storage: DynamoDB is used to store job metadata, extracted data, and the final analysis results, while S3 is used for raw document storage.
-
Frontend: A React application (powered by Vite) that provides:
- Document upload interface with progress tracking
- Visual representation of extracted information
- Interactive chat interface for querying document contents
- Organized display of underwriting insights
- Seamless document reprocessing capabilities
-
Infrastructure: Deployed via AWS CDK, which automates the provisioning and management of all cloud resources.
The frontend can be run locally for development and testing. Follow these steps:
- Navigate to the frontend directory and install dependencies:
cd frontend npm install - Create an
.env.localfile in the frontend directory with the following content:VITE_API_URL=http://{CloudFront URL of deployed application} - Start the development server:
npm run dev
Thanks to all the contributors for building, reviewing and testing.
- Tony Howell
- Charles Meruwoma
- Dhaval Shah
- Nikolas Lecce
- Mark Oates




