Abstract
Large language models (LLMs) have garnered increasing attention owing to their potential as collaborative assistants in scientific studies. However, adapting an LLM to specialized domains remains challenging because of the difficulty in incorporating domain-specific knowledge. In the present study, we propose a framework named materials dual-source knowledge retrieval-augmented generation (MDSK-RAG). The present framework is a variant of RAG frameworks that enables domain adaptation of a local LLM without fine-tuning and is applied to metal-sulfide photocatalyst studies. Experimental results stored in a CSV file and scientific literature written as PDF files were used as sources of domain-specific knowledge by the two retrievers of the present MDSK-RAG. The tabular data were converted into natural scientific language according to a predefined template to improve their interpretability. The texts retrieved from both sources were summarized before response generation using the local LLM. The summary is performed by the LLM based on a predefined prompt that extracts information corresponding to five aspects of metal-sulfide photocatalysts: composition, crystal structure type, synthesis method, reaction conditions, and hydrogen evolution activity. The evaluation of the generated responses to 12 expert-defined questions revealed that the present MDSK-RAG improved the scientific quality of the responses in terms of both factual correctness and expert-specific reasoning. The proposed framework can operate entirely in a local environment and offers advantages in terms of data confidentiality. In addition, a user-friendly application was developed to support its practical use in materials development workflows. The proposed framework can be generalized and adapted to a broad range of materials research domains.



![Author ORCID: We display the ORCID iD icon alongside authors names on our website to acknowledge that the ORCiD has been authenticated when entered by the user. To view the users ORCiD record click the icon. [opens in a new tab]](https://www.cambridge.org/engage/assets/public/coe/logo/orcid.png)