● livePDFs · notes · web pages·GPLv3

Ask your whole library. See where it disagrees.

A private knowledge base for your PDFs, notes and saved articles. Ask a question and get one answer drawn from all of them, with every passage cited, and a warning when two of your documents say things that can't both be true.

Demo password: demo1234. The demo runs on free hosting, so the first visit can take a minute to wake up.

The X factor

Many documents, one answer, and the disagreements.

Single-PDF chat is solved. Papertrail searches dozens of documents of different kinds together, and checks whether they contradict each other.

⌕

Across everything

30 candidate passages from the whole library, a cross-encoder re-ranks them, and at most three per document go to the model, so one long document can't crowd out the rest.

⚠

Conflict cards

Passages from different documents about the same thing are paired up and checked in one model call. "Your notes say 2015; Wikipedia says 2020" shows up with both sides.

Every claim cited

Answers stream in with [n] citations. Click one to see the passage, then open it highlighted in its document, on the PDF page itself for PDFs.

Preview

What it looks like

An answer drawn from four documents with the passages behind it, a PDF page with the cited passage boxed, and the library with collections.

Ask
An answer citing passages from four documents, with the sources listed beside it
Cited passage, in place
A PDF page with the cited passage highlighted
Library
Library of documents grouped into collections
Under the hood

Key concepts & stack

React 19TypeScriptViteFastAPISSESQLAlchemyPostgreSQLpgvectorChromaLangChainfastembedGroqPyMuPDFpytestVitest

Calibrated cut-off

With the local embedding model, on a 55-document test library, covered questions scored 0.766–0.859 and uncovered ones 0.466–0.621. Below the cut-off in that gap, the model isn't called at all.

Cheap conflict check

Pairs are pre-filtered without a model: different documents, similar enough, at least one side cited, one pair per two documents. Then one JSON call.

Topic mode

"What do I know about attention?" isn't a question, so it pulls more passages and writes a grouped summary of what your documents say.

Add anything

PDFs, Markdown and text files, web pages by URL, or notes written in the app. Indexing runs in the background.

Two storage setups

Locally: Chroma on disk and local ONNX embeddings, no key needed. On a small host (like this demo): pgvector in Postgres, an embeddings API and no re-ranker.

History with permalinks

Every question is saved with its answer, sources and conflicts.

Run it

Run your own

Docker Compose runs Postgres, the API and the app. Embeddings and re-ranking run locally, so only the answer model needs a key.

Docker

  1. 1
    Clone and start it with a Groq key (free tier):
    git clone https://github.com/akshatgcodes/Papertrail
    cd Papertrail
    GROQ_API_KEY=... docker compose up --build
  2. 2
    Open it (password papertrail):
    http://localhost:5173