CiteMD

CiteMD answers clinical research questions from published medical literature and shows its work. Every claim carries a citation to the passage it came from, and when the evidence is too thin it declines to answer instead of guessing.

1Retrieve

Dense vector search plus keyword search over a PubMed index, fused and reranked to pull the most relevant abstracts.

2Answer

A language model writes the answer using only those passages, with an inline citation on every claim.

3Abstain

A confidence gate declines the least-supported questions instead of risking a confident wrong answer.

4Serve

Generation runs through KVGate, and self-hosted through vLLM with LMCache, which offloads the GPU KV cache under memory pressure.

The Serving Path tab reports measured latency and throughput from KVGate and LMCache. The Evaluation tab reports accuracy, calibration, and abstention with confidence intervals. Pick an example below to see a grounded answer with its supporting spans.

example question

Does regular low-dose aspirin use reduce the long-term risk of colorectal cancer?

decision
A · yes
retrieval
hybrid + rerank
gold source
retrieved · rank 1
conf0.86

Yes. In a long-term follow-up of randomized trials, regular low-dose aspirin was associated with a reduced incidence of colorectal cancer, with the benefit emerging after about ten years of follow-up [1]. A pooled cohort analysis reported a similar direction of effect, though absolute risk reduction was modest [2].

Both cited passages report a reduction in colorectal cancer incidence with sustained low-dose aspirin use.

gateway KVGateprovider anthropicmodel claude-haiku-4-5cache misslatency 934 mscost $0.0022
retrieved evidence · top 5
[1]Long-term effect of aspirin on colorectal cancer incidence and mortality
4.90
pmid:20970847· Results· cited

In a pooled analysis of randomized trials with long-term follow-up, allocation to aspirin reduced the 20-year risk of colorectal cancer. The reduction became apparent only after approximately ten years and was consistent across trial populations.

[2]Aspirin use and risk of colorectal cancer in a prospective cohort
3.10
pmid:21144578· Results· cited

Regular aspirin use was associated with a lower incidence of colorectal cancer in this prospective cohort, although the absolute risk difference was small and confined to longer durations of use.

[3]Aspirin and gastrointestinal bleeding risk
1.20
pmid:19910909· Discussion

Long-term aspirin use carries an increased risk of upper gastrointestinal bleeding, which must be weighed against any chemopreventive benefit.

[4]NSAID use and adenoma recurrence
0.90
pmid:18443021· Results

Non-aspirin NSAIDs reduced adenoma recurrence in a randomized prevention trial but were limited by cardiovascular adverse events.

[5]Screening colonoscopy and colorectal cancer mortality
0.70
pmid:22321896· Results

Screening colonoscopy was associated with reduced colorectal cancer mortality in a large observational study.

how it works

Architecture and stack

1

Ingest and index

PubMed abstracts are parsed, chunked, and embedded on CPU, then stored in Postgres with pgvector for dense search and full-text BM25 for keywords.

2

Retrieve and read

A question hits both indexes, fused with Reciprocal Rank Fusion and reranked by a cross-encoder. A model writes the answer from those passages with a citation on every claim.

3

Abstain

A confidence gate declines the least-supported questions instead of guessing, so a wrong-but-confident answer is turned into a measured abstention.

4

Serve and evaluate

Generation runs through KVGate to a provider or to self-hosted vLLM with LMCache. MIRAGE questions score accuracy, calibration, faithfulness, and risk-coverage.

PythonPostgrespgvectorBGE embeddingsbge-rerankerClaude Haiku 4.5KVGatevLLMLMCacheRedisFastAPINext.jsTypeScriptDockerGitHub Actions

Open source and reproducible

CiteMD is an open-source clinical-evidence RAG with a full evaluation harness. Every number on this site is measured and reproducible from the commands in the repository. Built by Rishika Vaish.