Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
Future-House/paper-qa
Agentic RAG tool that answers questions over scientific papers and other documents, returning answers with in-text citations.
- Stars
- 9,422
- Forks
- 944
- Open issues
- 155
- Last commit
- 7 days ago
What is it?
PaperQA2 is a Python package for retrieval augmented generation over PDFs, text files, Microsoft Office documents and source code, with a focus on scientific literature. It searches a local folder of documents, gathers relevant passages, summarizes and re-ranks them, and generates an answer with in-text citations back to the source papers.
It can enrich results with paper metadata such as citation counts, journal information and retraction checks, pulled from providers like Semantic Scholar, Crossref and Unpaywall. It is usable from a command-line tool called pqa, which supports indexing, full-text search and saved settings, or from Python with synchronous and async APIs.
Model access goes through LiteLLM, so OpenAI, Anthropic, Gemini and locally hosted models such as llama.cpp, llamafile or Ollama can be used. Embeddings can be dense, sparse or hybrid, and the project supports local Sentence Transformers models and external vector stores such as Qdrant.
Key features
- 01Answers questions over local PDFs, text, Office files and code with in-text citations.
- 02Agentic workflow where the language model iteratively searches, gathers evidence and answers.
- 03Enriches papers with citation counts, journal quality and retraction checks from metadata providers.
- 04Command-line tool pqa for indexing, searching and querying, plus a Python async API.
- 05Works with any LiteLLM-compatible model, including locally hosted ones.
Use cases
- Querying a folder of research papers for evidence on a specific scientific question.
- Finding contradictions or supporting evidence across a literature collection.
- Building a searchable, citation-backed knowledge base from local documents.
Quick start
- 1
Install the package from PyPI
pip install paper-qa - 2
Create a folder for your papers
mkdir my_papers - 3
Enter the folder and ask a question with the pqa CLI (requires an LLM API key such as OPENAI_API_KEY)
cd my_papers && pqa ask 'What is PaperQA2?'
Things to know
- Requires an LLM API key or a locally hosted open-source LLM server to operate.
- Heavy indexing of 100+ papers may need Crossref and Semantic Scholar API keys to avoid public rate limits.
- Version 5 requires Python 3.11 or newer, and older PaperQA pickled Docs objects must be rebuilt.
Topics
FAQ
- What is paper-qa?
- Agentic RAG tool that answers questions over scientific papers and other documents, returning answers with in-text citations. PaperQA2 is a Python package for retrieval augmented generation over PDFs, text files, Microsoft Office documents and source code, with a focus on scientific literature. It searches a local folder of documents, gathers relevant passages, summarizes and re-ranks them, and generates an answer with in-text citations back to the source papers.
- Is paper-qa free to use? What license does it have?
- paper-qa is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is paper-qa still maintained?
- Actively maintained. The last commit to paper-qa was on Oct 13, 2026.
- What can I use paper-qa for?
- Querying a folder of research papers for evidence on a specific scientific question. Finding contradictions or supporting evidence across a literature collection. Building a searchable, citation-backed knowledge base from local documents.
- How do I install paper-qa?
- Install the package from PyPI: pip install paper-qa Create a folder for your papers: mkdir my_papers Enter the folder and ask a question with the pqa CLI (requires an LLM API key such as OPENAI_API_KEY): cd my_papers && pqa ask 'What is PaperQA2?'
- Where can I get paper-qa?
- The source code and installation instructions are on GitHub: https://github.com/Future-House/paper-qa
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source embedding database for AI apps, storing documents and vectors to power semantic, hybrid and full-text search.
A CLI and web workbench that compiles raw documents into an interlinked, LLM-maintained markdown wiki, using PageIndex tree retrieval for long files.
Agent-native memory infrastructure that turns LLM agent conversations and execution into persistent, structured memory for Python and TypeScript apps.
A local-first, Markdown-native long-term memory layer for AI agents, storing memories as editable files with SQLite and LanceDB indexes.
A command-line tool and Python library for running prompts and chats against remote and locally installed large language models.