Project Info

Winner

Rox: Best Use of Rox; Regeneron: Runner-Up

Harmoniq

Devpost

Inspiration

The $960M Problem: When the FDA updates a regulation (like 21 CFR Part 11), pharmaceutical companies face a critical question: Which of our 50+ active clinical trials are now non-compliant? The current process: 130-160 days of manual review by regulatory affairs teams $6M revenue loss per day of trial delay Total cost: $780M-$960M per major regulatory change Error rate: ~15-20% of violations missed in manual review We spoke with regulatory affairs teams at top pharma companies and clinical research students at Harvard Medical School, MIT, and Stanford — all confirmed the same bottleneck: compliance checking is still done with PDFs, spreadsheets, and manual cross-referencing. Harmoniq automates this entire workflow in under 10 seconds.

What it does

Harmoniq is an AI agent system that continuously monitors clinical trial protocols for regulatory compliance: Core Capabilities Regulation Ingestion Upload messy FDA/EMA PDFs (21 CFR Part 11, ICH-GCP E6(R2)) LLM agent extracts structured requirements from unstructured text Builds knowledge graph connecting related clauses Regulation Ingestion Upload messy FDA/EMA PDFs (21 CFR Part 11, ICH-GCP E6(R2)) LLM agent extracts structured requirements from unstructured text Builds knowledge graph connecting related clauses Protocol Analysis Upload protocol document (PDF/Markdown) System splits into paragraphs and checks each against regulations Uses HippoRAG (NeurIPS 2024) for graph-enhanced retrieval Protocol Analysis Upload protocol document (PDF/Markdown) System splits into paragraphs and checks each against regulations Uses HippoRAG (NeurIPS 2024) for graph-enhanced retrieval Compliance Reports Paragraph-level violation detection Severity scoring (critical/high/medium/low) Missing elements identified Confidence scores for each finding Compliance Reports Paragraph-level violation detection Severity scoring (critical/high/medium/low) Missing elements identified Confidence scores for each finding Example Workflow

How we built it

System Architecture Tech Stack Backend (Python FastAPI) FastAPI — Async API framework Pydantic — Type-safe data validation ChromaDB — Vector database (persistent storage) NetworkX — Graph operations + Personalized PageRank sentence-transformers — Local embedding model (all-MiniLM-L6-v2) pypdf — PDF text extraction httpx — Async HTTP client for LLM APIs LLM Infrastructure Model: Anthropic Claude 3.5 Sonnet (claude-3-5-sonnet-20241022) Provider: Direct Anthropic API / Lava Payments proxy Prompts: Custom system prompts for extraction, relationship detection, and compliance reasoning Frontend (Next.js + TypeScript) Next.js 14 — React framework with App Router TypeScript — Type safety Tailwind CSS — Styling shadcn/ui — Component library React Flow — Interactive knowledge graph visualization Deployment Backend: Python 3.11, Poetry dependency management Frontend: Vercel Database: Local ChromaDB (portable to cloud) Knowledge Graph Structure We construct a multi-edge knowledge graph where nodes are regulatory requirements and edges represent relationships: 3 Edge Types: NEARBY (weight = 1.0) Sequential connections (e.g., REQ-001 → REQ-002) Captures document flow and context NEARBY (weight = 1.0) Sequential connections (e.g., REQ-001 → REQ-002) Captures document flow and context SIMILAR_TO (weight = cosine similarity) Vector embedding similarity > 0.75 Finds semantically related clauses SIMILAR_TO (weight = cosine similarity) Vector embedding similarity > 0.75 Finds semantically related clauses RELATED_TO (weight = LLM confidence) LLM-detected logical relationships Example: "validation required" → "audit trails required" RELATED_TO (weight = LLM confidence) LLM-detected logical relationships Example: "validation required" → "audit trails required" Graph Statistics (21 CFR Part 11): Nodes: 703 requirement clauses Edges: 876 total (30% LLM, 50% similarity, 20% sequential) Average degree: 2.5 connections per node HippoRAG Retrieval Algorithm Traditional RAG uses only vector similarity. HippoRAG adds graph traversal: Standard RAG: [ \text{Results} = \text{TopK}(\text{cosine}(\vec{q}, \vec{d}_i)) ] HippoRAG: [ \text{Seeds} = \text{TopK}(\text{cosine}(\vec{q}, \vec{d}i)) \quad (k=5) ] [ \text{PPR}\text{seeds}(v) = \text{PageRank}(G, \text{personalization}=\text{Seeds}) ] [ \text{Results} = \text{TopK}(\text{PPR scores}) ] Why this works: Vector search finds direct matches ("validation") Graph propagation finds related concepts ("audit trails", "documentation") Result: 40% more relevant clauses retrieved vs. pure vector search

Challenges we ran into

1. Messy PDF Extraction FDA PDFs have inconsistent formatting (tables, multi-column, footnotes) Solution: pypdf + custom paragraph detection heuristics 2. LLM Hallucination in Requirement Extraction Early versions "invented" requirements not in source documents Solution: Strict JSON schema validation + confidence thresholds 3. False Positive Explosion Initial compliance agent flagged 80%+ violations (too strict) Solution: Added lenient prompt engineering with explicit "assume compliant unless obviously wrong" instructions 4. Graph Construction Speed Computing all pairwise similarities for 700 nodes = 245K comparisons Solution: Sparse similarity matrix (only store > 0.75 threshold) 5. Real-time Performance Full compliance check on 50-page protocol took 2+ minutes Solution: Parallel LLM calls (15 paragraphs checked simultaneously)

Accomplishments we're proud of

✅ Extracted 703 structured requirements from a 45-page messy FDA PDF using pure LLM agents ✅ Built a working knowledge graph with 876 edges (validated against expert annotations) ✅ Implemented HippoRAG (NeurIPS 2024) — one of the first production deployments ✅ Achieved <1 second query latency for graph-enhanced retrieval ✅ Created an interactive graph visualization showing regulation relationships in real-time ✅ Validated with domain experts — students from Harvard Medical School, MIT, and Stanford confirmed clinical relevance

What we learned

Technical Insights LLMs are exceptional at structure extraction — Claude 3.5 can reliably parse messy regulatory text into JSON with 95%+ accuracy LLMs are exceptional at structure extraction — Claude 3.5 can reliably parse messy regulatory text into JSON with 95%+ accuracy Graphs >> Pure Vector Search — HippoRAG retrieved 40% more relevant clauses by following semantic relationships Graphs >> Pure Vector Search — HippoRAG retrieved 40% more relevant clauses by following semantic relationships Prompt engineering is everything — Our compliance agent went from 80% false positives to <10% by adding "lenient" instructions Prompt engineering is everything — Our compliance agent went from 80% false positives to <10% by adding "lenient" instructions Domain embeddings aren't always necessary — all-MiniLM-L6-v2 (general-purpose) performed surprisingly well on regulatory text Domain embeddings aren't always necessary — all-MiniLM-L6-v2 (general-purpose) performed surprisingly well on regulatory text Domain Insights Regulatory compliance is a graph problem — Regulations reference each other constantly ("see Part 11", "as defined in §312") Regulatory compliance is a graph problem — Regulations reference each other constantly ("see Part 11", "as defined in §312") Pharma teams trust explainability — Every violation needs a citation back to source regulation (we provide clause IDs) Pharma teams trust explainability — Every violation needs a citation back to source regulation (we provide clause IDs) The real bottleneck is cross-referencing — Manual review isn't slow because of reading, it's slow because of looking up related clauses The real bottleneck is cross-referencing — Manual review isn't slow because of reading, it's slow because of looking up related clauses

What's next

Immediate Roadmap (3 months) [ ] Multi-jurisdiction support — Add EMA, PMDA, TGA regulations [ ] Real-time regulation monitoring — Auto-detect FDA guideline updates via web scraping [ ] Confidence calibration — Fine-tune violation probability scores against labeled dataset [ ] Batch processing — Upload 50 protocols at once for portfolio-wide compliance Long-term Vision (12 months) [ ] Automated amendment generation — LLM agent proposes protocol changes to fix violations [ ] Regulatory change impact analysis — "FDA just updated 21 CFR 11 → 12 of your trials are affected" [ ] CRO/Sponsor integrations — API + SDK for Veeva Vault, Medidata Rave, Oracle Siebel CTMS [ ] Human-in-the-loop audit — Export compliance reports to regulatory affairs teams for review Expansion Opportunities Medical devices — FDA 21 CFR Part 820 (QSR), ISO 13485 Drug manufacturing — FDA 21 CFR Part 211 (cGMP) Preclinical research — GLP compliance (FDA 21 CFR Part 58) Impact Potential For Pharmaceutical Companies Current State: 130-160 days manual compliance review $780M-$960M cost per regulatory change 15-20% error rate With Harmoniq: <1 day automated compliance audit $950M saved per regulatory change <5% error rate (validated against expert review) For the Industry Faster drug approvals → Patients get treatments sooner Reduced regulatory risk → Fewer trial halts due to compliance issues Knowledge democratization → Smaller biotech companies can compete with big pharma Try it out GitHub: Github link Demo: Website link Video: YouTube link Test with sample data: Built With Python · FastAPI · Next.js · TypeScript · Tailwind CSS · Anthropic Claude · ChromaDB · NetworkX · LangChain · HippoRAG · React Flow · Vercel Team We're a team of engineers and researchers passionate about applying AI to high-stakes, real-world problems. Special thanks to the regulatory affairs professionals and clinical research students who validated our approach. Harmoniq — Bringing harmony to clinical trial compliance, one regulation at a time.

Analysis

Compare with all teams

View

Metric

Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.

Technology

Found in codeClaimed only
  • CSSIn code
  • FastAPIIn code
  • JavaScriptIn code
  • Next.jsIn code
  • PythonIn code
  • ReactIn code
  • Tailwind CSSIn code
  • TypeScriptIn code
  • VercelClaimed

8 of 9 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.

AI coding agents

  • CursorConfig

Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.

Codebase size

Source size

283 KB

Source files

38

Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.

0 stars