← Case studies
CASE STUDY · LIFE SCIENCES

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.

CASE STUDY 03 LIFE SCIENCES WORKING PROTOTYPE

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.

  1. Upload. A policy PDF lands in the S3 document lake. An EventBridge rule picks up the new object and starts the workflow.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Score. A Lambda combines the confidence scores from every step into one aggregate score.
  7. Gate 2: lead approval. Uncertain or high-impact changes go to a lead for sign-off before they are published.
  8. 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.
How a policy moves through the pipeline A flow from policy upload through a fingerprint check. Unchanged documents are skipped. Changed documents go to extraction, then to an analyst review gate for low-confidence fields. Classification, change detection and criteria validation run in parallel, then a score is combined. Uncertain or high-impact changes go to lead approval before the approved version is published and alerts are sent. Human steps are highlighted. Pipeline UPLOAD Policy PDF lands in S3 FINGERPRINT Compare with last version EXTRACT BDA returns fields, scores HUMAN GATE 1: ANALYST Reviews low-confidence fields CLASSIFY Maps to access taxonomy DETECT CHANGE Compares with prior version VALIDATE CRITERIA Checks the output SCORE One aggregate score HUMAN GATE 2: LEAD Signs off uncertain or high-impact PUBLISH AND NOTIFY Registry, then email, SMS SKIPPED Unchanged, no AI cost unchanged changed low confidence in parallel uncertain or high impact routine approved How a policy moves through the pipeline A flow from policy upload through a fingerprint check. Unchanged documents are skipped. Changed documents go to extraction, then to an analyst review gate for low-confidence fields. Classification, change detection and criteria validation run in parallel, then a score is combined. Uncertain or high-impact changes go to lead approval before the approved version is published and alerts are sent. Human steps are highlighted. STEP 1 UPLOAD Policy PDF lands in S3 STEP 2 FINGERPRINT Compare with last version END SKIPPED Unchanged, no AI cost STEP 3 EXTRACT BDA returns fields and scores HUMAN GATE 1: ANALYST Reviews low-confidence fields IN PARALLEL CLASSIFY Maps to access taxonomy IN PARALLEL DETECT CHANGE Compares with prior version IN PARALLEL VALIDATE CRITERIA Checks the output STEP 4 SCORE One aggregate score HUMAN GATE 2: LEAD Uncertain or high-impact STEP 5 PUBLISH AND NOTIFY Registry, then email and SMS unchanged low confidence changed uncertain or high impact approved routine
A working prototype. Two review gates keep people in the loop before anything is published.

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.

How confidence sets the route
ConfidenceWhat happens
HighPublished automatically, included in periodic spot checks
MediumPublished, with a random sample sent for human spot checks
LowHeld as a draft until a reviewer approves it
High business impact, any scoreSign-off from two independent senior reviewers (four-eyes)
How confidence sets the route An aggregate confidence score routes a change to one of four paths. High confidence is published automatically and included in periodic spot checks. Medium confidence is published with a random sample sent for human spot checks. Low confidence is held as a draft until a reviewer approves it. High business impact, at any score, needs sign-off from two independent senior reviewers. Every approval, correction and rejection is logged to the audit trail. AGGREGATE SCORE Combined from every step HIGH Published automatically MEDIUM Published, random spot check LOW Held as a draft HIGH IMPACT Any score routes here HUMAN REVIEWER APPROVES Draft released by a reviewer HUMAN FOUR-EYES SIGN-OFF Two independent senior reviewers AUDIT TRAIL Approvals, corrections, rejections high medium low high business impact released logged How confidence sets the route An aggregate confidence score routes a change to one of four paths. High confidence is published automatically and included in periodic spot checks. Medium confidence is published with a random sample sent for human spot checks. Low confidence is held as a draft until a reviewer approves it. High business impact, at any score, needs sign-off from two independent senior reviewers. Every approval, correction and rejection is logged to the audit trail. SCORE AGGREGATE SCORE Combined from every step ROUTE HIGH Published automatically ROUTE MEDIUM Published, random spot check ROUTE LOW Held as a draft ROUTE HIGH IMPACT Any score routes here HUMAN REVIEWER APPROVES Draft released by a reviewer HUMAN FOUR-EYES SIGN-OFF Two independent senior reviewers TRAIL AUDIT TRAIL Approvals, corrections, rejections logged
Scores alone set the route. Low-confidence and high-impact changes always reach a person.

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.

* Working prototype. Two review gates keep people in the loop before anything is published.