From f2abdf15f55113815252e46d5059d50c451e2190 Mon Sep 17 00:00:00 2001 From: Majd Abdallah Date: Sat, 12 Sep 2026 17:25:08 +0200 Subject: [PATCH] Render README flowchart as SVG without oversized viewer controls --- README.md | 22 ++----------- docs/assets/matching-flow.svg | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 docs/assets/matching-flow.svg diff --git a/README.md b/README.md index a0bba563..25425979 100644 --- a/README.md +++ b/README.md @@ -68,26 +68,8 @@ across ranking quality, clinical workflow, agents, and delivery. ## How matching works -```mermaid -flowchart LR - P[Patient input] --> I[Canonical profile\nand summary] - I --> L1[First level\nTrial retrieval + fusion] - L1 --> L2[Second level\nCriterion retrieval] - L2 --> F[Final ranking] - F --> H[JSON + HTML\nHuman review] - I -. optional .-> Q[Query expansion] - Q -.-> L1 - L2 -. optional .-> R[LLM reranking] - R -.-> F - L2 -. optional .-> E[Eligibility assessment\nCoT / RAG stage] - E -.-> F - D[(Local trial +\ncriterion index)] --> L1 - D --> L2 - classDef primary fill:#0f766e,color:#fff,stroke:#14b8a6 - classDef optional fill:#eff6ff,color:#1e3a8a,stroke:#60a5fa,stroke-dasharray:5 4 - class L1,L2,F primary - class Q,R,E optional -``` +Matching flow: patient profile, trial retrieval, criterion retrieval, final ranking, and human review; optional query expansion, reranking, and eligibility assessment + The build path prepares trial records and criterion rows, then indexes them. During matching, first-level retrieval gathers trial candidates across query diff --git a/docs/assets/matching-flow.svg b/docs/assets/matching-flow.svg new file mode 100644 index 00000000..dc02413d --- /dev/null +++ b/docs/assets/matching-flow.svg @@ -0,0 +1,60 @@ + + TrialMatchAI matching flow + Patient input becomes a canonical profile and summary, then passes through first-level trial retrieval, second-level criterion retrieval, final ranking, and JSON/HTML reports for human review. A local index supports both retrieval stages. Optional query expansion feeds trial retrieval; optional LLM reranking and eligibility assessment feed final ranking. + + + + + + + + THE MATCHING PIPELINE + + Core path + + Optional model + + + + + + + + + + + + + + + + + Patient inputCanonical profile + First levelSecond level + Final rankingJSON + HTML + + + Supported formatsPatient summary + Trial retrieval + fusionCriterion retrieval + Ranked shortlistHuman review + Local trial + criterion index + + + + + + + + + + + + + + Query expansion + LLM reranking + Eligibility assessment + CoT / RAG stage + + +