The Problem

Every year, hundreds of thousands of ACL surgeries are performed — yet incomplete rehabilitation remains the leading driver of re-injury, with rates between 15–25%. In large integrated health systems like Kaiser Permanente, patients who receive care across multiple locations frequently encounter inconsistent rehabilitation protocols and fragmented documentation. No single clinician has the full picture.

Daniel Lee — our demo patient — had ACL reconstruction twice at two different Kaiser locations and walked away from both without a complete recovery plan. Not because his providers didn't care, but because his imaging, rehabilitation history, and insurance policy lived in three separate silos that no one had time to connect.

This is the last-mile problem in healthcare AI: not a lack of intelligence, but a lack of coordination.


What We Built

RehabCompass is a multi-agent clinical decision support system built on the Prompt Opinion platform. It coordinates three specialized agents to synthesize fragmented healthcare evidence into one explainable recovery workflow — in under two minutes.

Agent Architecture

Agent Role
Clinical Agent Analyzes patient data, imaging (MRI), and clinical notes to identify root causes of instability
Insurance Agent Retrieves and reasons over Kaiser Permanente rehabilitation policy via RAG to assess coverage eligibility
Orchestrator Agent Coordinates both agents, reconciles conflicts, and generates a structured authorization recommendation

The system produces a tiered output:

  • Overall status: Candidate for additional supervised PT / Pending documentation
  • Coverage review: PT benefit available, no preauthorization required, documentation gaps flagged
  • Structured report: Clinical evidence + insurance findings + next steps, ready for provider review

How We Built It

Insurance Policy Retrieval (RAG Pipeline)

Kaiser Permanente rehabilitation policies are spread across dozens of pages and PDFs. We built a domain-aware retrieval system to make policy requirements actionable:

  1. Domain-filtered web crawling across Kaiser WA provider manual URLs, with page-level relevance checks before chunking — preventing off-topic content from polluting the retrieval corpus
  2. Chunking + hybrid semantic search using sentence-transformers/all-MiniLM-L6-v2 for embeddings, combined with domain-specific keyword scoring to surface relevant policy clauses
  3. JSONL snippet store for persistent, lightweight policy chunk storage with pre-computed embeddings
  4. Multi-signal ranking at inference time — cosine similarity (20%) + domain keyword boost (80%) — ensuring clinically-relevant policy rules surface first

Agent Orchestration

Three specialized agents run in sequence, each handling a distinct part of the authorization decision:

  • Clinical Agent: Analyzes patient history, PT assessments, and imaging to determine clinical PT need
  • Insurance Agent: Retrieves relevant policy clauses via RAG, matches clinical evidence against coverage requirements
  • Orchestrator: Detects clinical-insurance conflicts, generates actionable workflow with blocking requirements, dependency chains, and handoff packets for care coordinators
  • All agents use structured JSON output with confidence grading, evidence attribution, and requirement tracking (satisfied / unsatisfied / unknown)

LLM Backend & Deployment

We used Claude Opus 4.6 for structured reasoning and JSON-compliant output generation across all agents. The system is integrated with the Prompt Opinion Marketplace via JSON-RPC 2.0 A2A (Agent-to-Agent) protocol v0.3.0, and deployed on Hugging Face Spaces for scalable, serverless execution.


Challenges We Faced

  • Duplicate policy chunks from crawling: Seed URLs were being fetched twice — once as explicit seeds and once as discovered child links. Fixed by pre-populating the visited set before the crawl begins.
  • Cold-start latency on Prompt Opinion: Sequential agent calls (Clinical → Insurance → Orchestrator) caused timeout on the platform. Resolved by pre-warming embeddings at startup and optimizing policy retrieval to avoid redundant re-fetching.
  • Semantic vs. lexical mismatch in policy retrieval: Initial pure embedding-based retrieval surfaced off-topic clauses (e.g., "emergency services" when querying PT visits). Fixed by introducing domain keyword scoring that heavily weights policy-specific signals (visit limits, copays, network requirements) over generic embeddings.
  • Clinical nuance in authorization logic: The demo case required distinguishing incomplete adherence due to relocation from intentional non-compliance — a nuance that rule-based systems cannot handle and that significantly impacts insurance justification.

What We Learned

  • Retrieval quality is upstream of reasoning — domain filtering before chunking produces dramatically better results than post-hoc filtering, and hybrid scoring (embeddings + keywords) beats pure semantic search in regulated domains
  • A2A coordination requires strict schema design — JSON output contracts at agent boundaries are more critical than prompt quality; agents downstream depend on predictable, well-documented schemas
  • Confidence and evidence trails are non-negotiable — healthcare requires full traceability; every recommendation includes confidence (HIGH / MEDIUM / LOW) and source attribution so care coordinators can verify reasoning
  • Orchestration complexity lives in conflict resolution — the hardest part is not individual agent logic but detecting clinical-insurance mismatches and determining when escalation to human review is necessary
  • Marketplace integration simplifies go-to-market — Prompt Opinion's platform abstracts the hardest parts of agent networking and care coordinator UX, letting us focus purely on clinical and insurance reasoning

Built With

Share this project:

Updates

Submission history