Retrieval-Augmented Language Models Enable Scalable Chemical Source Classification in Metabolomics Workflows

There is a growing need for scalable chemical classification to support the interpretation of exposomics and metabolomics data. While structural categorization has been largely automated, functional and exposure-based labeling of chemicals remains a manual and time-consuming process. Here, we present <i>chemsource</i>, a flexible framework that integrates large language models (LLMs) with retrieval-augmented generation (RAG) to automate chemical classification. <i>chemsource</i> retrieves descriptive text from Wikipedia or PubMed abstracts based on chemical names and prompts LLMs to assign user-defined categories based on the retrieved content. We demonstrate classification into five exposure categories: endogenous metabolites, food molecules, drugs, personal care products, industrial chemicals, and combinations of these possibilities. Benchmarking against manually curated labels for 4,953 compounds showed 75% overall agreement, with category-level recall exceeding 75% across all classes. Expert review indicated that most discrepancies could be attributed to prompt ambiguity and incomplete manual labels rather than model failure. To demonstrate the utility of <i>chemsource</i> in metabolomics workflow, we applied it to eight public untargeted metabolomics data sets, revealing distinct exposure patterns across human biospecimens, mouse tissues, environmental dust, and consumer product extracts. <i>chemsource</i> is customizable via prompt editing, enabling diverse classification tasks without requiring coding expertise. The tool is freely available as a Python package (https://pypi.org/project/chemsource/). Text retrieval is free; classification requires user-supplied LLM API access.

Authors

Institutions

Publication Details

Journal
Analytical Chemistry
Published
2026-01-29
DOI
https://doi.org/10.1021/acs.analchem.5c05301
Primary Topic
Metabolomics and Mass Spectrometry Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Retrieval-Augmented Language Models Enable Scalable Chemical Source Classification in Metabolomics Workflows

Shirley M. Tsunoda, Jeong In Seo, Harsha Gouda, Runbang Tang et al.
Analytical Chemistry
Metabolomics and Mass Spectrometry Studies
article

Retrieval-Augmented Language Models Enable Scalable Chemical Source Classification in Metabolomics Workflows

Shirley M. Tsunoda, Jeong In Seo, Harsha Gouda, Runbang Tang, Shipei Xing, Siddharth Mohan, Prajit Rajkumar, Harshada Sapre, Victoria Deleray, Haoqi Nina Zhao, Pieter C. Dorrestein, Jasmine Zemlin
article en

Abstract

There is a growing need for scalable chemical classification to support the interpretation of exposomics and metabolomics data. While structural categorization has been largely automated, functional and exposure-based labeling of chemicals remains a manual and time-consuming process. Here, we present <i>chemsource</i>, a flexible framework that integrates large language models (LLMs) with retrieval-augmented generation (RAG) to automate chemical classification. <i>chemsource</i> retrieves descriptive text from Wikipedia or PubMed abstracts based on chemical names and prompts LLMs to assign user-defined categories based on the retrieved content. We demonstrate classification into five exposure categories: endogenous metabolites, food molecules, drugs, personal care products, industrial chemicals, and combinations of these possibilities. Benchmarking against manually curated labels for 4,953 compounds showed 75% overall agreement, with category-level recall exceeding 75% across all classes. Expert review indicated that most discrepancies could be attributed to prompt ambiguity and incomplete manual labels rather than model failure. To demonstrate the utility of <i>chemsource</i> in metabolomics workflow, we applied it to eight public untargeted metabolomics data sets, revealing distinct exposure patterns across human biospecimens, mouse tissues, environmental dust, and consumer product extracts. <i>chemsource</i> is customizable via prompt editing, enabling diverse classification tasks without requiring coding expertise. The tool is freely available as a Python package (https://pypi.org/project/chemsource/). Text retrieval is free; classification requires user-supplied LLM API access.

Analytical ChemistryVol. 98(5)
University of California San Diego (US), Stanford University (US)
Openalex Percentile: Top 74%
Metabolomics and Mass Spectrometry Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.