Skip to content

kchoover14/document-validation-bedrock

Repository files navigation

LLM-Powered Document Validation and Auditing via AWS Bedrock

This project implements a serverless AI auditing pipeline that uses Claude 3 Haiku (via Amazon Bedrock) to detect fraudulent or anomalous entries in biometric document metadata before they are committed to a permanent record. A Lambda function retrieves unaudited JSON records from a PostgreSQL database and passes them to Claude acting as a forensic document auditor, which returns a structured PASS/FAIL verdict with natural language reasoning. Three prompting strategies (minimal zero-shot, schema-driven, chain-of-thought) were compared on structured output reliability, response time, and anomaly detection accuracy. Schema-driven prompting achieved 100% JSON parse success and 100% anomaly detection -- up from 67% and 0% with minimal prompting -- at 1.6s average response time. Cost modeling supports a hybrid architecture: rule-based processing handles bulk volume, LLM review is reserved for flagged cases (10--20% of records) where semantic validation justifies the 8x cost premium.

Portfolio Page

The portfolio page includes a full project narrative, key findings, and figures.

Tools & Technologies

Languages: Python 3.12

Tools: AWS Bedrock | AWS Lambda | AWS RDS (PostgreSQL 17)

Packages: pg8000 | boto3 | faker | pandas | matplotlib

Environment

  • requirements.txt -- install pinned Python package versions with pip install -r requirements.txt

Expertise

Designing and evaluating AI integration architectures under real-world constraints -- not just whether a technology works, but when, for whom, and at what cost.

License

  • Code and scripts © Kara C. Hoover, licensed under the MIT License.
  • Data, figures, and written content © Kara C. Hoover, licensed under CC BY-NC-SA 4.0.

About

Serverless document validation and auditing pipeline using Claude 3 Haiku via AWS Bedrock.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages