Inspiration
Researchers at well-funded institutions can open almost any paper. Scholars at under-funded institutions often can't. Their universities can't afford journal subscriptions, so they build their literature knowledge from free and open-access papers. That means hunting across the internet, one reference at a time, for a legal free copy that may or may not exist: preprint servers, institutional repositories, author pages, PubMed Central. This is slow, repetitive work that has nothing to do with the research itself.
Understanding a paper also depends on the works it cites. Without those, a student reads the paper with half the context missing.
We built Paper Trail to take over that searching, so students can spend their time on understanding.
What it does
Paper Trail is a GraphRAG application. You give it a research paper, and it:
- Finds the paper's references and looks up where each one can be read for free and legally.
- Downloads every free copy it finds and indexes the full text.
- Falls back to the abstract when no free copy exists, so every reference still contributes something, and the answer says which kind of source it used.
- Answers your questions from the main paper and its references together, with numbered citations that link back to the open copy. A student can ask "why did earlier models struggle with long sentences?" and get an answer that draws on the cited work, not just the paper alone.
It never bypasses paywalls. It only uses copies that are openly available.
How we built it
- A zero-dependency Node.js server that binds only to
127.0.0.1, with a plain JavaScript front end styled as a reading-room journal. PDF.js parses PDFs in the browser. - GraphRAG retrieval: the paper is the seed node and its references are linked nodes. We embed passages, rank by cosine similarity plus a lexical signal, rerank the top 30, then expand through the citation graph before answering.
- Free OpenRouter models for embeddings, reranking and answers, or any OpenAI-compatible endpoint, including local Ollama. If no embeddings are available, it falls back to lexical ranking.
- Paper text stays in tab memory and is never written to disk. Only reference titles and DOIs go to the scholarly APIs. ## Challenges we ran into
- Reference parsing across messy bibliography layouts.
- Matching citations to the right record when providers disagree, and showing match confidence honestly.
- Unstable repository links and publisher anti-bot pages, so every download has retry and fallback locations.
- Free-model rate limits and outages. Embedding models fall back in order, and we re-embed whenever the model changes so vectors from different models are never mixed.
Accomplishments that we're proud of
A two-minute flow from a sample paper to a cited, grounded answer, with no npm install and no paywall bypassing.
What we learned
Open access is patchy. Good retrieval depends as much on honest labeling of what you actually have (full text or abstract only) as on the model.
What's next for Paper Trail
OCR for scanned PDFs, a deeper multi-hop literature graph beyond direct references, and manual correction of citation matches.