PaperQA2
AI agent that retrieves, reads, and synthesises answers from scientific PDFs with citation-level accuracy.
PaperQA2
PaperQA2 by Future House is an AI agent for question-answering over scientific literature. It autonomously retrieves relevant papers, reads full PDFs, and synthesises grounded answers with precise inline citations — achieving human-level performance on the LitQA2 benchmark that evaluates citation accuracy.
Key Features
- Agentic RAG loop: retrieval → reading → evidence synthesis → answer generation
- Exact citation tracking: every claim is traceable to a specific passage and paper
- LitQA2 benchmark leader — outperforms GPT-4 with retrieval on literature QA
- Supports local PDFs, DOI resolution, and Semantic Scholar/PubMed search
- Async Python API; pluggable LLM (OpenAI, Anthropic) and embedding providers
Quick Start
pip install paper-qa
export OPENAI_API_KEY=sk-...
from paperqa import Docs
import asyncio
async def main():
docs = Docs()
await docs.aadd("paper1.pdf")
await docs.aadd("paper2.pdf")
answer = await docs.aquery("What are the key findings on transformer scaling laws?")
print(answer.formatted_answer)
asyncio.run(main())
npx ai-supply add paperqa-scientific-literature-qa
Curated mirror of the open-source PaperQA2 (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/paperqa-scientific-literature-qa/check). Click a policy:
Consume PaperQA2 programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/paperqa-scientific-literature-qa
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/paperqa-scientific-literature-qa/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add paperqa-scientific-literature-qa
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/paperqa-scientific-literature-qa/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "paperqa-scientific-literature-qa" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.