Registry / ai-ml / paper-qa

paper-qa

JSON →
library2026.3.18pypypi✓ verified 84d ago

PaperQA is an LLM chain for answering questions from documents (PDFs, webpages, etc.) using retrieval-augmented generation. Current version: 2026.3.18. Released on a monthly cadence.

pip install paper-qa
INSTALL
IMPORT
SIG · PAPER-QA
P
paper-qa
ai-mlpythonv2026.3.18
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PaperQA
from paperqa.docs import Docs
from paperqa import PaperQA
The old PaperQA class was renamed to Docs in v2023+. Using 'from paperqa import PaperQA' raises ImportError.
Settings
from paperqa.settings import Settings
from paperqa import Settings
Settings is located in paperqa.settings module, not top-level paperqa.

Initialize Docs, add a document source, and ask a question. Requires valid LLM credentials (e.g., OPENAI_API_KEY) set in environment.

import os from paperqa.docs import Docs from paperqa.settings import Settings # Setup docs object settings = Settings() docs = Docs(settings=settings) # Add a PDF or text source docs.add("https://arxiv.org/pdf/2305.10601.pdf") # Ask a question answer = docs.query("What is the main contribution of this paper?") print(answer.formatted_answer)
Debug
Known issues
breakingThe old PaperQA class was removed in version 2023. Use Docs instead.
fix
Replace 'from paperqa import PaperQA' with 'from paperqa.docs import Docs' and use Docs class.
affects: >=2023
breakingThe settings module moved. Importing from paperqa.settings is required.
fix
Change from 'from paperqa import Settings' to 'from paperqa.settings import Settings'.
affects: >=2023
gotchaDocs.query() is async if using async backends. Ensure you await the call or use asyncio.run().
fix
Use 'await docs.query(...)' in async context, or wrap in asyncio.run(docs.query(...)).
affects: all
deprecatedThe 'add_pdf' and 'add_text' methods are deprecated in favor of 'add'.
fix
Replace 'docs.add_pdf(path)' with 'docs.add(path)' and 'docs.add_text(text)' with 'docs.add(text)'.
affects: >=2025
Errors
Common errors & fixes
ImportError: cannot import name 'PaperQA' from 'paperqa'
PaperQA class was renamed to Docs in later versions.
fix
Use 'from paperqa.docs import Docs' instead.
ModuleNotFoundError: No module named 'paperqa.docs'
Old version of paper-qa (pre-2023) does not have the docs module.
fix
Upgrade paper-qa to at least 2023.0.0: pip install --upgrade paper-qa
Upgrade
Version history
2026.3.18latest on PyPI · released Mar 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

paper-qa — pip install paper-qa · libregistry