Future-House /paper-qa

High accuracy RAG for answering questions from scientific documents with citations

★ 9,604⑂ 956👁 61⑃ 913● 385▤ 169
PythonApache-2.0Created 2023-02-05futurehouse.gitbook.io/futurehouse-cookbook
下载:v2026.08.12v2026.08.12 ↓2026.08.122026-08-12
+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 n

Top issues

Discussions

Latest release

v2026.08.12 v2026.08.12 2026-08-12
What'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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON