Benchmarking Retrieval-Augmented Generation for Chemistry
Xianrui Zhong, Bowen Jin, Siru Ouyang, Yanzhen Shen, Qiao Jin, Yin Fang, Zhiyong Lu, Jiawei Han
TL;DR
This work introduces ChemRAG-Bench, a 1,932-question chemistry benchmark, and ChemRAG-Toolkit, a modular framework enabling five retrievers and eight LLMs to evaluate retrieval-augmented generation in chemistry. Across diverse tasks, RAG yields an average relative improvement of 17.4% over direct inference, with larger models deriving the most consistent gains. The study provides a detailed analysis of corpus choices, retriever architectures, and retrieval depth, offering practical recommendations for task-aware corpus selection, hybrid retrievers, and deployment considerations in chemistry. The resources aim to standardize evaluation and accelerate progress in chemistry-focused RAG systems, with implications for grounding, up-to-date knowledge, and reduced hallucinations in domain-specific AI systems.
Abstract
Retrieval-augmented generation (RAG) has emerged as a powerful framework for enhancing large language models (LLMs) with external knowledge, particularly in scientific domains that demand specialized and dynamic information. Despite its promise, the application of RAG in the chemistry domain remains underexplored, primarily due to the lack of high-quality, domain-specific corpora and well-curated evaluation benchmarks. In this work, we introduce ChemRAG-Bench, a comprehensive benchmark designed to systematically assess the effectiveness of RAG across a diverse set of chemistry-related tasks. The accompanying chemistry corpus integrates heterogeneous knowledge sources, including scientific literature, the PubChem database, PubMed abstracts, textbooks, and Wikipedia entries. In addition, we present ChemRAG-Toolkit, a modular and extensible RAG toolkit that supports five retrieval algorithms and eight LLMs. Using ChemRAG-Toolkit, we demonstrate that RAG yields a substantial performance gain -- achieving an average relative improvement of 17.4% over direct inference methods. We further conduct in-depth analyses on retriever architectures, corpus selection, and the number of retrieved passages, culminating in practical recommendations to guide future research and deployment of RAG systems in the chemistry domain. The code and data is available at https://chemrag.github.io.
