NSCLC Navigator

Deterministic Evidence Engine

MIT User

MIT Student Class

MIT

MIT Cancer Navigator

A transparent evidence engine for NSCLC treatment navigation, designed to show exactly where deterministic safety leads and where hybrid AI can genuinely help.

The Problem

Current LLM-heavy clinical tools often look impressive right up until you ask what exactly drove the answer. In highly structured oncological settings, hallucinations, non-deterministic outputs, and missing provenance are not cute product quirks. They are trust failures.

Our Approach

Deterministic scoring

Evidence is scored against strict parameters like methodology, robustness, recency, and credibility, so ranking remains inspectable instead of vibe-based.

Guideline mapping

Retrieved evidence is mapped against curated ESMO topics, making alignment, conflict, and silence visible as explicit labels rather than hidden prompt behavior.

Maximum explainability

The interface shows what was retrieved, why it matched, and where uncertainty remains, so the demo can be audited instead of merely admired.

How We Use AI

Transparent AI posture

Deterministic gives us safety and auditability. Hybrid gives us lift, but it does not get to cosplay as magic.

That is the whole point of this demo posture. We want MIT to see where the rules engine is intentionally strict, where hybrid retrieval materially improves recall, and where the limits still are. If the semantic path helps, we show it. If it does not move the decision layer enough, we show that too.

Deterministic runtime

This is the safety rail. Deterministic logic owns cohort matching, ERS ranking, guideline mapping, label assignment, and visible uncertainty handling.

Hybrid semantic lab

This is the lift engine. It uses embeddings, dense plus sparse retrieval, and hybrid search to find better candidates, then hands them back to deterministic guardrails.

Engine one

Deterministic

Built for consistency, traceability, and explainable failure. It is deliberately strict because the safer failure mode in this domain is visible limitation, not smooth improvisation.

Safety railAuditabilityRepeatable outputsPrimary demo authority
Engine two

Hybrid + embeddings

Built to improve recall when structured metadata is sparse, patient-fit signals are thin, or topic matching needs semantic help. It is valuable exactly because it is bounded.

Qdrant hybrid searchDense + sparse vectorsSemantic rescueNot a free-form decision maker
End-to-end flow
01

Normalize the case first

We turn the patient profile into explicit fields like disease setting, histology, therapy line, and biomarker buckets before any retrieval starts.

02

Run deterministic cohort matching

The rules engine screens out studies that do not fit the actual patient cohort, which keeps obviously off-target papers out of the main path.

03

Layer in hybrid retrieval where it helps

A second engine can use dense embeddings, sparse vectors, and hybrid search to recover relevant evidence when structured metadata is incomplete or too generic.

04

Fuse retrieval back into guardrails

Hybrid candidates are merged back into deterministic ranking and guideline logic, so semantic lift is constrained by explicit safety rails instead of replacing them.

05

Escalate uncertainty instead of bluffing

If a study is ambiguous, weakly typed, or still not patient-fit, it stays visible as uncertainty or manual review instead of being turned into fake confidence.

Full stack in plain English
Safety core

Deterministic engine

Typed patient schema, deterministic cohort matching, ERS ranking, and guideline labeling remain the source of truth for the clinical-facing result.

Structured vignette schemaERS scoringConfusion matrixFalse negativesGuideline mappingManual review lane
Recall engine

Hybrid retrieval engine

A separate hybrid path can widen candidate recall and semantic topic matching, but it still feeds back into deterministic decision logic instead of bypassing it.

Dense retrievalSparse retrievalHybrid searchSemantic rescue
Vector store

Qdrant Cloud

Our external vector backend stores the hybrid retrieval index for chunk-level search across PubMed evidence and ESMO guideline projections.

QdrantCosineDense fieldSparse fieldChunk index
Embeddings

OpenRouter + text-embedding-3-small

The live semantic path uses OpenRouter to generate OpenAI `text-embedding-3-small` vectors. That gives us real embeddings without pretending embeddings are the whole product.

OpenRouterOpenAI embeddingstext-embedding-3-small1536-d dense vectors
Retrieval policy

Hybrid rank fusion

Dense and sparse results are combined through rank-fusion logic rather than raw-score magic, which makes the merge safer and easier to reason about.

Dense + sparseRRFTop-K controlsAudit-friendly merge
Runtime data

Supabase Postgres

Imported evidence, guideline topics, semantic metadata, and operational state live in Postgres so the demo runs on tracked runtime data rather than invisible temp files.

SupabasePostgresImport batchesRuntime corpus
App shell

Codex + Next.js + FastAPI on Vercel

AI Engeneered with Codex, The interface is a Next.js app and the backend is FastAPI, both deployed on Vercel so the web demo and API stay aligned as one inspectable system.

GPT-5.4Next.js 15React 19FastAPIVercel
Optional, not authority

Gemini Assistive LLM hooks

We keep optional import-assist and grounded explainability hooks as explicit toggles, but they are not the decision authority and should never be confused with the core engine.

Gemini 2.5 FlashAssistive onlyGrounded summariesNo GPT doctor cosplay
Demo honesty note

We are not presenting a magical all-knowing oncology copilot. We are presenting a transparent system with two engines: one that is deliberately deterministic because trust matters, and one that is deliberately hybrid because retrieval breadth matters. When hybrid improves the result, great. When it only improves candidate recall and not the final label, we say that out loud too.

Build journey

This is the honest build order. We did not begin with a magic copilot. We began with deterministic rules, tiny test packs, structured cleanup, and only later earned the right to add hybrid retrieval and assistive layers.

Phase 01

Deterministic Python core

The first real product move was not chat. It was deterministic validation, typed rules, and a safety-oriented core that could be audited study by study.

Python rulesValidation harnessSafety-firstAuditability
Phase 02

Tiny evaluation packs

This gave us a sane sandbox: roughly 10 to 15 patient vignettes and a tiny bundle of papers and guideline examples, small enough to inspect manually and break on purpose.

Seed vignettesStarter PubMedStarter ESMOManual inspection
Phase 03

Data sanitation and structuring

That meant normalizing fields, enforcing shaped records, and treating missing metadata as an explicit problem rather than a silent shrug.

NormalizationStructured fieldsSanitationCanonical shapes
Phase 04

Shared clinical vocabulary

This is where we learned that a deterministic system can still fail for semantic reasons when tags like `egfr-tki`, `tki`, and `targeted` mean the same thing to humans but not to machines.

Ontology alignmentHistology mappingTag translationCross-source semantics
Phase 05

Next.js + FastAPI on Vercel

This is where the demo became a product surface: Next.js on the front, FastAPI behind it, both deployed on Vercel so the flow could be exercised live.

Next.jsFastAPIVercelLive demo surface
Phase 06

Deterministic runtime online

This phase matters because it locked in the central promise: the online demo should be inspectable, repeatable, and willing to show uncertainty instead of bluffing.

ERSCohort matchingGuideline labelsManual review
Phase 07

Hybrid retrieval and vector infra

The semantic path grew in stages: semantic chunk storage, external vector search, dense plus sparse retrieval, rank fusion, and rescue back into deterministic decision logic.

Supabase PostgresQdrantOpenRouterHybrid search
Phase 08

Assistive LLM hooks

This keeps the story honest. We can use an assistive LLM layer where it adds ergonomics, but it does not get to impersonate the deterministic engine or rewrite the evidence contract.

Gemini assistive hooksGrounded summariesOptional layerNot decision authority

Contributors

MIT AIML - Group 3:
BUNDYRA, WIDMER, ESPELAND, LEŚNIEWSKI, RIEKEN, THEIS.

Designed to demonstrate how a mission-critical evidence navigator can be honest about both its strengths and its limits.