Inside an AI policy intelligence platform
For a life-sciences client, we built a working prototype that reads payer coverage policies, turns them into structured rules, detects what changed, and keeps a human in the loop before anything is published. It runs end to end on AWS.
At a glance
- Status
- Working prototype*
- Use case
- Tracking payer coverage rules (prior authorization, step therapy, quantity limits)
- Input
- Policy PDFs (today)
- AI
- Amazon Bedrock: Bedrock Data Automation (BDA) for extraction; Claude Sonnet 4.6 and Haiku 4.5; Knowledge Bases for retrieval; Bedrock AgentCore with the Strands Agents SDK for agents
- Orchestration
- AWS Step Functions, EventBridge, SQS, Lambda
- Data
- Amazon S3, DynamoDB, Aurora PostgreSQL
- Delivery
- Infrastructure as code (CloudFormation) with CI/CD on every push
Architecture
The system is four layers of managed AWS services, with no servers for us to run. AWS Step Functions is the backbone that drives every document through them.
The screens call APIs, the workflow invokes the AI services, and every step reads and writes the shared data layer.
How a policy moves through the pipeline
One Step Functions workflow carries each document from upload to alert, so every step is retried, tracked and visible in one place.
- Upload. A policy PDF lands in the S3 document lake. An EventBridge rule picks up the new object and starts the workflow.
- Skip what hasn't changed. The system fingerprints the document and each of its sections. If they match the last version, the document is skipped, saving time and AI cost.
- Extract. The Policy Extraction Agent, running on Bedrock AgentCore, sends the PDF to BDA. BDA returns structured fields (drug, prior authorization, step therapy, quantity limits and more), each with a confidence score.
- Gate 1: analyst review. Low-confidence extractions wait in an SQS review queue. Step Functions pauses at no cost until an analyst approves or corrects the fields in the UI.
- Enrich and check, in parallel. Classification maps restrictions to the access taxonomy, using Bedrock Knowledge Bases for context. Change detection compares against the prior version. Criteria validation checks the result.
- Score. A Lambda combines the confidence scores from every step into one aggregate score.
- Gate 2: lead approval. Uncertain or high-impact changes go to a lead for sign-off before they are published.
- Publish and notify. The approved version is written to the policy registry in DynamoDB. SNS sends email and SMS alerts, and a report dispatcher runs every 15 minutes.
The AI layer
The AI is built from managed Bedrock services, so model calls and data stay inside our AWS account. Each job goes to the cheapest tool that can do it well.
Extraction with Bedrock Data Automation
BDA reads PDFs, including tables, and fills a blueprint: a schema that lists the fields to extract. We refined the blueprint over several iterations before the output was reliable.
Turning a policy into structured data is designed to take minutes, not hours of manual reading.
Agents on AgentCore and Strands
LLM-driven steps run as agents built with the Strands Agents SDK and hosted on Bedrock AgentCore, which handles scaling and sessions. The multi-agent design was built in stages, with the extraction agent first.
Steps that need no reasoning, such as hashing, scoring, writing to the registry and the APIs, are plain Lambda functions. Keeping agents only where reasoning is needed keeps the system cheap and easy to debug.
Retrieval for classification
Policy wording varies widely between payers. Bedrock Knowledge Bases gives the classifier the relevant taxonomy and policy passages. Its labels are therefore grounded in our own reference material.
Two-tier models
Claude Haiku 4.5 is set up for routine, high-volume work such as simple classification and alert text. Claude Sonnet 4.6 handles harder reasoning: complex sections, version comparisons, contract checks and summaries.
The design projects that sending easy work to the cheaper model is the single biggest cost lever.
Confidence gates: where humans step in
The AI never publishes an uncertain or high-stakes change on its own.
Every step attaches a confidence score to its output, and those scores alone decide the route, so the routing logic does not depend on any single agent's output format.
| Confidence | What happens |
|---|---|
| High | Published automatically, included in periodic spot checks |
| Medium | Published, with a random sample sent for human spot checks |
| Low | Held as a draft until a reviewer approves it |
| High business impact, any score | Sign-off from two independent senior reviewers (four-eyes) |
The prototype implements two review gates (Gate 1 for analysts, Gate 2 for lead approval), and the workflow pauses at no cost while a person reviews. Every approval, correction and rejection is logged and visible in the audit trail screen.
Data and security
Data
Original documents and results are stored in Amazon S3. DynamoDB serves the fast-changing data behind the screens, and Aurora PostgreSQL holds the related data that reports join together.
Security
The database sits in a private network, every request needs a signed-in user, and each component gets only the permissions it needs. Credentials are kept in AWS Secrets Manager, never in code.
Repeatable setup
The whole environment is defined as code and redeploys automatically on every change, so it is built the same way every time.
Best practices we followed
- Design the screens first. We agreed the screens and fields in Figma, then shaped the backend data to match them.
- Iterate on the extraction schema. Extraction quality came from refining the BDA blueprint over several iterations.
- Use an LLM only where it reasons. Hashing, scoring and storage stay as plain code, which makes them cheaper, faster and easier to test.
- Skip unchanged documents. The fingerprint check stops repeated documents from costing anything.
- Let confidence decide the route. Every step returns a score, and low-confidence or high-impact results always reach a person.
- Version everything. Every approval, correction and rejection is logged and visible in the audit trail screen.
- Automate the environment. Infrastructure as code and CI/CD rebuild the whole stack the same way on every push.
- Secure by default. A private network, least-privilege access, and no secrets in code.
Read on
For the business problem and the targets, read How AI could cut policy tracking from months to days.
* Working prototype. Two review gates keep people in the loop before anything is published.
