Introduction

Nanoparticles with diverse properties have been utilized in catalysis1,2, optical devices3,4, medical diagnostics5,6, chemical sensing7,8, thermoelectric9,10, photovoltaics11,12, and pharmaceuticals13,14. Their properties depend on size15,16, morphology17,18, composition19,20, and surface chemistry21,22. For example, while bulk Au is inert, 2 nm Au nanoparticles are highly active for catalytic CO oxidation23. Palladium (Pd) powder typically appears black, but Pd nanosheets with 10 atomic layers display a striking blue due to surface plasmon resonance (SPR)13. Au nanospheres feature a single SPR peak, while Au nanorods exhibit two distinct SPR peaks, with the longitudinal SPR redshift as the aspect ratio increases. High-quality nanoparticles with uniform size, well-defined morphology, and notable dispersion are crucial for various applications. Achieving these requires precise control over reaction conditions, including reagent concentrations, temperature, time, mixing methods, and reactor geometry, as these factors are interdependent during the synthesis process.

With the application of AI technology in chemistry, a new research style that uses automated experiments with various AI models to optimize experimental results has greatly improved the efficiency of nanomaterial research and development24,25,26,27,28. For example, Daniel et al. developed a self-driving material evolution robot platform integrated with genetic algorithms (GA)29. This platform successfully optimized three morphologies of Au nanomaterials, including Au nanorods, Au nanoballs, and Au nano-octahedrons, using the products of the previous cycle as seeds in three evolutionary cycles. Zhao et al. developed a self-driving platform for synthesizing Au and double-perovskite nanocrystals30, successfully obtaining the correlation between nanoparticle morphology and synthesis parameters through data mining, synthesis, and reverse design methods. Moreover, generative AI technology represented by ChatGPT can guide experimenters on corresponding experimental methods and answer professional questions31,32,33. Yaghi et al. proposed the design concept of MOF link molecules by regulating optimized GPT, which promoted the ability of GPT models to understand complex molecular structure descriptors and predict MOF molecular structures more accurately34. Similarly, ChatMOF, developed by Kim et al., successfully generated the structure of the required MOF material by inputting relevant natural language from users, with a prediction accuracy of 95.7% and a generation task accuracy of 87.5%35. These case studies demonstrate that integrating AI into high-throughput experimentation can fundamentally eliminate the inefficiencies associated with manual trial-and-error methods, ensuring the reproducibility of experimental results while optimizing laboratory resource allocation. However, despite its potential benefits, the current state of AI-guided autonomous exploration of nanomaterials remains in the exploratory phase. Two challenges hinder the large-scale application of AI-guided optimization experiments: (1) acquiring a substantial dataset for training AI models can be challenging and costly, particularly through experimental accumulation, despite the potential to gather vast amounts of data via high-throughput platforms; (2) The customized hardware requirements pose limitations on the application of different laboratories, thereby impeding the ability to ensure the reproducibility of experimental results across various automation platforms. These limitations must be addressed fully to realize the potential of AI-assisted experimentation in nanomaterials research.

We present an automated experimental system for nanomaterial synthesis, leveraging commercial automation modules to streamline the process. The system enables users to access synthesis methods for related materials through a GPT model. According to the experimental steps outlined by the GPT model, the automatic operation script is either edited or directly called from existing execution files to achieve automatic experiments. Our system exhibits versatility, enabling the synthesis of diverse nanomaterials, including Au, Ag, Cu2O, and PdCu nanocages, by employing the A* algorithm to optimize material synthesis parameters iteratively. The automated experimental system demonstrated efficiency and repeatability in the synthesis of nanomaterials. Using the A* algorithm, we conducted a comprehensive search for synthesis parameters targeting multi-target Au NRs with localized surface plasmon resonance (LSPR) in the range of 600–900 nm across 735 experiments, as well as for Au nanospheres (Au NSs) and Ag nanocubes (Ag NCs) in 50 experiments. In the repetitive experiment, the deviations of the characteristic UV-vis peak and the corresponding full width at half maxima (FWHM) of the Au nanorods (Au NRs) spectra with identical synthesis parameters do not exceed 1.1 and 2.9 nm, respectively. The key significant advantage of our automated experimental system lies in its ability to circumvent the need for many experiments required for database construction. Moreover, it can rapidly obtain nanomaterial synthesis parameters that satisfy researchers' requirements within a short timeframe. The A* algorithm demonstrates higher search efficiency over Optuna and Olympus during the optimization of parameters for synthesizing Au NRs, requiring significantly fewer iterations.

Results

Automated experimental system

We developed an automated platform that integrates AI modules to produce nanomaterials, demonstrating that AI models can make effective decisions even with limited input data. This system comprises three main modules: the literature mining module, the automated experimental module, and the A* algorithm optimization module. The system performs the following operations (Fig. 1a): (i) The literature mining module searches and processes academic literature using GPT and Ada embedding models to generate practical nanoparticle synthesis methods (Supplementary Movies 1 and 2). (ii) Based on the experimental steps generated by the GPT model, users can manually edit scripts or directly call existing mth or pzm files (mth or pzm files are used to input into device operating software for running automated experiments) to initiate hardware operations (Supplementary Movie 3). (iii) Experiments are automated, followed by sample characterization using UV-vis spectroscopy. The system then uploads files containing synthesis parameters and UV-vis data to a specified location, serving as input for the A* algorithm, which executes to obtain updated parameters. This process is repeated until the results meet the researcher’s criteria. While we primarily characterized nanomaterials using UV-vis spectroscopy, we also performed targeted sampling to verify product morphology and size using transmission electron microscopy (TEM), providing feedback on synthesis results under optimized conditions. The system requires manual intervention only for script editing, file calling, and parameter input, with all other operations fully automated, significantly reducing labor costs in experimental processes.

Fig. 1: Automated experimental system for nanoparticle synthesis.
figure 1

a Workflow of the automated experimental system. Stage 1: Synthesis method extraction through natural language processing (NLP) and a generative pre-trained transformer (GPT) model. Stage 2: Edit or call scripts for the automatic platform based on the synthesis method obtained from Stage 1. Stage 3: Input the synthesis parameters and UV-vis data into the A* algorithm for synthesis parameter optimization. Stage 4: Sampling and characterizing the optimized synthesis results. b Physical setup of the automatic platform.

The core of this automated experimental system lies in the decision algorithm we developed for optimizing the synthesis parameters of nanomaterials based on the heuristic A* algorithm framework36. While many researchers typically use methods such as Bayesian optimization37,38,39 and evolutionary algorithms29,40 to explore the parameter space through continuous optimization, it is essential to note that the parameter space for nanomaterial synthesis is fundamentally discrete. In this context, the A* algorithm, with its heuristic properties, enhances informed decision-making during each parameter update and enables efficient navigation from initial values to target parameters within this discrete and well-defined parameter space. Based on a comprehensive comparison of the currently reported optimization algorithms (Supplementary Table 2), under the given synthesis target conditions, the A* algorithm is the most suitable strategy for optimizing the synthesis parameters of nanoparticles in our current work (The schematic diagram for exploring the implementation of the A* algorithm can be found in the Supplementary Information).

Compared with the currently reported automated experimental platforms29,30,37,38,41,42,43, we designed the “Prep and Load” (PAL, model: DHR) system as the platform for automatic nanoparticle synthesis (Fig. 1b). The PAL DHR system featured two Z-axis robotic arms, two Agitators, a centrifuge module, a fast wash module, a UV-vis module, two tray holders, a solution module, and two parking stations for pipettes. The Z-axis robotic arms performed liquid extraction or addition operations by moving tools between the parking station, tray holder, and solution module. They also transferred reaction bottles to the Agitator (12 reaction sites) for mixing and then moved liquid products to the UV-vis module for characterization. The centrifuge module, with a maximum RCF of 2600 × g, separated precipitates from 10 mL and 20 mL vials. The fast wash module efficiently cleaned the injection needle on the tool. The modules’ details are in Supplementary Fig. S1. Our platform offers two significant advantages. First, all the modules are lightweight and detachable, enabling us to load various modules into the X-axis arm for different experimental tasks, such as vortex and ultrasound. Due to its ease of disassembly and assembly, the platform can be effortlessly transferred and utilized in diverse laboratories. Second, all our equipment is commercially accessible, ensuring the consistency of experimental procedures and mitigating the risk of experiments being unreproducible due to inconsistent operations on different automated experimental platforms. It is worth highlighting that users can easily edit the platform’s automation script (mth file). Because instructions for each hardware module are fixed, users only need to modify the name of the targeted object and adjust the order of instructions to customize the script according to their specific requirements. This user-friendly approach enables efficient editing without any programming prerequisites.

Literature mining module

Extracting valuable knowledge from a broad spectrum of chemical literature is a primary task for researchers. The advancement of large language models (LLMs) in AI has significantly improved the rapid extraction of relevant knowledge from extensive chemical literature44,45,46. This progress is particularly beneficial for developing automated laboratories. Consequently, we planned to integrate LLMs into our automated experimental systems to extract synthesis methods and parameters for nanomaterials. The literature mining module included two sub-modules: the summary module and the query module (Fig. 2a). Our literature database was sourced from the Web of Science, where we crawled over 400 papers under the keyword Au nanoparticles.

Fig. 2: Literature mining module and characterization of Au nanobipyramids (Au NBPs).
figure 2

a Workflow of the literature mining module for nanoparticle synthesis. The module is divided into two sub-modules: the summary and query modules. The summary module systematically extracts and processes information from chemical literature through steps that include paper compression, parsing, index construction, and querying. Meanwhile, the query module identifies relevant experimental details and outputs the reagents and operational sequences using a similar approach encompassing paper localization, parsing, index construction, and querying. b UV-vis spectra of Au NBPs samples synthesized with optimal parameters. c TEM images of Au NBPs samples synthesized with optimal parameters. (scale bar = 200 nm). d Longitudinal length statistics of optimal Au NBPs samples. e Radial length statistics of optimal Au NBPs samples.

The summary module handled the initial literature reading and summarized it through four steps: paper compression, paper parsing, index construction, and index querying. Considering LLMs process text with limited token numbers, we first compress each paper’s text to a summary file with structured text to reduce the number of tokens. The summarized information was then subjected to vector embedding using the ada embedding model, followed by target literature selection through vector retrieval. This approach constructed a vector database using inverse document frequency and applied a nearest neighbor search algorithm for efficient information retrieval47. Similar methods have been used in constructing automated laboratories44.

The query module performs an in-depth analysis of specific experiments in four steps: paper localization, paper parsing, index construction, and index querying. Based on the user’s query, the query module first filters and locates relevant articles via a constructed index in the summary module. It identified and retrieved the experimental section of the most relevant literature. Due to the challenges of accurately processing literature with the current GPT model, this module focused on experimental information in text format, excluding figures and images. The query module outputs the reagents information as an unordered list and the experimental operation information as an ordered list, which helps users quickly identify the reagents used and the sequence of experimental steps, facilitating more straightforward analysis and reproduction of the procedures.

To evaluate the accuracy of the literature mining module in retrieving information, we conducted a search focusing on Au nanobipyramids (Au NBPs) as the synthetic target. This process presented two main challenges: (i) Au NBPs synthesis can be achieved through various methods, but some methods have stringent conditions that are hard to replicate in automated experiments. Thus, the modules must provide feedback on the information that can be supported and operated on by our automated system. (ii) The intensive reading section employed the GPT 3.5 model, which may retrieve information in an unordered manner that might lack chemical sense44. Therefore, determining the order of retrieval results and assessing the reliability of synthesis parameters is necessary. To ensure effective retrieval, we imposed limitations during the process by focusing on the seed growth method as the synthesis approach and yield as the target, aiming for high Au NBPs yields from one-time synthesis. After setting the literature mining module based on these requirements, a set of synthesis parameters was obtained (Supplementary Fig. S2), and the synthesis of Au NBPs was carried out accordingly. The UV-vis and TEM analysis results for the Au NBPs sample are shown in Figs. 2b, c. The UV-vis spectrum of Au NBPs displays two SPR peaks at 520 nm and 830 nm, consistent with literature results48. The Au NBPs length was about 115.4 ± 7.7 nm, with a 39.8 ± 3.6 nm diameter. Statistical analysis of TEM images showed that the yield of Au NBPs products reached 75.6% without requiring separation steps (Supplementary Fig. S3). These results indicate that the literature mining module can accurately search for relevant information when multiple keywords are limited, showcasing the module’s effectiveness in retrieving pertinent literature.

The A* algorithm for the optimization of Au nanorods

Having established the system’s capability to retrieve specific nanomaterial synthesis methods, the next focus is on evaluating its effectiveness in nanomaterial synthesis. To assess the AI algorithm’s ability for continuous improvement, we chose Au NRs for optimization studies due to the strong correlation between their morphology, dimensions, and UV-vis spectrum characteristics38. The UV-vis spectra of Au NRs show double peaks, indicating the presence of Au NRs. The low wavelength peak represents transverse surface plasmon resonance (TSPR), and the high wavelength peak represents longitudinal surface plasmon resonance (LSPR). A redshift in LSPR indicates longer nanorods, while a blueshift suggests shorter ones. The LSPR/TSPR peak ratio reflects the aspect ratio and yield. A higher absorption peak intensity ratio at constant LSPR indicates greater yield. The FWHM of the LSPR peak indicates size uniformity. A narrower FWHM at constant LSPR indicates better uniformity. The control of Au NRs morphology and size can be achieved by adjusting experimental parameters49,50,51. The relationship between the morphology and parameters of Au NRs can be predicted through an AI model, allowing researchers to design Au NRs that meet their specific needs through reverse design. However, these methods typically require significant validation data for training AI models. Considering this challenge, we propose a novel approach, the A* algorithm, where a small amount of validated data is used as the initial value of the A* algorithm. By employing continuous decision iteration of the A* algorithm, we can obtain the synthesis parameters of the target Au NRs. This approach minimizes the need for a large volume of validation data and offers a more efficient pathway toward obtaining desired Au NRs.

A* algorithm employed a divide-and-conquer strategy by partitioning the search space into a grid-like structure, evaluating the cost metrics of the current node, initial node, and distance to the target node to compute the optimal path from start to destination52. In the synthesis optimization of the Au NRs, we employed the seed growth method to prepare Au NRs53. The search parameter process of the A* algorithm is as follows (Supplementary Fig. S4): (i) Input initialization parameter points in the Open set (parameter sets that have been experimentally validated and their corresponding UV-vis data). (ii) After evaluating the function and heuristic function, select the most valuable parameter points in the Open Set and expand them in the Subs set according to the set step size to generate new unverified parameters. (iii) Conduct experimental verification based on the new parameter combination and obtain corresponding UV-vis data. (iv) Put the newly validated parameters as new initialization data into the Open set and put the data expanded by the Subs set into the Closed set. (v) Repeat the above process until the synthesis parameters of the target UV-vis features of the nanoparticles are obtained. By adjusted HCl concentration, AgNO3 dosage, and a constant seed type, akin to a three-dimensional path planning exercise in the parameter space (HCl, AgNO3, seed). While the algorithm can traverse any dimensional parameter space, the search duration increases with more parameters. Thus, we demonstrated the exploration of the A* algorithm in a three-dimensional variable space. Unlike conventional pathfinding, we aimed to locate the target node rather than find the shortest path cause the exact targeted synthesis parameters were unknown.

In this process, we established a synthesis objective: searching for the optimal synthesis parameters for the LSPR wavelength within the 600~900 nm range with an interval of 50 nm. The process of optimizing synthesis parameters of the A* algorithm is depicted in Fig. 3a. In this process, the synthesis parameters of Au NRs and their corresponding UV-vis data are utilized as inputs for the A* algorithm. The UV-vis characteristics of the sample are evaluated using built-in functions (1), (2), and (3). Following the input of UV-vis data, the algorithm evaluates the difference between the sample’s LSPR (t) and the designated LSPR target (yLSPR). Subsequently, the deviation results are normalized to determine the assessment score (ZLSPR) of the LSPR target for the sample. The evaluation process for FWHM and LSPR/TSPR peak ratio mirrors that of LSPR. Subsequently, function (4) (5) is employed to evaluate and select parameter points within the parameter space domain. In functions (4) and (5), N denotes the count of selected parameter points, while n signifies the number of exploration steps. Here, K represents the feature set, xjk and xik denote the eigenvalues of j and i in the K dimension, and L signifies the range constant. Assessing the average performance of parameter points within the designated range assists the A* algorithm in selecting suitable parameter values. The A* algorithm prioritizes parameter points with higher Si_UCB values for updating. We have set the step size for each parameter point based on the liquid extraction range of the liquid tool. Finally, repeat the above process until the parameter points of the target result are achieved. Some calculation terms in functions (1) - (4) are represented by hyperparameters A, B, C, and D. Here, we set them to 0.1, 999, 200, and 4, respectively.

$$\begin{array}{c}{{{{\rm{Z}}}}}_{{{{\rm{LSPR}}}}}=1-\frac{{{{\rm{abs}}}}\left({{{{\rm{y}}}}}_{{{{\rm{LSPR}}}}}-{{{\rm{t}}}}\right)}{{{{\rm{B}}}}}({{{\rm{B}}}}={{{{\rm{y}}}}}_{{{{\rm{LSPR}}}},\max }-{{{{\rm{y}}}}}_{{{{\rm{LSPR}}}},\min })\end{array}$$
(1)
$${{{{\rm{Z}}}}}_{{{{\rm{FWHM}}}}}=1-\frac{{{{{\rm{y}}}}}_{{{{\rm{FWHM}}}}}}{{{{\rm{C}}}}}\left({{{\rm{C}}}}={{{{\rm{y}}}}}_{{{{\rm{FWHM}}}},\max -}{{{{\rm{y}}}}}_{{{{\rm{FWHM}}}},\min }\right)$$
(2)
$${{{{\rm{Z}}}}}_{{{{\rm{ratio}}}}}=\frac{{{{{\rm{y}}}}}_{{{{\rm{ratio}}}}}}{{{{\rm{D}}}}}\left({{{\rm{D}}}}={{{{\rm{y}}}}}_{{{{\rm{ratio}}}},\max }-{{{{\rm{y}}}}}_{{{{\rm{ratio}}}},\min }\right)$$
(3)
$${{{{\rm{S}}}}}_{{{{{\rm{i}}}}}_{{{{\rm{UCB}}}}}}=\bar{{{{{\rm{Z}}}}}_{{{{\rm{i}}}}}}+{{{\rm{A}}}}\sqrt{\frac{{{{\mathrm{ln}}}}^{{{{\rm{n}}}}}}{{{{\rm{N}}}}}}$$
(4)
$$\bar{{{{{\rm{Z}}}}}_{{{{\rm{i}}}}}\,}=\frac{1}{{{{\rm{n}}}}}\times {\sum}_{{{{\rm{j}}}}}{{{{\rm{Z}}}}}_{{{{\rm{j}}}}},\,\forall \, {{{\rm{k}}}}\in {{{\rm{K}}}},\,\left|{{{{\rm{x}}}}}_{{{{\rm{jk}}}}}-{{{{\rm{x}}}}}_{{{{\rm{ik}}}}}\right| < {{{\rm{L}}}}$$
(5)
Fig. 3: Optimization and synthesis of Au nanorods (Au NRs) using the A* algorithm.
figure 3

a Process diagram of the A* algorithm for Au NRs optimization. The heuristic function adopts the upper confidence bound (UCB) strategy. A–D are hyperparameters. b Normalized UV-vis spectra of Au NRs with optimized longitudinal surface plasmon resonance (LSPR) peaks (50 nm intervals, 600–900 nm). ci TEM images of final Au NRs products at different LSPR intervals (scale bar = 100 nm). jp The parameters searching process by A* algorithm on the LSPR of Au NRs. The SLSPR value is the algorithm’s calculation of the potential value of parameter points before the experiment, while the ZLSPR value is the algorithm’s evaluation of the proximity of parameter points to the target LSPR after the experiment.

Based on the above process, well-defined UV-vis spectra and TEM images of Au NRs with different LSPRs were achieved (Figs. 3b–i and Supplementary Fig. S5). We focus on three UV-vis spectrum indicators: the LSPR resonance peak position, the LSPR/TSPR peak ratio, and the FWHM. The primary objective was to optimize the LSPR resonance peak position, which is essential for refining the FWHM and peak ratio. The evaluation of LSPR experimental results (ZLSPR) and the value evaluation of parameter point selection (SLSPR) are shown in Fig. 3j–p. Assess the deviation between the experimental LSPR and the target LSPR using a function (1); the closer ZLSPR is to 1, the more the synthesis effect under this parameter aligns with the requirements. With the iterative optimization of synthesis parameters utilizing the A* algorithm, the ZLSPR of the parameter points progressively approached 1, demonstrating the efficacy of decision-making through the A* algorithm. Similar trends in Si and Zi are also observed for optimizing the LSPR/TSPR peak ratio and FWHM (Supplementary Figs. S6 and 7).

The A* algorithm for the optimization of Au nanospheres

In contrast to the strong correlation observed between UV-vis spectrum information and the morphology size of Au NRs, other Au nanoparticles exhibit a weaker correlation between UV-vis spectra and morphology. Au nanoparticles like Au nanocubes (Au NCs)54, Au nanospheres (Au NSs)55, and Au nanoctahedra (Au OCT)56 usually display single peaks in their UV-vis spectra, with peak wavelengths varying by morphology. Unlike Au NRs, the UV-vis peak position will redshift or blueshift with size changes for a specific morphology, such as Au nanospheres. Consequently, different Au nanoparticles can exhibit similar UV-vis spectra, making it hard to assess product distribution and quality from UV-vis spectra alone. Additionally, while the FWHM of Au nanoparticles might indicate size uniformity, the relationship between FWHM and size uniformity is complex due to variations in peak shapes from different characterization equipment and experimental conditions. Accurate particle size and morphology can be obtained through techniques such as dynamic light scattering, TEM, and scanning electron microscopy (SEM); however, integrating these techniques with automated synthesis systems is costly. Neural networks (NN) could establish a parameter-morphology size correlation to make predictions for experiments57,58,59, but challenges include the lack of comprehensive data and high costs for data representation. Thus, an alternative optimization approach is needed.

Previous studies have shown that different nanomaterials with similar UV-vis spectral signals can still be explored for their synthesis parameters through AI algorithms29, but the exploration process has randomness and cannot accurately synthesize nanoparticles with specific morphologies. In this work, we changed the previous strategy by directly assigning specific UV-vis spectra of nanoparticles as the optimization target and optimizing the synthesis parameters through the A* algorithm to match the UV-vis spectra of the final sample with the target. Thus, we chose Au nanospheres (Au NSs) as our research object, assuming that the UV-vis spectrum of Au NSs of a particular size is unique. The A* algorithm was used for optimization with the following steps: (i) Set the UV-vis spectrum of Au NSs of a specific size from literature or databases as the target spectrum. (ii) Compare the UV-vis spectra of synthesized Au NSs to the target spectrum to minimize the mean square error (MSE). (iii) Evaluate the potential of parameter points and select and update them to explore the parameter space. By continuously repeating the above process, the deviation between the UV-vis spectrum of the sample and the target spectrum is continuously reduced. To verify the synthesis result of the sample, we artificially selected the sample with the smallest spectral deviation among the four targets for TEM characterization. For Au NSs with diameters of 24, 54, 69, and 88 nm, we followed existing literature for synthesis methods55. A direct seed growth method was used for the synthesis of 24 nm Au NSs (Fig. 4a), focusing on minimizing MSE. For 54, 69, and 88 nm Au NSs, a two-step growth process was used, involving initial growth of 24 nm Au NSs and subsequent etching with HAuCl4 to achieve target sizes (Fig. 4a). Modifications to the A* algorithm’s heuristic and evaluation functions were made for this process, as shown in Fig. 4b. Typical synthesis processes are detailed in the “Methods” section.

Fig. 4: A* algorithm for Au nanosphere (Au NSs) optimization.
figure 4

a Schematic of the Au NSs synthesis process for sizes of 24, 54, 68, and 88 nm. b The A* algorithm performs two different processes based on the required diameter of Au NSs. Evaluation and heuristic functions for optimizing Au NSs: The mean square error (MSE) measures UV-vis spectrum differences, with Y as target spectrum absorbance, yi as experimental spectrum absorbance, and n as the number of spectral points, E as a hyperparameter, set to 50 for normalization. c Overview of the A* algorithm’s optimization process for Au NSs, showing the results corresponding to the parameter points throughout the entire process. dg The UV-vis spectral curve of Au NSs with target diameter and the final optimized UV-vis spectral curve. hk The diameters distribution of 24, 54, 69, and 88 nm Au NSs under the final optimized parameters of the A* algorithm. lo TEM images of optimized Au NSs with diameters of 24, 54, 68, and 88 nm.

To achieve Au NSs of various desired sizes, the synthesis parameters for Au NSs with a specific diameter of 24 nm must be determined initially. Similar to the optimization process for Au NRs, the initial step involves taking the synthesis parameters and UV-vis data as inputs. The synthesis result at each parameter point is then evaluated using functions (6) and (7), with the specific result assessed based on the score Z1, and the value of the parameter points is evaluated through function (8) based on the score S1, and the parameter points are updated according to the set step size. The parameters we consider in this process include AA concentration, the amount of seed solution added, and temperature. After searching for the preparation parameters of 24 nm Au NSs, we synthesized larger Au NSs (54, 68, and 88 nm) via regrowth and etching, using 24 nm Au NSs as seeds. This process led to an initial increase and subsequent decrease in size, causing a redshift and then a blueshift of the UV-vis SPR resonance peak (Supplementary Fig. S8). To maintain the SPR peak position, the polyhedron resonance peak wavelength needed to exceed the targets. We imposed a criterion that the difference between the polyhedral SPR peak and the target peak should not exceed 15 nm. The corresponding operations and parameter point value evaluation within the algorithm are detailed in functions (9) and (10). For 24 nm Au NSs, among 30 search parameters, 25 had an MSE below 0.01 with an SPR deviation within 3 nm (Fig. 4c), indicating that the initial algorithm input closely matched the target spectrum. After optimizing 24 nm Au NSs, we refined the search for larger Au NSs by adjusting three regrowth parameters (AA dosage, HAuCl4 dosage, and temperature) and two etching parameters (HAuCl4 dosage and temperature). Despite the smaller parameter set, the optimization for 54, 68, and 88 nm Au NSs achieved MSE below 0.01 and SPR deviation within 2 nm within 50 iterations for each size. The A* algorithm was used for 167 searches for 24, 68, and 88 nm Au NSs. The optimization results for Au NSs with diameters of 24, 54, 68, and 88 nm with UV-vis spectra, size statistics, and TEM characterization are shown in Fig. 4d–g, h–k, l–o, and Supplementary Fig. S9. The MSE values for the UV-vis spectra are 0.003, 0.003, 0.002, and 0.003, indicating high accuracy. The SPR resonance peak positions deviate by less than 2 nm, demonstrating the A* algorithm’s effectiveness even with scarce data. This method can also be applied to the experimental planning of Ag nanocubes (Ag NCs), with details in Supplementary Fig. S10.

$${{{\rm{MSE}}}}=\frac{\sum {\left({{{\rm{Y}}}}-{{{{\rm{y}}}}}_{{{{\rm{i}}}}}\right)}^{2}}{{{{\rm{n}}}}}$$
(6)
$${{{{\rm{Z}}}}}_{1}=1-{{{\rm{MSE}}}}$$
(7)
$${{{{\rm{S}}}}}_{1}=\bar{{{{{\rm{Z}}}}}_{1}}$$
(8)
$${{{{\rm{Z}}}}}_{{{{\rm{SPR}}}}}=1-\frac{{{{\rm{abs}}}}\left({{{\rm{x}}}}-{{{{\rm{x}}}}}_{{{{\rm{SPR}}}}}\right)}{{{{\rm{E}}}}}({{{\rm{E}}}}={{{{\rm{x}}}}}_{{{{\rm{SPR}}}},\max }-{{{{\rm{x}}}}}_{{{{\rm{SPR}}}},\min })$$
(9)
$${{{{\rm{S}}}}}_{{{{\rm{SPR}}}}}=\bar{{{{{\rm{Z}}}}}_{{{{\rm{SPR}}}}}}$$
(10)

Discussion

To meet the stringent requirements of machine learning algorithms for reproducible data, we compared the performance of the PAL DHR system with that of manual Au nanorod synthesis. Using identical parameters, we conducted 12 experiments simultaneously with both manual and automated operations, as shown in Supplementary Fig. S11 and Supplementary Table 1. The PAL DHR system exhibited high reproducibility, achieving LSPR peak deviations of just 1.1 nm and FWHM deviations of 2.9 nm. In contrast, manual synthesis resulted in LSPR deviations of up to 21.3 nm and FWHM deviations of 13.1 nm. This comparison highlights the significant advantage of the system in maintaining consistency (Supplementary Fig. S11). To validate the A* algorithm’s optimized parameters, we tested the outcomes for each LSPR segment of Au nanorods. UV-vis spectrum analysis (Supplementary Fig. S12) showed that deviations of both FWHM and LSPR peak were within 2.4 nm, confirming the robustness of the optimization. The results indicate that the system not only saves labor but also ensures the replicability of experimental results compared to conventional manual methods. Moreover, to demonstrate the potential of this automated platform to expand the synthesis of more nanomaterials, we have additionally added the synthesis of octahedral Cu2O and PdCu nanocages (Supplementary Fig. S13).

During the A* algorithm optimization of Au NRs, the LSPR resonance peak position was artificially defined, with evaluations based on a predefined function. As optimization progresses, the LSPR score gradually converges to 1. After establishing the LSPR resonance peak position, optimizations for FWHM and LSPR/TSPR peak ratio were conducted independently, keeping the LSPR value fixed. However, since FWHM and LSPR/TSPR peak ratio were position-dependent, their ZFWHM and ZRatio values converge between 0 and 1 rather than approaching 1. ZFWHM and SFWHM (Supplementary Fig. S6) showed similar trends, and ZRatio followed the pattern of SRatio (Supplementary Fig. S7). Both ZRatio and ZFWHM rise towards their prediction scores, SRatio and SFWHM, as optimization advances. This indicates that the A* algorithm’s optimized outcomes consistently approximate the desired results and demonstrate reliable prediction capabilities across different experimental conditions.

In optimizing the synthesis parameters for Au NSs, we initially supplied spectral results for four distinct diameters of Au NSs. As the objectives for Au NSs are clearer in comparison to Au NRs, the A* algorithm demonstrates higher performance in a discrete parameter space, notably evidenced by the reduced number of experiments necessary for exploring the synthesis parameters of individual target Au NSs as opposed to Au NRs. A similar search process can also be applied to identify the synthesis parameters of Ag NCs of varying sizes (Supplementary Fig. S10).

The choice of intelligent optimization algorithms plays a crucial role in the efficiency and experimental costs of parameter optimization for nanoparticle synthesis. This study employs the heuristic A* algorithm, while the Bayesian optimization-based Olympus60 and the hyperparameter tuning framework Optuna61 also demonstrate applicability for this task. Additionally, we systematically compared the performance of the A* algorithm, Olympus, and Optuna. Using the optimization of LSPR, FWHM, and aspect ratio within the UV-vis spectral response of Au NRs as a research case, we established search objectives based on pre-optimized parameter combinations from the dataset and quantified the number of search iterations required for each algorithm to reach the optimization targets, with comparative results illustrated in Fig. 5. The optimization algorithm is selected, the required number of experiments for synthesizing materials with target properties can be estimated using existing datasets and algorithmic frameworks. The operational principles of the A* algorithm, Olympus, and Optuna exhibit fundamental distinctions: The A* algorithm employs heuristic search with deterministic path planning to compute the experimental steps from current parameters to target synthesis parameters. In contrast, Olympus (utilizing Bayesian optimization) employs probabilistic surrogate models combined with active learning strategies to predict experimental requirements60. Meanwhile, Optuna dynamically optimizes experimental iterations through adaptive sampling strategies (e.g., tree-structured Parzen estimator, TPE) and dynamic pruning mechanisms, with its estimation process adapting to both parameter space dimensionality and sampling efficiency metrics61. In nanoparticle synthesis experiments, where the costs associated with experimental procedures (e.g., time and material resources) are substantial, minimizing the number of search iterations is critical. During the optimization process for synthesis conditions, the A* algorithm exhibits fewer total search iterations compared to Olympus and Optuna.

Fig. 5: Benchmarking the search efficiencies of the A* against the Olympus and Optuna over the optimal parameters for the synthesis of Au nanorods (Au NRs), respectively.
figure 5

a The search times of three algorithms for longitudinal surface plasmon resonance (LSPR) targets of Au NRs. b The search times of three algorithms for optimal full width at half maxima (FWHM) of Au NRs under specific LSPR. c The search times of three algorithms for the optimal absorption peak intensity ratio of Au NRs under specific LSPR.

To validate the accuracy of the process, we performed additional verification experiments. Specifically, Au NRs with LSPR peaks at 670 nm, 780 nm, and 820 nm were selected as algorithmic search targets. To replicate the experimental procedure while ensuring the absence of target property parameters in the existing dataset, the three processes of Au NRs with LSPR peaks at 670 nm, 780 nm, and 820 nm utilized twelve selected datasets as inputs. The corresponding UV-vis spectral results of the input parameters are presented in Supplementary Fig. S14. After optimization by three methods, the spectral results of the search process for A* algorithm, Olympus, and Optuna are shown in Supplementary Fig. S15, and the statistics of the number of experiments required for A* algorithm, Olympus, and Optuna to search for the optimal synthesis parameters of Au NRs are shown in Supplementary Fig. S16. The experimental results demonstrate that the A* algorithm requires the fewest experimental iterations to guide the synthesis parameter optimization of Au NRs, as also evidenced in Fig. 5. Within the current study, the A* algorithm demonstrates higher efficiency compared to Bayesian optimization and random search approaches. The A* algorithm requires the least number of experiments because of its heuristic strategy design, which incorporates prior knowledge. For example, Eqs. (1)–(5) constrain the algorithm’s exploration exclusively toward optimal Si_ucb directions based on spectral data evaluations. While this algorithmic design could theoretically induce local optima, our experimental platform ensures adequate data availability for multi-start exploration. Simultaneously, hardware-imposed volume transfer limitations inherently restrict the parameter space to discrete domains, thereby mitigating the risks of local optima. For Olympus, the core mechanism of Bayesian optimization lies in its use of probabilistic surrogate models to guide exploration of uncharted parameter spaces. However, parameter combinations generated through this probability-driven approach may diverge from chemically intuitive regions. A representative case is illustrated in Supplementary Fig. S15e. While the initial dataset (Supplementary Fig. S14b) contained a parameter combination yielding Au NRs with an LSPR wavelength of 730 nm (closer to the target 780 nm), Olympus prioritized exploration of a chemically suboptimal region, resulting in a first experimental outcome of 718 nm. Such deviations from empirical chemical heuristics may necessitate additional iterations compared to heuristic-guided methods, such as the A* algorithm. Optuna, while serving as a flexible hyperparameter optimization framework supporting diverse sampling methodologies, exhibits two inherent limitations in automated experimentation scenarios. First, its black-box sampling mechanisms generate optimized parameters with limited chemical interpretability, as the decision logic lacks explicit domain-specific constraints. Second, although its reliance on parallelization and pruning mechanisms aims to accelerate convergence, this approach may inadvertently increase the total number of experimental iterations required compared to heuristic-guided methods, particularly when navigating discrete parameter spaces dominated by empirical chemical knowledge.

Moreover, since computational resource consumption in this study is several orders of magnitude lower than the experimental costs, the algorithm’s computational overhead can be considered negligible. However, different systems may require a comprehensive evaluation of additional performance metrics, such as convergence speed, multi-objective optimization capability, and solution robustness. For instance, in single-metal nanoparticle synthesis, where the parameter space dimensionality typically remains below 10, the A* algorithm can effectively navigate the search space. However, when applied to high-dimensional parameter spaces involving concurrent catalyst screening and reaction parameter optimization, the A* algorithm may suffer from the curse of dimensionality, leading to significantly inferior performance compared to Bayesian optimization approaches. In conclusion, integrating the A* algorithm into automated synthesis systems enhances research efficiency and reduces experimental costs. However, its application across different scenarios requires careful algorithm selection or the implementation of hybrid strategies that balance iteration reduction with other critical operational constraints.

In conclusion, our research combines AI models with automated experimental platforms to achieve on-demand synthesis of nanomaterials. For this purpose, we have developed a convenient automated experimental system. The system generates synthesis methods for related nanomaterials through GPT models, allowing users to easily edit scripts to perform automated experiments. At the same time, the system adopts the heuristic A* algorithm to optimize the synthesis parameters of nanomaterials, which can continuously make decisions and explore the synthesis conditions of target products with a small amount of data input, avoiding the construction of large datasets for AI training. This system only requires users to input synthesis parameters and a small amount of experimental data and run corresponding algorithms to achieve automatic on-demand nanomaterials synthesis, significantly freeing up the investment of laboratory human resources. This study demonstrates the decision-making ability of artificial intelligence models in the synthesis parameters of nanomaterials, providing insights and reference values for the construction of fully intelligent laboratories in the future.

Methods

Materials

Tetrachloroauric acid (HAuCl4, 98%), hexadecyltrimethylammonium chloride (CTAC, Sigma–Aldrich), hexadecyltrimethylammonium bromide (CTAB, Sigma–Aldrich, 98%), sodium borohydride (NaBH4, 97%), silver nitrate (AgNO3, 98%), hydrochloric acid (HCl, 37%), ascorbic acid (AA, ≥99%), K2PdCl4 (Sigma–Aldrich), sodium oleate (NaOL, Sigma–Aldrich, 99%), Silver trifluoroacetate (Macklin, 98%), CuCl2·2H2O (Macklin, 98%), KOH (Sigma–Aldrich), PVP (Sigma–Aldrich).

The preparation of Au NBPs

In a 20 mL magnetic vial, 0.022 g of citric acid, 14 mL of CTAC (50 mM), 2.5 mL of HAuCl4 (10 mM), and 0.12 mL of NaBH4 (0.1 M) were added sequentially and stirred at 80 °C for 100 min. After this, 0.05 mL of K2PdCl4 (0.05 mM) was added and incubated for 10 min. Once the temperature dropped to 40 °C, 0.5 mL of AA (0.1 M) was introduced and maintained for 12 h, creating a seed solution for Au NBPs growth. The growth solution was prepared by mixing 10 mL of CTAB (0.1 M), 0.5 mL of HAuCl4 (10 mM), 0.1 mL of AgNO3 (10 mM), 0.2 mL of HCl (1 M), and 0.1 mL of AA (0.1 M). Finally, 0.4 mL of the seed solution was added to the growth solution and stored at 30 °C for 2 h. After reaction completion, the sample is subjected to UV-vis spectrum using a characterization module, and manual TEM characterization is performed to verify the sample morphology.

The preparation of Au NRs

The Agitator temperature was set to 30 °C, and specific amounts of CTAB (0.0987 M), NaOL (0.016 M), AgNO3 (0.004 M), HAuCl4 (0.001 M), HCl (3.654 M), and AA (0.064 M) were sequentially added to the reaction flask and mixed, totaling less than 10 mL. Meanwhile, 3.5 mL of ultrapure water, 3.5 mL of CTAB (0.2 M), and 3.5 mL of HAuCl4 (0.001 M) were added to the seed vial and mixed using a vortex mixer. Next, 2.5 mL of NaBH4 (0.06 M) was added to the seed vial and vortexed for 3 min to prepare the seed crystals, which were then stored at room temperature for 30 min. A designated quantity of seed crystals was subsequently added to the reaction flask in the Agitator and maintained at 30 °C for 12 h. Finally, all the resulting products were collected for UV-vis characterization, and the optimal sample obtained was further characterized manually by TEM.

The preparation of Au NSs

An automated platform facilitated the experimental procedure. The Agitator temperature was set to 30 °C, with the crystal seed bottle placed inside. Subsequently, 17.55 mL of CTAB (0.1 M), 0.36 mL of HAuCl4 (0.01 M), and 1.1 mL of NaBH4 (0.1 M) were added, and the mixture was maintained at a temperature for 3 h. Next, ultrapure water, CTAB (0.1 M), HAuCl4 (0.01 M), and AA (0.1 M) were sequentially added to the reaction flask. A portion of the solution from the crystal seed bottle was then transferred to the reaction flask and kept at 30 °C for 12 h. During the regrowth phase, the Agitator temperature was adjusted to 45 °C. After centrifugation and concentration, AA (0.1 M) and HAuCl4 (0.01 M) were added to the reaction flask and stored at 45 °C for 3 h. Finally, additional HAuCl4 (0.01 M) was added for etching. Finally, all the resulting products were collected for UV-vis characterization, and the optimal sample obtained is further characterized manually by TEM.

The preparation of Ag NCs

The Agitator temperature was set to 30 °C. The seed vial was transferred into the Agitator, and 10 mL of 0.5 mM CTAC, 25 µL of 0.1 M AgNO3, and 0.45 mL of 0.02 M NaBH4 were added to the seed vial using liquid handling tools. The mixture was kept undisturbed for 40 min to form a seed solution. Next, the Agitator temperature was set to 60 °C. 10 mL of 0.02 M CTAC was stored in the reaction vials and transferred to the Agitator. Then, 0.1 mL of 0.1 M CF3COOAg was added from the CF3COOAg vial to the reaction vials. A specific amount of seed solution from the seed vial was also added to the reaction vials, and the mixture was stirred for 20 min. Subsequently, 0.1 mL of 0.1 M AA was added in batches, with a total volume of 1 mL, and the mixture was stirred at 60 °C for 3 h. Finally, all the resulting products were collected for UV-vis characterization, and the optimal sample obtained is further characterized manually by TEM.

The preparation of octahedral Cu2O

The Agitator temperature was set to 40 °C, and a 20 mL magnetic vial was filled with 0.45 g of PVP. The magnetic vials were transferred to the Agitator, and using liquid handling tools, 10 mL of 10 mM CuCl2 and 1 mL of 2 M KOH were added to the magnetic vials. After stirring for 5 min, 0.1 mL of 0.6 M AA was added in batches, totaling 1 mL, using the liquid tools. Finally, the Agitator was set to oscillate at 500 rpm for 3 h. The morphology of the synthesized sample was characterized by TEM, and the distribution of its constituent elements was analyzed by EDS-mapping.

The preparation of PdCu nanocages

Set the Agitator temperature to 30 °C and transfer the magnetic vials containing Cu2O to the centrifuge module to remove the supernatant. Afterward, the magnetic vials containing Cu2O were returned to the Agitator, and 10 mL of PVP was added to the PVP container. Once the Agitator has stirred for 10 min, add a specific amount of 10 mM K2PdCl4 from the K2PdCl4 vial to the magnetic cap bottle. After stirring with the Agitator for 20 min, add 50 µL of CH3COOH to remove the Cu2O. The morphology of the synthesized sample was characterized by TEM, and the distribution of its constituent elements was analyzed by EDS-mapping.

Computational tools

Specifically, we used the OpenAI gpt-3.5-turbo model (accessed via the llama-index framework with version 0.9.48 through the ChatGPT API, version dated January 25, 2024) for language-related tasks.

Statistics and reproducibility

All experiments were independently repeated a minimum of three times with consistent results, unless otherwise specified. The statistical experiments were conducted in three separate batches, with 50 nanoparticles analyzed in each batch. For each sample, a total of 150 nanoparticles were counted.

Hardware modules

The hardware component of the automated experimental system consists of a PAL system equipped with CTC Analytics series modules. The system uses the Epoch2 enzyme-linked immunosorbent (using 96-bit microporous plates) assay in conjunction with PAL DHR to conduct automatic characterization. The specific parameters of the modules are as follows:

  1. (a)

    Centrifuge module: There are three different models to choose from: “Centrifuge Module 2 mL”, “Centrifuge Module 10 mL”, and “Centrifuge Module Combi”. The system utilizes a 10 mL centrifuge module, supporting the centrifugation of up to six 10 mL bottles, with a maximum RCF of 2600 × g.

  2. (b)

    Solution module: Adapt to three 100 mL large-volume solvent bottles. Passive modules need to be added and calibrated in the PAL terminal.

  3. (c)

    Fast wash: Up to two needle-washing solvents can be transported through a micro pump. The injection needle is rinsed on the outer wall by inserting two liner positions, Wash1 and Wash2, while a Z-axis robotic arm pulls the injection rod to clean the inside of the injection needle. (Micro pump flow rate: 60 μL/s.)

  4. (d)

    Agitator: Used for heating and oscillation to achieve two-phase equilibrium. The Agitator can be adapted to three different reaction flasks of 2/10/20 mL, and one Agitator can simultaneously react with up to six sample flasks. Temperature control range: 30~200 °C optional, with an increment of 1 °C. The oscillation adopts a track interval oscillation, and the speed can be selected between 250 and 750 rpm.

  5. (e)

    Tray holder: A single Tray Holder can load three racks. Passive modules need to be added and calibrated in the PAL terminal.

  6. (f)

    Racks: Two types of sample disks, VT54 and VT15, are used in the automated experimental system. VT54 can accommodate 54 2 mL sample bottles, while VT15 can accommodate 15 10 mL and 20 mL sample bottles.

  7. (g)

    Park Station: Used to park injection tools, a single Park Station can park up to three tools and identify the corresponding injection needle types. A PAL system can accommodate up to two Park Stations.

  8. (h)

    Liquid tool: Composed of a needle holder and an injection needle, it is used to carry a Z-axis robotic arm for fluid transfer and bottle movement operations. The automated experimental system utilizes liquid injection needles with a range specification of 100 μL, 1000 μL, and 10,000 μL, as well as replaceable needles.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.