An LLM-Based Intelligent Agent and Its Application in Making the Lanolin Saponification Process Greener
Abstract
1. Introduction
2. Results
2.1. Comparison and Optimization of LLMs
2.2. Automated Execution of Literature-Based Conditions
2.3. Automated Experimental Design and Execution
2.4. Modeling and Optimization
3. Discussion
3.1. Greenness Assessment
3.2. Advantages and Limitations of SapoMind
4. Materials and Methods
4.1. Reagents and Materials
4.2. SapoMind Construction
4.2.1. Hardware System
4.2.2. Software System
- Intent recognition node: Identifies the user’s intent and directs the subsequent workflow based on the recognition result.
- Literature comprehension node: Comprehends user-provided literature and generates experimental protocols.
- Parameter extraction node: Extracts material parameters from user input after protocol confirmation.
- Experimental condition optimization node: Qualitatively analyzes failed experiments due to improper conditions and generates optimized experimental ranges.
- Definitive Screening Design (DSD) table generation node: Generates DSD experimental tables using optimized parameters.
- Operational parameter calculation node: Converts experimental parameters, including reaction temperature, reaction time, the mass fraction of the lanolin solution, and alkali dosage, into hardware control parameters such as pump flow rate, residence time, and oil bath temperature. Pump flow rate and residence time are calculated using Equations (1)–(5):where 1 represents the density of the lanolin feedstock solution; represents the mass fraction of the lanolin feedstock solution; represents the mass fraction of the lanolin solution; represents the mass fraction of the alkali solution; represents the density of the alkali solution; represents the density of the diluent; represents the alkali dosage; represents the reaction time; represents the lanolin feedstock solution transfer time from the pump outlet to the second T-junction; represents the equilibration time (set to 2 min); represents the tubing volume between the pump and the second T-junction (set to 10 mL). represents the residence time; represents the volumetric flow rate of the lanolin feedstock solution; represents the volumetric flow rate of the alkali solution; represents the volumetric flow rate of the diluent; represents the volume of the PTFE coil used for the reaction.
- Web search node: Activates Baidu search API for non-saponification-related queries.
- Hardware operation node: Executes pre-generated Python communication scripts for hardware control.
- User interaction node: Outputs experimental protocols and awaits user confirmation before proceeding.
4.2.3. Optimization Strategies for LLMs
4.3. SapoMind Hardware–Software Integration
4.4. Analytical Method
4.5. Data Processing
4.5.1. Process Performance Indicators
4.5.2. Data Modeling
4.5.3. Sensitivity Analysis of Carbon Emissions
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shan, W.; Wang, L. Preparation of pharmaceutical-grade micritic lanolin alcohol. China Oils Fats 2024, 49, 48–51. [Google Scholar] [CrossRef]
- Szepietowski, J.C.; Tadini, G. Basic Emollients for Xerosis Cutis Not Associated with Atopic Dermatitis: A Review of Clinical Studies. Int. J. Dermatol. 2025, 64, 29–46. [Google Scholar] [CrossRef]
- European Pharmacopoeia Commission. European Pharmacopoeia, 11th ed.; European Directorate for the Quality of Medicines & HealthCare (EDQM): Strasbourg, France, 2025. [Google Scholar]
- Xin, Y.; Ruan, J.; Qian, C.; Zhou, S.; Chen, X. Pipeline saponification of lanolin and the synthesis of refined lanolin. J. Chem. Eng. Chin. Univ. 2021, 35, 867–873. [Google Scholar]
- Chen, Y.; Xu, N.; Wang, X.; Jin, Q.; Wang, X. Preparation of lanolin acids from lanolin. China Oils Fats 2020, 45, 27–31. [Google Scholar]
- Wang, B.; Chen, J.; Yu, Y.; Hu, Z.; Bi, Y. Physicochemical indexes and main components of lanolin. China Oils Fats 2022, 47, 22–27. [Google Scholar]
- Anastas, P.; Eghbali, N. Green Chemistry: Principles and Practice. Chem. Soc. Rev. 2010, 39, 301–312. [Google Scholar] [CrossRef] [PubMed]
- de Marco, B.A.; Rechelo, B.S.; Totoli, E.G.; Kogawa, A.C.; Nunes Salgado, H.R. Evolution of green chemistry and its multidimensional impacts: A review. Saudi Pharm. J. 2019, 27, 1–8. [Google Scholar] [CrossRef]
- Bryan, M.C.; Dunn, P.J.; Entwistle, D.; Gallou, F.; Koenig, S.G.; Hayler, J.D.; Hickey, M.R.; Hughes, S.; Kopach, M.E.; Moine, G.; et al. Key Green Chemistry research areas from a pharmaceutical manufacturers’ perspective revisited. Green Chem. 2018, 20, 5082–5103. [Google Scholar] [CrossRef]
- Huang, Y.Q.; Li, H.Y.; Wang, Z.X.; Fu, Y.J.; Chen, Y.; Wang, X.S. Enzymatic synthesis of branched chain fatty acid-enriched structured triacylglycerols via esterification with glycerol. Food Chem. 2023, 429, 136943. [Google Scholar] [CrossRef]
- Andreev, D.V.; Makarshin, L.L.; Gribovskii, A.G.; Yushchenko, D.Y.; Sergeev, E.E.; Zhizhina, E.G.; Pai, Z.P.; Parmon, V.N. Triethanolamine synthesis in a continuous flow microchannel reactor. Chem. Eng. J. 2015, 259, 252–256. [Google Scholar] [CrossRef]
- Kara, A.; Kumar, D.; Healy, A.M.; Lalatsa, A.; Serrano, D.R. Continuous Manufacturing of Cocrystals Using 3D-Printed Microfluidic Chips Coupled with Spray Coating. Pharmaceuticals 2023, 16, 1064. [Google Scholar] [CrossRef] [PubMed]
- Trinh, T.N.D.; Do, H.D.K.; Nam, N.N.; Dan, T.T.; Trinh, K.T.L.; Lee, N.Y. Droplet-Based Microfluidics: Applications in Pharmaceuticals. Pharmaceuticals 2023, 16, 937. [Google Scholar] [CrossRef] [PubMed]
- Ali, A.; Rohini, A.K.; Lee, H.J. Dehydrogenation of perhydro-dibenzyltoluene for hydrogen production in a microchannel reactor. Int. J. Hydrogen Energy 2022, 47, 20905–20914. [Google Scholar] [CrossRef]
- Jiao, J.; Nie, W.; Yu, T.; Yang, F.; Zhang, Q.; Aihemaiti, F.; Yang, T.; Liu, X.; Wang, J.; Li, P. Multi-Step Continuous-Flow Organic Synthesis: Opportunities and Challenges. Chem.-A Eur. J. 2021, 27, 4817–4838. [Google Scholar] [CrossRef]
- Mallapura, H.; Tanguy, L.; Mahfuz, S.; Bylund, L.; Langstrom, B.; Halldin, C.; Nag, S. Advancements in Microfluidic Cassette-Based iMiDEV™ Technology for Production of L-[11C] Methionine and [11C]Choline. Pharmaceuticals 2024, 17, 250. [Google Scholar] [CrossRef]
- Coley, C.W.; Thomas, D.A.; Lummiss, J.A.M.; Jaworski, J.N.; Breen, C.P.; Schultz, V.; Hart, T.; Fishman, J.S.; Rogers, L.; Gao, H.Y.; et al. A robotic platform for flow synthesis of organic compounds informed by AI planning. Science 2019, 365, eaax1566. [Google Scholar] [CrossRef]
- Zheng, Z.L.; Florit, F.; Jin, B.K.; Wu, H.Y.; Li, S.C.; Nandiwale, K.Y.; Salazar, C.A.; Mustakis, J.G.; Green, W.H.; Jensen, K.F. Integrating Machine Learning and Large Language Models to Advance Exploration of Electrochemical Reactions. Angew. Chem.-Int. Ed. 2025, 64, e202418074. [Google Scholar] [CrossRef]
- Boiko, D.A.; Macknight, R.; Kline, B.; Gomes, G. Autonomous chemical research with large language models. Nature 2023, 624, 570–578. [Google Scholar] [CrossRef]
- Bran, A.M.; Cox, S.; Schilter, O.; Baldassari, C.; White, A.D.; Schwaller, P. Augmenting large language models with chemistry tools. Nat. Mach. Intell. 2024, 6, 525–535. [Google Scholar] [CrossRef]
- Ruan, Y.X.; Lu, C.Y.; Xu, N.; He, Y.C.; Chen, Y.X.; Zhang, J.; Xuan, J.; Pan, J.Z.; Fang, Q.; Gao, H.Y.; et al. An automatic end-to-end chemical synthesis development platform powered by large language models. Nat. Commun. 2024, 15, 10160. [Google Scholar] [CrossRef]
- Bibi, N.; Tariq, M.U.; Ullah, Z.; Babar, M.; Khan, Z. Enhancing code search through query expansion: A fusion of LSTM with GloVe and BERT model (ECSQE). Results Eng. 2025, 27, 105979. [Google Scholar] [CrossRef]
- Youssef, L.; Elhoussaine, Z.; Soufiane, N.; Noureddine, M. Enhancing Arabic aspect category detection using large language models (LLMs). Results Eng. 2025, 26, 105049. [Google Scholar] [CrossRef]
- Hu, J.; Wu, P.; Li, Y.; Li, Q.; Wang, S.; Liu, Y.; Qian, K.; Yang, G. Discovering Photoswitchable Molecules for Drug Delivery with Large Language Models and Chemist Instruction Training. Pharmaceuticals 2024, 17, 1300. [Google Scholar] [CrossRef] [PubMed]
- Guo, D.; Yang, D.; Zhang, H.; Song, J.; Wang, P.; Zhu, Q.; Xu, R.; Zhang, R.; Ma, S.; Bi, X.; et al. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature 2025, 645, 633–638. [Google Scholar] [CrossRef] [PubMed]
- National Development and Reform Commission. Guidelines for Greenhouse Gas Emission Accounting and Reporting of China’s Petrochemical Enterprises. Available online: https://www.ndrc.gov.cn/xxgk/zcfb/tz/201502/t20150209_963759.html (accessed on 9 February 2015). (In Chinese)
- Zimmerman, J.B.; Anastas, P.T.; Erythropel, H.C.; Leitner, W. Designing for a green chemistry future. Science 2020, 367, 397–400. [Google Scholar] [CrossRef] [PubMed]
- Rogers, L.; Jensen, K.F. Continuous Manufacturing—The Green Chemistry Promise? Green Chem. 2019, 21, 3481–3498. [Google Scholar] [CrossRef]
- Ardila-Fierro, K.J.; Hernández, J.G. Sustainability Assessment of Mechanochemistry by Using the Twelve Principles of Green Chemistry. ChemSusChem 2021, 14, 2145–2162. [Google Scholar] [CrossRef] [PubMed]
- Tobiszewski, M.; Marc, M.; Galuszka, A.; Namiesnik, J. Green Chemistry Metrics with Special Reference to Green Analytical Chemistry. Molecules 2015, 20, 10928–10946. [Google Scholar] [CrossRef]
- Ren, D.; Xie, J.; Chen, T.; Qu, H.; Gong, X. Design and optimization of a greener sinomenine hydrochloride preparation process considering variations among different batches of the medicinal herb. Chin. J. Chem. Eng. 2024, 71, 77–90. [Google Scholar] [CrossRef]
- Wang, Y.; Xu, J.; Yang, Y. Optimization of Preparation Process of Wool Fatty Acid and Determination of Its Transdermal Permeability. J. Gansu Agric. Univ. 2026. online first. Available online: https://link.cnki.net/urlid/62.1055.s.20260113.1303.004 (accessed on 15 December 2025). (In Chinese)
- Yan, H.; Wang, J.; Zhang, Y. Study on Saponification Application of Lanolin Extraction from Wool Scouring Wastewater. Qingfang Gongye Yu Jishu 2024, 53, 28–31. [Google Scholar] [CrossRef]
- Sebastian, P.; Niklas, T.; Michael, A.; Pascal, J.; Thomas, M.; Matthias, F. Optimized Machine Learning for Autonomous Enzymatic Reaction Intensification in a Self-Driving Lab. Biotechnol. Bioeng. 2025, 122, 3018–3036. [Google Scholar] [CrossRef]
- Bao, Z.; Le Devedec, F.; Huynh, S. A Data-Driven Workflow for Nanomedicine Optimization Using Active Learning and Automated Experimentation. Mol. Pharm. 2025, 22, 7465–7477. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Rajabi-Kochi, M.; Huang, G.; Wu, J.; Wang, S.; Xu, J.; Moosavi, S.M.; Huang, K. A Modular Self-Driving Laboratory for Automated Synthesis of CsPb(Cl/Br/I)3 Perovskite Nanocrystals. Nano Lett. 2026, 26, 517–525. [Google Scholar] [CrossRef] [PubMed]
- Wilding, C.Y.P.; Bourne, R.A.; Warren, N.J. Integrating mechanistic modelling with Bayesian optimisation: Accelerated self-driving laboratories for RAFT polymerisation. Digit. Discov. 2025, 4, 2797–2803. [Google Scholar] [CrossRef]
- Song, T.; Luo, M.; Zhang, X.; Chen, L.; Huang, Y.; Cao, J.; Zhu, Q.; Liu, D.; Zhang, B.; Zou, G.; et al. A Multiagent-Driven Robotic AI Chemist Enabling Autonomous Chemical Research On Demand. J. Am. Chem. Soc. 2025, 147, 12534–12545. [Google Scholar] [CrossRef]
- Abudureheman, K.; Wang, Q.; Zhang, H.; Gong, X. Development of a QAMS Analysis Method for Industrial Lanolin Alcohol Based on the Concept of Analytical Quality by Design. Separations 2024, 11, 276. [Google Scholar] [CrossRef]
- Segler, M.H.S.; Preuss, M.; Waller, M.P. Planning chemical syntheses with deep neural networks and symbolic AI. Nature 2018, 555, 604–610. [Google Scholar] [CrossRef]
- Kershaw, O.J.; Clayton, A.D.; Manson, J.A.; Barthelme, A.; Pavey, J.; Peach, P.; Mustakis, J.; Howard, R.M.; Chamberlain, T.W.; Warren, N.J.; et al. Machine learning directed multi-objective optimization of mixed variable chemical systems. Chem. Eng. J. 2023, 451, 138443. [Google Scholar] [CrossRef]
- Clayton, A.D.; Schweidtmann, A.M.; Clemens, G.; Manson, J.A.; Taylor, C.J.; Nino, C.G.; Chamberlain, T.W.; Kapur, N.; Blacker, A.J.; Lapkin, A.A.; et al. Automated self-optimisation of multi-step reaction and separation processes using machine learning. Chem. Eng. J. 2020, 384, 123340. [Google Scholar] [CrossRef]
- Yu, T.; Shi, Y.Y.; He, X.D.; Kang, C.; Deng, B.; Song, S.B. Optimization of Parameter Ranges for Composite Tape Winding Process Based on Sensitivity Analysis. Appl. Compos. Mater. 2017, 24, 821–836. [Google Scholar] [CrossRef]
- Deng, B.; Shi, Y.Y.; Yu, T.; Kang, C.; Zhao, P. Multi-Response Parameter Interval Sensitivity and Optimization for the Composite Tape Winding Process. Materials 2018, 11, 220. [Google Scholar] [CrossRef]







| Term | F Value | p Value |
|---|---|---|
| Reaction temperature (°C) | 19.09 | 0.0024 |
| Reaction time (min) | 15.69 | 0.0042 |
| Lanolin solution mass fraction | 29.17 | 0.0006 |
| Reaction temperature (°C) Lanolin solution mass fraction | 10.24 | 0.0126 |
| Model | 18.55 | 0.0004 |
| Name | Correlation Coefficient | p Value | Significance Level | Sensitive Level |
|---|---|---|---|---|
| Alkali consumption (kg/kg lanolin) | 0.0059 | 0.553 | Not significant | Insensitive |
| Reaction time (min) | 0.0068 | 0.495 | Not significant | Insensitive |
| Reaction temperature (°C) | 0.4497 | 0.000 | Significant | Sensitive |
| Lanolin solution mass fraction | −0.8673 | 0.000 | Significant | Extremely sensitive |
| Name | Value |
|---|---|
| Reaction temperature (°C) | 70.0 |
| Reaction time (min) | 5.0 |
| Lanolin solution mass fraction | 0.25 |
| Alkali consumption (kg/kg lanolin) | 0.116 |
| Reaction Time | Alkali Consumption (kg/kg Lanolin) | Reaction Temperature (°C) | Lanolin Solution Mass Fraction | Reference |
|---|---|---|---|---|
| 40 min | 0.110 | 160 | 25% | [4] |
| 4 h | 0.114 | 80 | 33% | [32] |
| 1.5 h | 0.360 | 60 | 16% | [33] |
| 9 min | 0.116 | 70 | 25% | This study |
| Node Name | Whether LLM-Driven |
|---|---|
| Intent recognition | Yes |
| Literature comprehension | Yes |
| Parameter extraction | Yes |
| Experimental condition optimization | Yes |
| Definitive Screening Design (DSD) table generation | No |
| Operational parameter calculation | No |
| Web search | No |
| Hardware operation | No |
| User interaction | No |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wang, Q.; Wang, Y.; Gong, X. An LLM-Based Intelligent Agent and Its Application in Making the Lanolin Saponification Process Greener. Pharmaceuticals 2026, 19, 264. https://doi.org/10.3390/ph19020264
Wang Q, Wang Y, Gong X. An LLM-Based Intelligent Agent and Its Application in Making the Lanolin Saponification Process Greener. Pharmaceuticals. 2026; 19(2):264. https://doi.org/10.3390/ph19020264
Chicago/Turabian StyleWang, Qinglin, Yu Wang, and Xingchu Gong. 2026. "An LLM-Based Intelligent Agent and Its Application in Making the Lanolin Saponification Process Greener" Pharmaceuticals 19, no. 2: 264. https://doi.org/10.3390/ph19020264
APA StyleWang, Q., Wang, Y., & Gong, X. (2026). An LLM-Based Intelligent Agent and Its Application in Making the Lanolin Saponification Process Greener. Pharmaceuticals, 19(2), 264. https://doi.org/10.3390/ph19020264

