AWS Builder Center
AIdeas Finalist: Anukriti – What If Drug Trials Included Everyone?

AIdeas Finalist: Anukriti – What If Drug Trials Included Everyone?

Simulating drug safety across diverse genomes to detect population-specific risks before clinical trials begin.

Student @College of Engineering Karunagappally

App Category

Social Impact - Making population-diverse pharmacogenomic safety screening accessible before expensive lab or trial work begins, with an equity lens on underrepresented genomes. At ~$0.0001 per simulated patient, Anukriti democratizes genomic safety research for academic labs in the Global South - India, Sub-Saharan Africa, Southeast Asia - that lack the bioinformatics clusters to run population-scale cohort analysis today. This focus on equity is motivated by data showing that more than 80% of GWAS participants are of European ancestry  and that clinical trials for FDA-approved drugs in 2020 enrolled 75% White participants , leaving African, South Asian and East Asian populations underrepresented.

My Vision

A child is sent home on codeine after tonsillectomy. If she is a CYP2D6 ultrarapid metabolizer, morphine conversion outpaces safe clearance and a standard dose becomes lethal. The FDA warns that respiratory depression and death have occurred in children who were CYP2D6 ultrarapid metabolizers after tonsillectomy or adenoidectomy , and the ultrarapid phenotype occurs in up to 28% of North Africans/Ethiopians and about 10% of Caucasians. Elsewhere, a patient in East Asia carries an HLA allele that Phase III trials in European-majority cohorts never surfaced: carbamazepine-induced Stevens-Johnson syndrome occurs almost exclusively in carriers of HLA-B*15:02 , an allele present in about 10% of Han Chinese but virtually absent in Europeans. The harm appears before any spreadsheet captures it.
Why do the same drugs fail differently depending on where you were born? Because for most of pharmaceutical history, evidence has been built on European-majority genomes and then prescribed to everyone else: 83.8% of GWAS participants were of European ancestry in 2021  and the UK Biobank is 88% White .
I named the project Anukriti - Sanskrit for response, reaction, or replication. Given a drug and genomic input (VCF, S3, or streamed 1000 Genomes data), Anukriti runs a deterministic pharmacogenomic engine across diverse populations, retrieving CPIC-aligned evidence via Amazon Titan embeddings and generating auditable interpretations with Amazon Nova.
The core proposition is a Virtual Phase 0: a genomic safety simulation across globally representative populations before committing wet-lab budget - not to replace clinical judgment, but to surface population-level safety signals earlier, when intervention is still possible.

Why This Matters

The PREPARE trial (U-PGx consortium, Lancet 2023)  showed that pre-emptive pharmacogenomic panel testing reduced adverse drug reactions by 30%. Yet 99.5% of people carry at least one variant that can alter drug response, and most are never genotyped before prescribing. The documented harm patterns below are not edge cases - they are recurrent, preventable, and population-specific.
DrugGenePopulation at RiskDocumented HarmKey Stat
CodeineCYP2D6North Africa, EthiopiaFatal respiratory depression in childrenUp to 28% ultrarapid metabolizers
CarbamazepineHLA-B*15:02Han Chinese, SE AsiaStevens-Johnson Syndrome (odds ratio >2,500)~10% in Han Chinese; virtually absent in Europeans
AbacavirHLA-B*57:01SW AsiansSevere hypersensitivity~11% vs ~6.8% in Europeans; screening cut incidence to <0.5%
ClopidogrelCYP2C19Pacific Islanders, East AsiansProdrug activation failure, stent thrombosis57% poor metabolizers in Pacific Islanders
WarfarinCYP2C9 + VKORC1East AsiansBleeding risk at standard Western dosesVKORC1 -1639A allele ~90% in East Asians
As of 2021, 83.8% of GWAS participants were of European ancestry . The harm falls hardest on the populations least represented in the genomic corpora that steer drug development. Anukriti shows what a drug's safety profile looks like when run across the populations absent from original trials.

How I Built This

Architecture

LayerRoleTechnology
FrontendUI, VCF workflows, batch modeStreamlit
APIRouting, orchestration, audit loggingFastAPI + Docker
GenomicsRegional variant extractionTabix / htslib + AWS Open Data HTTPS streaming
Decision engineDeterministic diplotype and phenotype callingCPIC/PharmVar tables, RDKit fingerprints
RetrievalEvidence grounding for LLMAmazon Titan Embeddings v2 + local CPIC index
ExplanationNarrative generation (explains, never decides)Amazon Nova (default), Claude, Gemini, Ollama
VerificationPer-call audit and grounding checkpgx_verification.py + citation_grounding.py
BatchPopulation-scale cohort simulationAWS Lambda + Step Functions
StorageVCF files, PDF reports, presigned accessAmazon S3 Intelligent Tiering
ObservabilityLogs, metrics, cost visibilityAmazon CloudWatch
VCF files are streamed from AWS Open Data via HTTPS range requests - no terabyte downloads required. AFR, EAS, SAS, and AMR cohort simulation runs without S3 egress costs, keeping large exploratory runs feasible at order-of-magnitude ~$10^-4 per simulated patient.

Benchmarks, Scalability, and Cost

What we measureMetric
Latency (single run)End-to-end time: Submit -> verified report (engine + retrieval + narration + verification)
Throughput (batch)Simulations per minute for AFR/EAS/SAS/AMR/EUR cohort under Step Functions fan-out
CostPer-simulation compute + retrieval + generation + storage
RAG correctnessMRR / precision / recall + grounding fraction (explanation sentences supported by retrieved CPIC evidence)
Anukriti scales using a fan-out pattern: API tier (FastAPI) validates and enqueues; Step Functions orchestrates cohort runs fanning out per-patient tasks; Lambda / container workers execute deterministic PGx calling; S3 stores per-run artifacts with Intelligent Tiering; CloudWatch captures timing, error rates, and cost signals per step.
Because the deterministic engine is embarrassingly parallel across patients, the main scaling constraints are variant extraction I/O (remote VCF range reads), Bedrock model concurrency, and cold-start overheads. Mitigations include in-memory caching of CPIC evidence chunks and PharmVar tables, chromosome-level sharding for parallel extraction, and Step Functions concurrency caps to stay within Bedrock quotas.
Cost scales approximately linearly: TotalCost ≈ N × (C_compute + C_retrieval + C_llm + C_storage). The headline ~$10^-4 per patient corresponds to lightweight simulation mode with streamed public VCFs and bounded narration output. The dominant cost terms at cohort scale are compute and LLM inference; the streaming design keeps data movement costs near zero.
ScaleUse Case
100 patientsInteractive lab exploration
10,000 patientsCohort-level safety scan
100,000 patientsPopulation-scale screening

AWS-Native Depth

This project is designed around AWS strengths, not just integrated with them:
  • Bedrock boundary: deterministic core stays inspectable; Bedrock handles explanation and formatting, never decision logic
  • Step Functions orchestration: cohort simulation is modeled as durable, retryable steps with per-step metrics
  • Cost visibility: each run emits timing and provider usage into logs so cost-per-run can be derived and monitored
  • S3-first artifacts: every run writes an audit trail and outputs in S3 with presigned access, enabling review without re-running compute

Competitive Landscape

ToolApproachLimitation for Equity
QIAGEN PGXI, Myriad, GenMark DxCertified clinical testingSingle patient, no cohort simulation, high cost
PharmCAT, PGxDBAcademic bioinformatics15-30 min per sample, hours for multi-ancestry cohort
Insilico Medicine, RecursionAI molecule discoveryEquity gap outside their scope
AnukritiGuideline-aligned PGx + cohort simulationResearch prototype; not clinically certified
PharmCAT vs Anukriti: PharmCAT requires Java install, reference data download, and manual phenotype mapping: 15-30 minutes per sample, hours for a multi-ancestry cohort. Anukriti returns a result in ~30 seconds per sample, with similar timing for an AFR + EAS + SAS cohort. Approximately 240x faster to first multi-ancestry result.

Gene Panel (17 targets)

GeneChromosomeKey Drug ClassNotes
CYP2D6chr22Codeine, antidepressantsCopy-number-aware
CYP2C19chr10Clopidogrel, PPIs57% poor metabolizer rate in Pacific Islanders
CYP2C9chr10Warfarin, NSAIDs
VKORC1chr16Warfarin
SLCO1B1chr12StatinsMyopathy risk
TPMTchr6Thiopurines
DPYDchr1Fluoropyrimidines (5-FU)
UGT1A1chr2Irinotecan
HLA-B*57:01chr6 proxyAbacavirHypersensitivity
HLA-B*15:02chr6 proxyCarbamazepineSJS/TEN risk in Asian populations
CYP3A4/3A5chr7Tacrolimus, statins
CYP1A2chr15Clozapine, caffeine
CYP2B6chr19Efavirenz
NAT2chr8IsoniazidTB hepatotoxicity
GSTM1/GSTT1chr1/chr22Cyclophosphamide

Where LLMs Touch the Pipeline - and Where They Don't

LLMs explain results. They never decide them. The deterministic engine fixes star alleles and risk tiers. Amazon Nova narrates and formats the outputs. PharmVar definitions evolve rapidly  - 471 core alleles were added and 49 redefined between versions 1.1.9 and 6.2 - so hard-coded tables keep these changes auditable.
One honest caveat: on Bedrock/Nova paths, structured deterministic blocks are merged with verification labels. On direct Gemini/Claude paths, the narrative comes from the LLM under a constrained CPIC-style prompt - those outputs are research communication, not deterministic calls.

Verification Pipeline

AgentFileWhat It ChecksOutput
Consistency Auditor (Agent 2)src/pgx_verification.pyGene call vs PharmVar/CPIC tablesverified / ambiguous / not in CPIC table
Grounding Scorer (Agent 5)src/citation_grounding.pyLLM explanation vs retrieved CPIC passagesSentence-level grounding fraction; no extra model call
On 174 SFT-labeled PGx queries: MRR 1.0, precision@1 1.0, recall@3 1.0 - the gold CPIC document ranks first every time.

Regulatory Pathway

StageStatusRequirements
Stage 1: Research prototypeCurrentNon-clinical label, academic simulation only
Stage 2: Institutional validationRoadmapIRB approval, patient-level VCFs, outcomes concordance study
Stage 3: Regulated CDS claimFutureFDA 510(k) or De Novo, prospective outcome data, peer-reviewed publication
Full staging documented in docs/regulatory/CLINICAL_VALIDATION_ROADMAP.md. The separation between deterministic calling and LLM narration keeps this path open - the safety-critical logic remains inspectable at every stage.

Demo

Demo Video:
The demo showcases a full multi-ancestry simulation (AFR, EAS, SAS), showing how a single drug produces different risk profiles across populations. The deterministic PGx engine, audit trail, and grounded LLM explanation are all visible in a single run. The recording leads with the equity narrative before the interface walkthrough - judges encounter the why before the how.

What I Learned

Judge Feedback That Improved the Project

  • "Limited gene panel" - Led to expansion from 8 to 17 targets, with explicit prioritisation by CPIC Tier A evidence. HLA-B*15:02 (carbamazepine/SJS) was added specifically because it represents exactly the kind of Asia-specific risk Western trials systematically miss - in a case-control study, all 44 Han Chinese patients with carbamazepine-induced SJS/TEN carried this allele .
  • "Regulatory pathway unclear" - Led to a concrete three-stage roadmap in docs/regulatory/CLINICAL_VALIDATION_ROADMAP.md. A judge who checks the repo finds the document, not just a disclaimer.
  • "Validation scope" - The current system is validated against CPIC fixture data - deterministic and auditable, but not prospective clinical validation. The Consistency Auditor's per-call audit trail and the separation of calling logic from LLM narration are the design choices that would make prospective validation feasible. The prototype claims research utility and auditability - honest and defensible at this stage.
  • "Market adoption barriers" - Rather than targeting pharma directly, the strategy is to prove value with academic PGx labs, safety researchers, and bioinformatics educators first - the groups who publish the evidence that eventually shifts industry practice. At ~$0.0001 per patient, the tool is priced for academic exploration, not enterprise procurement. The wedge is open research credibility, not a sales cycle.
  • "Demo reliability / Bedrock quotas" - Fixed architecturally: Amazon Nova is now the default backend, keeping the app functional when Anthropic model access is gated by region or quota. If Bedrock itself is unavailable, the stack falls back to Ollama for fully local text generation. A live /health/llm-status endpoint exposes backend availability in real time - judges can verify the system is live before watching the demo.

What Genuinely Surprised Me

I assumed the hardest problem would be the genomics engine. The harder problem was the verification architecture. Early versions produced results that looked authoritative but were not auditable. The Consistency Auditor and Grounding Scorer were not planned - they emerged from the uncomfortable realization that "trust the model" is not a healthcare architecture.
The Virtual Phase 0 framing also emerged under pressure. Describing Anukriti as a "research tool" was accurate but undersold its value. Run a genomic safety simulation across diverse populations before committing wet-lab budget - that makes the cost de-risking argument concrete.
On market adoption: the strategy is to establish credibility with academic PGx labs, safety researchers, and bioinformatics educators first - the groups who publish evidence that eventually shifts industry practice. At ~$10^-4 per patient, the tool is priced for academic exploration, not enterprise procurement. Proving value in open research is the wedge.

The Core Insight

Population-aware pharmacogenomic simulation is not aspirational - the evidence base already exists. Four continents of documented population-linked harm, a 30% ADR reduction from pre-emptive panel testing , and FDA and NIH pressure on trial diversity all point in the same direction. Cases like codeine in ultrarapid metabolizers , carbamazepine in HLA-B*15:02 carriers , clopidogrel in CYP2C19 poor metabolizers , and abacavir in HLA-B*57:01 carriers  demonstrate the population specificity of harm. Anukriti does not introduce new biological knowledge - it reveals what we have systematically ignored.

For research and educational use only - not for clinical decision-making.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article