Fluent output can still contain unsupported claims, wrong context, fabricated numbers, or unsafe medical advice.
Clinical AI that can show its work.
MedFlow is a thyroid-focused clinical RAG system that retrieves evidence first, generates second, then validates claims, citations, numbers, and safety before a response is returned.
The model draft is not the final answer.
Most basic RAG demos stop at retrieve → generate. MedFlow adds a verification layer that changes the LLM from the authority into a controlled component inside an auditable clinical pipeline.
The final response is the result of a system decision — not just the model's confidence or wording.
From PDF evidence to a verified answer.
The frozen benchmark core is deliberately simple, measurable, and traceable.
Guidelines and educational references are the source of truth. Every downstream step preserves document, page, section, and chunk provenance.
One workspace. Six ways to inspect the evidence.
The interface translates the RAG backend into clinical workflows the committee can understand immediately.
RAG Chat
Ask thyroid questions and receive source-grounded answers with inspectable evidence.
Knowledge Base
Structured thyroid condition summaries designed for fast clinical navigation.
Disease Matrix
Compare thyroid states side by side across biomarkers, symptoms, causes, and management.
Lab Interpreter
Context-aware thyroid lab workflows for functioning, post-thyroidectomy, and congenital states.
PDF Search
Inspect retrieved passages, pages, chunk IDs, and source context instead of trusting a black box.
Architecture View
Expose the system flow visually so judges can understand how retrieval and grounding connect.
The numbers tell the engineering story.
Metrics are separated by what they actually measure. Retrieval quality is not medical accuracy; automated faithfulness is not clinician validation.
Precision@4
Strict source + expected passage/page relevance.
Hit@4
At least one relevant chunk within the Top‑4 retrieval window.
MRR
Relevant evidence tends to surface early in the ranking.
Grounded tests
Real Groq generation with structured citations and abstention cases.
Every major retrieval component was benchmarked.
- BGE-small selected for stronger Hit@1 and MRR while staying practical on CPU.
- 200-token chunks selected for focused passage retrieval.
- Top‑K 4 selected because K=5 added noise without extra coverage.
- Cross-encoder reranker rejected because the tested variant was slower and worse.
We preserved the failures instead of hiding them.
The same held-out set is labelled regression after the first run. The next unbiased validation step is a newly frozen Held-Out V2. This makes the evaluation history honest and defensible.
Safety is a pipeline, not a disclaimer.
MedFlow can refuse before an LLM call, downgrade an answer when evidence is partial, or reject generated claims that cannot be supported.
General evidence request
In-domain thyroid questions proceed to retrieval and grounded generation.
Patient-specific context
The system can provide evidence-grounded information without pretending to diagnose or prescribe for an individual.
Unsafe or out-of-scope
Personalized unsupported dosing, prompt injection, emergencies, and clear non-thyroid requests can be intercepted locally.
Valid citation ≠ supported claim.
The validator separates citation ID validity, metadata resolution, claim-to-evidence support, and numeric consistency. Ambiguous claims can be marked REVIEW_REQUIRED instead of being forced into a pass.
See the clinical workspace in action.
Click any frame to inspect a full-size product screen.
Where MedFlow goes next.
The roadmap focuses on better retrieval precision, stronger generalization, and clinician-facing validation — not feature bloat.
Hybrid Retrieval V2
Evaluate dense BGE + BM25 + RRF against the frozen baseline using the same ground truth.
Hierarchical Retrieval
Retrieve precise child chunks, then expand parent or neighboring context for generation.
Held‑Out V2
Freeze a brand-new adversarial benchmark before execution to measure safety generalization honestly.
Clinical Review Layer
Add approve, edit, flag, and escalate workflows for expert adjudication and governance.
Five people. One evidence-first system.
The team behind MedFlow — taking the project from medical-source research and retrieval benchmarking to grounded generation, independent safety evaluation, and the final product experience.
Can the system prove that the answer is supported?
That question — not “can the LLM answer?” — is the foundation of MedFlow.