Future-House/paper-qa

High accuracy RAG for answering questions from scientific documents with citations

What it solves

PaperQA2 is designed to perform high-accuracy, agentic retrieval-augmented generation (RAG) on scientific literature. It solves the challenge of extracting grounded, cited answers from large collections of PDFs, text files, Microsoft Office documents, and source code by automating the search, evidence gathering, and synthesis process.

How it works

The system follows a three-phase algorithm: first, it searches for candidate papers using LLM-generated queries; second, it chunks, embeds, and ranks document passages to gather relevant evidence; finally, it uses an LLM to synthesize a grounded answer with in-text citations. It supports agentic workflows where an LLM can iteratively refine its search and evidence gathering, and it includes automatic metadata retrieval from sources like Semantic Scholar and Crossref.

Who it’s for

It is for researchers, scientists, and developers who need to perform complex question answering, summarization, or contradiction detection across large repositories of technical documents and scientific papers.

Highlights

  • Grounded responses that include in-text citations to source documents.
  • Agentic RAG capabilities allowing for iterative query refinement.
  • Support for diverse file types including PDFs, Office documents, code, and multimodal content like tables and figures.
  • Built-in CLI for rapid indexing, searching, and querying of local document directories.
  • Highly configurable with bundled settings for different performance needs (e.g., "fast" vs. "high_quality").
  • Compatibility with a wide range of LLM providers via LiteLLM.

Related

  • Project
  • Project
  • Project
  • Project
  • Project