Related Experiment Video
Updated: Jan 31, 2026

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
Retrieval-Augmented Language Models Enable Scalable Chemical Source Classification in Metabolomics Workflows
Prajit Rajkumar1,2, Runbang Tang1,2, Harshada Sapre1,2
1Collaborative Mass Spectrometry Innovation Center, University of California San Diego, La Jolla, California 92093, United States.
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 chemsource, a flexible framework that integrates large language models (LLMs) with retrieval-augmented generation (RAG) to automate chemical classification. chemsource 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 chemsource 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. chemsource 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.
Related Concept Videos
Spasmolytic Agents: Chemical Classification
A major class of centrally acting spasmolytics is the α2-agonist, such as tizanidine. These drugs bind to α2-adrenoceptors, inhibiting the release of the excitatory neurotransmitter glutamate. They also...
Retrieval
Recall involves accessing information without cues, such as during an essay test, where individuals must retrieve facts and concepts from memory unaided. Another example is remembering the name of a colleague...
Language
Corballis and Suddendorf (2007) and Tomasello and Rakoczy (2003) highlight the role of language in...
ER Retrieval Pathway
The ER uses many checkpoints to prevent the entry of incorrectly folded or a resident protein as cargo onto a transport vesicle. These mechanisms...
Components of Language
Language Development
The critical period for language acquisition suggests that the ability to acquire language is at its peak early in life. As people age, this proficiency decreases. Language development begins very...

