← Reddit

Used Claude to design the GraphRAG schema for a clinical guidelines voice agent. Here’s what the graph structure ended up looking like.

Reddit · captainkink07 · April 27, 2026
A Gemini voice agent running on Meta Ray-Ban glasses was developed to provide clinical guidance using JRCALC 2022 guidelines, but initial retrieval using naive RAG failed because clinical guidelines are hierarchically structured with nested references between protocols, assessments, contraindications, and flags. Claude was used to design a graph schema with separate node types and typed edges, enabling retrieval to navigate the graph structure rather than perform flat chunk lookups. Claude also assisted in debugging the signal processing pipeline, particularly the harmonic-weighted FFT peak selection algorithm, for the open-source system.

Detailed Analysis

A developer building a hackathon emergency first-aid system deployed Claude to architect a GraphRAG knowledge schema over the JRCALC 2022 clinical guidelines, the standard reference used by UK emergency medical technicians. The system runs on Meta Ray-Ban smart glasses and uses a Gemini voice agent as its front end, targeting real-time clinical decision support in field scenarios. The core engineering problem was that naive retrieval-augmented generation — flat chunk lookup over embedded text — repeatedly failed to surface downstream protocol dependencies. Clinical guidelines are inherently hierarchical and referential: a stroke assessment protocol invokes the FAST checklist, which in turn references medication contraindications, which link to patient history flags. Flat semantic search collapses this dependency chain, returning the top-level node while missing the reasoning scaffolding that gives it clinical meaning.

Claude's contribution was helping design a typed graph schema that formalizes these dependency relationships explicitly. Rather than treating all guideline content as undifferentiated text chunks, the schema distinguishes between node types — protocols, assessments, contraindications, and patient history flags — and connects them via typed directed edges that encode the nature of each relationship. Retrieval then becomes graph traversal rather than vector similarity search, allowing the system to hop from an entry protocol through multiple relationship hops to surface all clinically relevant downstream nodes in a single query pass. This architecture mirrors patterns emerging in the broader clinical GraphRAG literature, where multi-hop reasoning over typed entity-relationship graphs has demonstrated accuracy improvements of roughly 3x compared to standard RAG approaches, with particular gains in reducing hallucination on drug interaction and contraindication queries.

Beyond schema design, Claude played a significant debugging role in the system's remote photoplethysmography (rPPG) signal processing pipeline — specifically the harmonic-weighted FFT peak selection algorithm used to extract vital signs from video captured by the glasses. This component is technically distinct from the NLP/retrieval stack and represents a signal processing challenge: FFT-based heart rate extraction from ambient-light video is sensitive to noise, motion artifact, and harmonic aliasing, and selecting the correct frequency peak requires weighting strategies that balance harmonic consistency against signal amplitude. The developer notes this required several iterative debugging sessions with Claude, suggesting the model was used not just for architecture ideation but as an active collaborator in numerical and signal-processing implementation work.

The project reflects a broader pattern in applied AI development where LLMs like Claude are being used as design partners during the architecture phase of knowledge-intensive retrieval systems, particularly in domains where relationship structure matters as much as semantic content. Clinical guidelines are an especially demanding test case: they are written for expert human readers who implicitly understand cross-reference dependencies, making them poorly suited to chunked embedding approaches that discard structural context. The GraphRAG paradigm addresses this by making relationships first-class citizens of the retrieval index, and the use of an LLM to help define the ontology — deciding which entities deserve node status and which relationships merit typed edges — is a natural application of Claude's capacity for structured domain reasoning. Published research in hepatology decision support and ICD-10 hierarchical retrieval confirms that expert-anchored graph schemas outperform purely automated extraction pipelines, and the JRCALC implementation appears to follow this expert-first design philosophy.

The decision to open-source the full system under MIT license adds meaningful value to the clinical AI tooling ecosystem, particularly given the relative scarcity of working GraphRAG implementations grounded in emergency medicine guidelines. The combination of voice interface, wearable hardware, real-time vital sign extraction, and graph-structured clinical reasoning in a single integrated prototype represents an unusually complete proof-of-concept for AI-assisted pre-hospital care. As wearable compute platforms mature and clinical AI regulation develops, systems of this type — where retrieval fidelity is architecturally enforced through typed knowledge graphs rather than left to probabilistic embedding similarity — are likely to become the baseline expectation for safety-critical medical decision support applications.

Read original article →