Why?
Literature reviews mostly happen at the paper level: this paper supports X, that one doesn’t. Real disagreements are usually narrower. Two studies can seem to contradict each other until you notice they used different populations or durations. I wanted a tool that compares individual claims and shows its evidence for every judgment.
What I Built
- Ingestion. PDFs are split into sentences, and each sentence gets a stable ID such as
paperA:p3_s12. - Claim extraction. Gemini identifies a few testable findings in each paper, along with study conditions: population, sample size, method, duration and outcome. The model cites sentence IDs rather than quoting text. The code rebuilds every quote from the database and drops claims whose citations don’t belong to that paper.
- Matching and judging. Claim embeddings in pgvector find the nearest claims in other papers. For each candidate pair, the code computes the differences in study conditions, and Gemini assigns one label:
supports,genuine_contradiction,apparent_contradiction,not_comparableorunresolved. A judgment must cite sentences from both papers. Otherwise it falls back to unresolved. - New-paper impact. When a paper is added, a separate pass labels which earlier claims it strengthens, challenges or qualifies, and lists the ones it doesn’t address.
- Interface. A Cytoscape graph puts the question at the center, with papers around it and claims around each paper. Clicking an edge shows both source quotations side by side.
Design Choices
- Quotes come from code, not the model. This removes a whole class of hallucinated citations.
- Conditions inform judgments but don’t decide them. A different population doesn’t automatically make a contradiction “apparent”, and a non-significant result isn’t treated as a refutation.
- Related papers are leads. Papers found through Google Scholar or OpenAlex are suggestions for what to read next, never evidence.
Limitations
The labels are model judgments, not verdicts. A small hand-labeled set of claim pairs (eval/gold_pairs.json) measures agreement, but it is far from a full evaluation.