MedFlowEvidence-Grounded Medical AI Judge Mode
Medical RAG • Thyroid Domain • Evidence First

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.

11Clinical PDFs
204Processed pages
1,470Frozen chunks
Top‑4Retrieval window
Generation Groq • GPT‑OSS‑120B Structured evidence-only synthesis
Retrieval BGE‑small • ChromaDB 200 tokens • Top‑K 4
01 • THE IDEA

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.

Evidence → Generation → Verification
Typical RAG
RetrieveGenerateDisplay

Fluent output can still contain unsupported claims, wrong context, fabricated numbers, or unsafe medical advice.

MedFlow
RetrieveGenerateVerify claimsCheck numbersResolve citationsAnswer / Caution / Abstain

The final response is the result of a system decision — not just the model's confidence or wording.

02 • END‑TO‑END SYSTEM

From PDF evidence to a verified answer.

The frozen benchmark core is deliberately simple, measurable, and traceable.

01
Curated thyroid evidence

Guidelines and educational references are the source of truth. Every downstream step preserves document, page, section, and chunk provenance.

TraceabilityControlled corpusPage metadata
03 • PRODUCT WORKSPACE

One workspace. Six ways to inspect the evidence.

The interface translates the RAG backend into clinical workflows the committee can understand immediately.

01

RAG Chat

Ask thyroid questions and receive source-grounded answers with inspectable evidence.

02

Knowledge Base

Structured thyroid condition summaries designed for fast clinical navigation.

03

Disease Matrix

Compare thyroid states side by side across biomarkers, symptoms, causes, and management.

04

Lab Interpreter

Context-aware thyroid lab workflows for functioning, post-thyroidectomy, and congenital states.

05

PDF Search

Inspect retrieved passages, pages, chunk IDs, and source context instead of trusting a black box.

06

Architecture View

Expose the system flow visually so judges can understand how retrieval and grounding connect.

Transparency note: UI screenshots include development-stage product counters and architecture explorations. The benchmark figures on this portfolio use the frozen evaluated retrieval configuration below.
04 • MEASURED, NOT ASSUMED

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.

Canonical retrieval 53.12%

Precision@4

Strict source + expected passage/page relevance.

Coverage87.50%

Hit@4

At least one relevant chunk within the Top‑4 retrieval window.

Ranking0.7031

MRR

Relevant evidence tends to surface early in the ranking.

Live Day 37 / 7

Grounded tests

Real Groq generation with structured citations and abstention cases.

Why these choices?

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.
Day 1 baseline P@329.17%
Optimized chunking P@358.33%
Final strict P@453.12%
Document-level P@485.94%
Safety generalization

We preserved the failures instead of hiding them.

Failure-driven engineering
Development before fixes21 / 2875.0%
Development regression17 / 2860.7%
Held-out first run2 / 1513.3%
Held-out regression8 / 1553.3%

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.

05 • SAFETY BY DESIGN

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.

ALLOWED

General evidence request

In-domain thyroid questions proceed to retrieval and grounded generation.

NEEDS_CAUTION

Patient-specific context

The system can provide evidence-grounded information without pretending to diagnose or prescribe for an individual.

REFUSE / REDIRECT

Unsafe or out-of-scope

Personalized unsupported dosing, prompt injection, emergencies, and clear non-thyroid requests can be intercepted locally.

VERIFY
Citation IDs Claim support Numbers & units Evidence gate
Independent checks

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.

SUPPORTEDUNSUPPORTEDREVIEW_REQUIRED
06 • PRODUCT DEMO

See the clinical workspace in action.

Click any frame to inspect a full-size product screen.

MedFlow home dashboard
medflow / product workspace
Home / Project Overview
07 • NEXT

Where MedFlow goes next.

The roadmap focuses on better retrieval precision, stronger generalization, and clinician-facing validation — not feature bloat.

01

Hybrid Retrieval V2

Evaluate dense BGE + BM25 + RRF against the frozen baseline using the same ground truth.

02

Hierarchical Retrieval

Retrieve precise child chunks, then expand parent or neighboring context for generation.

03

Held‑Out V2

Freeze a brand-new adversarial benchmark before execution to measure safety generalization honestly.

04

Clinical Review Layer

Add approve, edit, flag, and escalate workflows for expert adjudication and governance.

The five-person MedFlow team at Creativa Egypt
MEDFLOW TEAM • CREATIVA From research to retrieval, grounded generation, safety, and demo.
08 • THE TEAM

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.

AEAdham Elsayed
NKNada Khatabb
NANourhan Adel
MEMagdy Elbassiouny
SHSandy Hisham
The one sentence to remember

Can the system prove that the answer is supported?

That question — not “can the LLM answer?” — is the foundation of MedFlow.

Back to top ↑