+4
日增长
9,604
stars
956
forks
61
watchers
913
prs
385
issues
169
releases
README
PaperQA2
!License
!PyPI Python Versions
PaperQA2 is a package for doing high-accuracy retrieval augmented generation (RAG) on PDFs, text files, Microsoft Office documents, and source code files,
with a focus on the scientific literature.
See our recent 2024 paper
to see examples of PaperQA2's superhuman performance in scientific tasks like
question answering, summarization, and contradiction detection.
---
Table of Contents
- Quickstart
- Example Output
- What is PaperQA2
- PaperQA2 vs PaperQA
- PaperQA2 Goes CalVer in December 2025
- What's New in Version 5 (aka PaperQA2)?
- What's New in December 2025?
- PaperQA2 Algorithm
- Installation
- CLI Usage
- Bundled Settings
- Rate Limits
- Library Usage
- Agentic Adding/Querying Documents
- Manual (No Agent) Adding/Querying Documents
- Async
- Choosing Model
- Locally Hosted
- Embedding Model
- Specifying the Embedding Model
- Local Embedding Models (Sentence Transformers)
- Adjusting number of sources
- Using Code or HTML
- Multimodal Support
- Using External DB/Vector DB and Caching
- Creating Index
- Manifest Files
- Reusing Index
- Using Clients Directly
- Settings Cheatsheet
- Where do I get papers?
- Callbacks
- Caching Embeddings
- Customizing Prompts
- Pre and Post Prompts
- FAQ
- How come I get different results than your papers?
- How is this different from LlamaIndex or LangChain?
- Can I save or load?
- Reproduction
- Citation
---
Quickstart
In this example we take a folder of research paper PDFs,
magically get their metadata - including citation counts with a retraction check,
then parse and cache PDFs into a full-text search index,
and finally answer the user question with an LLM agent.
bash
pip install paper-qa
mkdir my_papers
curl -o my_papers/PaperQA2.pdf https://arxiv.org/pdf/2409.13740
cd my_papers
pqa ask 'What is PaperQA2?'
Example Output
Question: Has anyone designed neural networks that compute with proteins or DNA?
The claim that neural networks have been designed to compute with DNA is supported by multiple sources.
The work by Qian, Winfree, and Bruck demonstrates the use of DNA strand displacement cascades
to construct neural network components, such as artificial neurons and associative memories,
using a DNA-based system (Qian2011Neural pages 1-2, Qian2011Neural pages 15-16, Qian2011Neural pages 54-56).
This research includes the implementation of a 3-bit XOR gate and a four-neuron Hopfield associative memory,
showcasing the potential of DNA for neural network computation.
Additionally, the application of deep learning techniques to genomics,
which involves computing with DNA sequences, is well-documented.
Studies have applied convolutional neural networks (CNNs) to predict genomic features such as
transcription factor binding and DNA accessibility (Eraslan2019Deep pages 4-5, Eraslan2019Deep pages 5-6).
These models leverage DNA sequences as input data,
effectively using nTop issues
#1321Article file indexing not working with local model17 comments · 2026-03-26#861Use a manifest file for indexing but paper-qa still uses LLM during indexing.17 comments · 2025-02-12#667Paper QA Settings for AWS Bedrock12 comments · 2024-11-05#1068Error Parsing PDF11 comments · 2025-08-20#721save and import embeddings for faster answer generation10 comments · 2024-11-26#450Missing question error when using liteLLM models10 comments · 2024-09-21#573Increasing answer length9 comments · 2024-10-11#558Setting up a local embedding model served by a llamafile.9 comments · 2024-10-10
Discussions
#1363PaperQA has a sourced record in the USASI catalog (optional badge)0 comments · 2026-10-13#1360Putting a dollar cap on one PaperQA question0 comments · 2026-10-03#1323Which PaperQA capabilities are most worth exposing in a simple UI?2 comments · 2026-04-03#1322paper-qa is listed on Shypd — AI Tool Directory0 comments · 2026-03-30#1270Citation graph traversal0 comments · 2026-01-21#1245Configuring local models served by llama.cpp for paperqa3 comments · 2025-12-18#1236Add option to use local Nemotron instance1 comments · 2025-12-13#1211When will PaperQA 3 be open-sourced?1 comments · 2025-11-19
Latest release
v2026.08.12 v2026.08.12 2026-08-12What's Changed Pulled in PyMuPDF typing fix by @jamesbraza in https://github.com/Future-House/paper-qa/pull/1320 Update j178/prek-action action to v2 by @renovate[bot] in https://github.com/Future-House/paper-qa/pull/1332 Update astral-sh/setup-uv action to v8 by @renovate[bot] in https://github.com/Future-House/paper-qa/pull/1331 Add NemotronParseBBox.to_original_coordinates for raw nemotron-parse output by @jamesbraza in https://github.com/Future-House/paper-qa/pull/1335 Remove duplicated "words" in evidence-summary JSON system prompts by @chris234567 in https://github.com/Future-H