arXiv(opens in a new tab)cs.CLDec 2023Cited by 11 papers on PaperVantage

Manuscript Offprint

arXiv:2312.07559

PaperQA: Retrieval-Augmented Generative Agent for Scientific Research

Jakub Lála, Odhran O'Donoghue, Aleksandar Shtedritski, Sam Cox, Samuel G. Rodriques, Andrew D. White

Jakub Lála

Future House

Francis Crick Institute

Odhran O'Donoghue

Align to Innovate

Francis Crick Institute

University of Oxford

Aleksandar Shtedritski

Align to Innovate

Francis Crick Institute

University of Oxford

Sam Cox

Future House

University of Rochester

Samuel G Rodriques

Future House

Francis Crick Institute

Andrew D White

Future House

University of Rochester

andrew@futurehouse.org

Dec 8, 2023

ABSTRACT

Large Language Models (LLMs) generalize well across language tasks, but suffer from hallucinations and uninterpretability, making it difficult to assess their accuracy without ground-truth. Retrieval-Augmented Generation (RAG) models have been proposed to reduce hallucinations and provide provenance for how an answer was generated. Applying such models to the scientific literature may enable large-scale, systematic processing of scientific knowledge. We present PaperQA, a RAG agent for answering questions over the scientific literature. PaperQA is an agent that performs information retrieval across full-text scientific articles, assesses the relevance of sources and passages, and uses RAG to provide answers. Viewing this agent as a question-answering model, we find it exceeds performance of existing LLMs and LLM agents on current science QA benchmarks. To push the field closer to how humans perform research on scientific literature, we also introduce LitQA, a more complex benchmark that requires retrieval and synthesis of information from full-text scientific papers across the literature. Finally, we demonstrate PaperQA's matches expert human researchers on LitQA.

1 INTRODUCTION

The rate of papers published yearly grows at an exponential rate, with over 5 million academic articles published in 2022 [1], and over 200 million articles in total [2]. The difficulty of navigating this extensive literature means significant scientific findings have gone unnoticed for extended periods [3, 4, 5]. Work in the last 10 years has sought to make the space of literature more manageable for scientists, with the introduction of keyword search systems [6, 7], vector similarity embeddings [8, 9, 10, 11] and recommender systems [12, 13]. The process of scientific discovery from literature is still, however, highly manual.

The use of Large Language Models (LLMs) to answer scientific questions is increasingly seen in academia and research-heavy professions such as medicine [14, 15]. While LLMs can produce answers faster and encompass a broader, deeper scope than manual searching, there is a high risk of hallucination in responses, which can lead to potentially dangerous outcomes [16, 17]. Incorrect information can be more damaging than no information at all, as the time to verify veracity can take just as long as retrieving it from research papers in the first place [18]. Reliance on pre-trained LLMs also prevents the discovery of new information published after a training cutoff date. Given the rapidly moving pace of science, this can lead to misconceptions persisting.

Retrieval-Augmented Generation (RAG) models are a potential solution to these limitations [19]. RAG models retrieve text from a corpus, using methods such as vector embedding search or keyword search, and add the retrieved passage to the context window of the LLM. RAG usage can reduce hallucinations in conversations and improve LLM performance on QA tasks [16, 20]. Nevertheless, standard RAG models follow a fixed, linear flow, which can be restrictive for addressing the diverse range of questions scientists encounter.

In this work, we eliminate these limitations by breaking RAG into modular pieces, allowing an agent LLM to dynamically adjust and iteratively perform steps in response to the specific demands of each question, ensuring more precise and relevant answers. We call this PaperQA, an agent-based RAG system for scientific question answering. PaperQA has three fundamental components: finding papers relevant to the given question, gathering text from those papers, and generating an answer with references.

We evaluate PaperQA on several standard multiple-choice datasets for evaluating LLMs, which assess the model's ability to answer questions with existing knowledge, but do not test the agents' ability to retrieve information. We modified PubMedQA [21] to remove the provided context (so it is closed-book) and found PaperQA beats GPT-4 by 30 points (57.9% to 86.3%). PubMedQA is only built on abstracts though, and so we construct a more difficult dataset that requires synthesizing information from one or multiple full-text research papers. We thus introduce a new dataset, LitQA, composed from recent literature, in order to test PaperQA's ability to retrieve information outside of the underlying LLM's pre-training data. PaperQA outperforms all models tested and commercial tools, and is comparable to human experts on LitQA on performance and time, but is significantly cheaper in terms of costs. Furthermore, PaperQA is competitive to state-of-the-art commercial tools for scientific question answering. Finally, we find that PaperQA exhibits a better knowledge boundary than competing tools, answering questions incorrectly at a lower rate, and instead, answering that it is unsure.

References (68)