Abstract
Generative AI can encode substantial medical knowledge, but patient-specific answers remain constrained by the context supplied at inference time. Electronic health records and FHIR support documentation and interoperability, but they do not by themselves define the complete, current, and auditable context a model should receive. Similarity-based retrieval can find related text, but it neither guarantees collection of clinically connected records nor makes omissions explicit.
We introduce MedBeads, an AI-facing clinical record substrate that assembles a declared closure of longitudinal patient information before generation. A Bead is an immutable clinical or knowledge object identified by SHA-256 over canonical content and stored as an append-only frame in a patient-scoped Pod. Structural parent edges form a patient-rooted Merkle DAG. Typed clinical links occupy a separate, reconstructable interpretation layer derived from signed, versioned knowledge rules; they can be recomputed when knowledge changes without rewriting clinical facts. Retrieval follows authorized structural and clinical edges, resolves amendments and retractions, and reports policy or token truncation.
An open-source Go implementation uses append-only Pods and reconstructable SQLite projections. File-based conversion of 1,135 synthetic Synthea FHIR bundles produced approximately one million Beads and demonstrated deterministic clinical-link derivation and interpretation-layer reconstruction. These engineering results establish feasibility and reproducibility, not reduced hallucination or improved clinical outcomes. MedBeads reframes grounding as a data-structure problem by delivering a policy-bounded, provenance-bearing clinical subgraph rather than an opaque list of similar fragments.
Blogger's Review: The design of MedBeads is innovative, especially in combining data structures with clinical information, providing a new approach to address the context limitations faced by generative AI. By utilizing immutable objects and reconstructable links, MedBeads not only enhances data traceability but also offers more reliable support for clinical decision-making. Its open-source implementation also lays a foundation for further exploration by researchers.