Retrieval augmented generation for building datasets from scientific literature
Abstract In this work, we show that employing retrieval augmented generation (RAG) with a large language model (LLM) enables us to extract accurate data from scientific literature and construct datasets. The rapid growth in publications necessitates the automation of extraction of structured data as it is crucial for training machine learning(ML) models. The pipeline developed is simple and can be adjusted accordingly with natural language as input. Quantization enables us to run LLMs on consumer hardware and remove the reliance on closed-source models. Both Llama3-8B and Gemma2-9B with RAG give structured output consistently and with high accuracy as compared to direct prompting. Using the newly developed protocol, we created a data set of metal hydrides for solid-state hydrogen storage from paper abstracts. The accuracy of the generated dataset was <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> <mml:mrow> <mml:mrow> <mml:mo>></mml:mo> </mml:mrow> </mml:mrow> </mml:math> 88% in the cases tested. Further, we demonstrate that the generated dataset is ready-to-use for ML models by testing it with HYST to predict the H <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="block" overflow="scroll"> <mml:mrow> <mml:mtext> _{2}wt\%</mml:mtext> </mml:mrow> </mml:math> at a given temperature. Thus, we demonstrate a pipeline to create datasets from scientific literature at minimal computational cost and high accuracy.
Authors
- Kavita Joshi (ORCID: https://orcid.org/0000-0001-6079-4568)
- Ashwini Verma (ORCID: https://orcid.org/0000-0001-9837-9597)
- Piyush Ranjan Maharana (ORCID: https://orcid.org/0009-0004-4069-7102)
Institutions
- National Chemical Laboratory (IN)
- Academy of Scientific and Innovative Research (IN)
Publication Details
- Journal
- Journal of Physics Materials
- Published
- 2025-06-06
- DOI
- https://doi.org/10.1088/2515-7639/ade1fa
- Citations
- 2
- Primary Topic
- Semantic Web and Ontologies
- Type
- article
- Field-Weighted Citation Impact
- 4.96
Funders
- Council for Scientific and Industrial Research, South Africa
- Science and Engineering Research Board