Python package that answers questions from scientific PDFs with cited, agentic retrieval-augmented generation.
PaperQA2 searches PDFs and text files with an LLM agent and answers with in-text citations.
PaperQA2 is a Python package for high-accuracy retrieval-augmented generation over PDFs, text, Office files and code, with a focus on scientific literature. It suits researchers and students comfortable with a command line who want grounded answers with citations.
You point it at a folder of papers and ask a question with pqa ask. It fetches paper metadata including citation counts and retraction checks, indexes full text, and an LLM agent iteratively refines queries and writes an answer citing the passages used.
It suits researchers, reviewers and lab teams who want a scriptable literature assistant. It does not suit people who want a point-and-click app, and it needs an LLM API key or a local model server.
Responses carry in-text citations to specific papers and pages.
Fetches citation and journal-quality data from providers such as Semantic Scholar, Crossref and Unpaywall, with a retraction check.
A language agent iteratively refines queries and answers instead of a single retrieval pass.
Uses LLM-based re-ranking and contextual summarization over retrieved passages.
Works with all LiteLLM providers, local servers such as llamafile and ollama, and local sentence-transformer embeddings.
A searchable index of local PDF and text files, with support for code and HTML.
PaperQA2 is free under Apache-2.0 and no hosted plan is shown in the repository. Your cost is the LLM and embedding API usage, unless you run local models.
870 open remote AI-training roles, updated November 14, 2026; most pay $20–$170 an hour. Zekai lists them free; the application goes to the employer’s platform.
These reviewed AI tools do the same job instantly — from our scored directory.
It is the default. You can instead configure any LiteLLM-compatible model, including local servers such as llamafile or ollama.
PDFs, text files, Microsoft Office documents and source code files.
The README has a 'Where do I get papers?' section; PaperQA2 indexes the files you give it and fetches metadata for them.
See Zekai first in Google