Paper Pal
Chat with any arXiv paper. Every answer cites the page it came from, so you can check it instead of trusting it.
- Stack
- Python · FastAPI · pgvector · PyMuPDF
- Built
- Jun – Aug 2026
- License
- MIT
$ paperpal load 2310.06825 ✓ 9 pages · 214 chunks · indexed in 6.1s $ paperpal ask "what is sliding window attention?" Each token attends only to the previous W tokens (W = 4096) instead of the whole sequence. Stacking layers still lets information travel further than W. [p.2] It cuts attention cost from quadratic to linear in sequence length. [p.4]
> cat story.md
The story in three panels
-
The problem
Chatbots summarize papers confidently and sometimes wrongly. You can't tell which sentences are real without reading the paper yourself, which defeats the point.
-
The build
Split the PDF into chunks tagged with page numbers, retrieve the best ones for each question, and force the model to cite a page for every claim it makes.
-
The result
Answers you can check in one click. On our test set, correct answers went from 61% to 84%, and every claim now points to a page.
> tree ./architecture
How it works
Two pipelines. One runs once per paper, the other runs for every question.
> python eval.py
Results
120 hand-written questions across 10 papers, each graded against the paper by a human.
| Version | Correct answers | Answers with a valid citation |
|---|---|---|
| Plain RAG, fixed 1,000-char chunks | 61% | 48% |
| + cross-encoder reranker | 78% | 71% |
| + page-aware chunks, "cite or refuse" prompt | 84% | 97% |