An agent-based method and apparatus for model training

CN122987990APending Publication Date: 2026-10-27MATRIXTIME ROBOTICS (SHANGHAI) CO LTD
View PDF 0 Cites -1 Cited by

Patent Information

Application Number
CN202610866122.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]但在现有技术中半导体缺陷检测模型的训练过程中仍然存在依赖人工经验、通用化训练框架难以适配半导体缺陷检测的特殊需求等技术缺陷,上述缺陷共同导致现有缺陷检测模型开发周期长、试错成本高、跨场景适应性差的技术问题

Benefits of technology

本申请实施例提供的技术方案中,通过引入智能体作为核心调度器,构建了任务输入、知识检索、逻辑推理、训练决策、任务下发的闭环工作流。基于智能体的自然语言理解与推理能力,将检测需求映射为精确的任务目标,并基于结构化领域知识库中检索出于当前工序强相关的业务规则和特征描述,从而生成适配的任务参数。相较于传统依赖人工调参的通用训练方式,这种知识驱动的机制不仅显著降低了非算法背景工艺工程师的使用门槛,还有效避免了通用增强策略破坏缺陷空间一致性的问题,从而缩短了模型开发周期并提高了跨场景适应能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122987990A_ABST
    Figure CN122987990A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of semiconductor detection, and is a kind of intelligent semiconductor detection method, in particular to a method and device for model training based on an intelligent agent. The application introduces an intelligent agent as a core dispatcher, and constructs a closed-loop workflow of task input, knowledge retrieval, logical reasoning, training decision and task issuance. Based on the natural language understanding and reasoning ability of the intelligent agent, the detection requirement is mapped to an accurate task target, and the business rules and feature descriptions strongly related to the current process are retrieved from the structured domain knowledge base, so that the adaptive task parameters are generated. Compared with the traditional general training method relying on manual parameter adjustment, this knowledge-driven mechanism not only significantly reduces the use threshold of non-algorithm background process engineers, but also effectively avoids the problem of destroying the consistency of the defect space by the general enhancement strategy, thereby shortening the model development cycle and improving the cross-scene adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor detection technology, specifically an intelligent semiconductor detection method, and more specifically, a method and apparatus for model training based on intelligent agents. Background Technology

[0002] In semiconductor manufacturing, the accurate identification and classification of wafer surface defects is a crucial step in ensuring chip yield and process stability. As process nodes continue to shrink and device structures become increasingly complex, defect morphologies are becoming more diverse, miniaturized, and concealed, placing higher demands on the accuracy, robustness, and generalization ability of detection systems.

[0003] In recent years, deep learning-based visual inspection models have been widely used in semiconductor defect identification tasks, including convolutional neural networks, Transformer architectures, and their variants. These models typically rely on large-scale labeled image data for end-to-end training and can achieve good performance under specific production line or process conditions.

[0004] However, the training process of existing semiconductor defect detection models still suffers from technical defects such as reliance on human experience and difficulty in adapting generalized training frameworks to the special needs of semiconductor defect detection. These defects together lead to technical problems such as long development cycles, high trial and error costs, and poor cross-scenario adaptability of existing defect detection models. Summary of the Invention

[0005] To address the technical problems in the prior art, embodiments of this application provide a method and apparatus for model training based on intelligent agents, which achieves automated model training by utilizing intelligent agents and a knowledge base in the semiconductor field.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, a method for model training based on an intelligent agent is provided. The method includes: receiving natural language from a user for model training and parsing the natural language to obtain a task objective; the task objective includes a training task objective and a business task objective; retrieving associated business rules and feature descriptions based on the task objective and generating a corresponding task strategy based on an inference mechanism; the task strategy includes task parameters; creating a model training task by calling a port and issuing training instructions based on the task strategy until model training is completed.

[0007] In some specific implementations, the task parameters include model topology, hyperparameters, training dataset, and loss function weights.

[0008] In some specific implementations, the business rules and feature descriptions are stored in a domain knowledge base, which is built based on a wiki engine.

[0009] In some specific implementations, the domain knowledge base stores multiple knowledge files, which are stored in Markdown format, indexed by index.md, and referenced by bidirectional links.

[0010] In some specific implementations, constructing the domain knowledge base includes: extracting key information from the acquired original domain text, extracting attributes from the extracted key information to obtain structured knowledge records containing multiple attributes, and storing the structured knowledge records to form knowledge files.

[0011] In some specific implementations, the extracted key information is used to extract attributes to obtain a structured knowledge record containing multiple attributes, including: filling the key information with boundary markers to predict different types of entities, and extracting multiple entities based on the start and end marks of the boundary markers.

[0012] In some specific implementations, the boundary markers are constructed based on templates; the templates include word-based templates and instance-based templates, the word-based templates are filled with labeled words, and the instance-based templates are constructed by concatenating instances of different entity types.

[0013] In some specific implementations, issuing training instructions based on the task strategy until the model training is completed includes: obtaining the degree of deviation of the feedback state of key parameters during the training process, and adjusting the task parameters based on the degree of deviation until the feedback state of the key parameters meets the target requirements.

[0014] In some specific implementations, the key parameters include validation set error, fitting parameters, class balance, loss curve, gradient value, recall, and precision.

[0015] Secondly, an agent-based apparatus for model training is provided, comprising: a parsing unit for receiving natural language from a user for model training and parsing the natural language to obtain a task objective; a policy generation unit for retrieving associated business rules and feature descriptions based on the task objective and generating a corresponding task policy based on an inference mechanism; the task policy including task parameters; and a training supervision unit for calling a port to create a model training task and issuing training instructions based on the task policy until model training is completed.

[0016] The embodiments of this application bring the following beneficial effects: The technical solution provided in this application introduces an intelligent agent as the core scheduler, constructing a closed-loop workflow encompassing task input, knowledge retrieval, logical reasoning, training decision-making, and task assignment. Based on the agent's natural language understanding and reasoning capabilities, detection requirements are mapped to precise task objectives. Furthermore, by retrieving business rules and feature descriptions strongly related to the current process from a structured domain knowledge base, suitable task parameters are generated. Compared to traditional general training methods that rely on manual parameter tuning, this knowledge-driven mechanism significantly lowers the barrier to entry for process engineers without an algorithmic background and effectively avoids the problem of general enhancement strategies disrupting defect space consistency, thereby shortening the model development cycle and improving cross-scenario adaptability.

[0017] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.

[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] The methods, systems, and / or procedures shown in the accompanying drawings will be further described with reference to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. These exemplary embodiments are non-limiting exemplary embodiments, wherein example figures represent similar mechanisms in the various views of the drawings.

[0021] Figure 1 This application provides a schematic diagram of a method for model training based on intelligent agents.

[0022] Figure 2 This is a schematic diagram of an agent-based device for model training.

[0023] Figure 3 This is a schematic diagram of another agent-based device for model training.

[0024] Figure 4 This is a schematic diagram of a computer system architecture. Detailed Implementation

[0025] To better understand the above technical solutions, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of this application, rather than limitations on the technical solutions of this application. In the absence of conflict, the embodiments of this application and the technical features in the embodiments can be combined with each other.

[0026] In the detailed description below, numerous specific details are illustrated with examples to provide a comprehensive understanding of the relevant guidance. However, it will be apparent to those skilled in the art that this application can be practiced without these details. In other instances, well-known methods, procedures, systems, components, and / or circuits have been described at a relatively high level without detail to avoid unnecessarily obscuring aspects of this application.

[0027] This application uses flowcharts to illustrate the execution process performed by a system according to embodiments of this application. It should be clearly understood that the execution processes in the flowcharts may not be executed sequentially. Instead, these execution processes may be executed in reverse order or simultaneously. Additionally, at least one other execution process may be added to the flowchart. One or more execution processes may be deleted from the flowchart.

[0028] This embodiment provides an agent-based method for model training, applied in the field of semiconductor inspection. Specifically, it relates to an automatic neural network training method for semiconductor defect detection. Based on this method, a neural network model related to the detection task is obtained. The trained neural network model can perform defect detection on semiconductor products.

[0029] Specifically, the semiconductor products in this example include unpatterned wafers, patterned wafers, package structures, and other types of electronic components.

[0030] Typically, training neural network models is primarily handled manually by algorithm engineers based on their personal experience, involving key steps such as data augmentation strategy design, network architecture selection, hyperparameter configuration, and loss function construction. This decision-making process lacks explicit correlation with semiconductor process knowledge, resulting in weak generalization ability, poor reproducibility, and difficulty in migrating training strategies across different production lines or new process nodes. Furthermore, current training platforms mostly provide services via code scripts or graphical parameter interfaces, requiring users to have experience in deep learning hyperparameter tuning and an understanding of the underlying training mechanisms. While frontline users such as process engineers possess extensive experience in identifying process defects and have production line knowledge, their lack of model training skills prevents them from directly driving iterative model optimization, reducing the possibility of successful model iteration.

[0031] Furthermore, in order to solve the above-mentioned technical problems, see [reference needed]. Figure 1An exemplary flowchart of an agent-based method for model training according to an embodiment of the present disclosure is shown. Based on this flowchart, it can be seen that the method includes the following steps: Step S11. Receive natural language from the user for model training, and parse the natural language to obtain the task objective.

[0032] In this embodiment, the task objectives include training task objectives and business task objectives. Training task objectives include the type of model to be built, including but not limited to classification models, segmentation models, or object detection models, as well as other basic training requirements. Business task objectives include but are not limited to application scenarios, process stages, detection objects, and specific quality constraints. This dual-objective parsing mechanism allows the system to simultaneously understand "the type of model that needs to be trained" and "the business problem for which training is being conducted," thereby laying a semantic foundation for subsequent accurate matching of domain knowledge.

[0033] In this embodiment, natural language parsing is implemented using a large language model. Specifically, the agent first receives unstructured instructions from the user in natural language form, such as "detect sphere size anomalies in the review images of the Bumping process." The agent performs multi-level semantic parsing of the instructions based on the large language model. This parsing process first preprocesses the received natural language text, including encoding format unification and special character cleaning. Then, a word segmenter divides the text into a sequence of tokens, mapping each token to a high-dimensional embedding vector. Subsequently, the token vector sequence is input into a large language model based on the Transformer architecture for deep semantic encoding. The model calculates the association weights between tokens through a multi-layer self-attention mechanism to capture long-distance semantic dependencies in the text, and extracts features in parallel from different semantic subspaces through a multi-head attention mechanism, so that the representation of each token after stacking multiple encoders incorporates global contextual information. Building upon this foundation, the semantic understanding capabilities of the large language model, pre-trained on a massive corpus, are leveraged. Combined with pre-defined prompt templates, the model is guided to perform intent recognition and entity extraction tasks, transforming unstructured natural language input into structured output containing intent classification labels and entity annotations. Finally, the model output undergoes format parsing and consistency verification, decoupling and extracting two key types of information.

[0034] It should be understood that the large language model in the embodiments of this application can be an autoregressive model based on a Decoder-only architecture, a sequence-to-sequence model based on an Encoder-Decoder architecture, or a sparse activation model based on a hybrid expert architecture. As long as it has the ability to deeply understand the semantics of natural language and extract structured information, the large language model in the prior art can be used, and will not be elaborated further in this embodiment.

[0035] Step S12. Based on the task objective, retrieve the associated business rules and feature descriptions, and generate the corresponding task strategy based on the reasoning mechanism.

[0036] Given a clearly defined task objective, the agent in this embodiment does not directly apply a generic template, but actively retrieves business rules and feature descriptions strongly related to the current business task objective. These rules and descriptions include physical constraints under semiconductor processes, defect imaging features, and historical experience information.

[0037] Furthermore, based on the retrieved knowledge and training task objectives, a task strategy adapted to the current scenario is dynamically generated through logical fusion. For example, when a business task is identified to involve size-sensitive defects, the inference mechanism derives a policy constraint disabling set deformation enhancement based on relevant business rules and transforms it into specific task parameter configurations. In this embodiment, the inference mechanism is a transformation engine from domain knowledge to executable decisions, ensuring that the generated task strategy not only conforms to algorithm specifications but also incorporates the prior wisdom of industry experts. Compared to traditional static rule matching, the above-mentioned inference-based strategy generation can handle more complex contextual dependencies, thereby improving the targeting of the training scheme.

[0038] In this embodiment, the task strategy includes task parameters, which include model topology, hyperparameters, training dataset, and loss function weights.

[0039] Specifically, model topology refers to the basic architecture of a neural network and its variant configurations. For example, in a semiconductor defect segmentation task, the agent might choose a UNet network as the basic architecture based on a knowledge base recommendation, or it could replace its encoder with ConvNeXt as a variant. Hyperparameters cover global variables that control the training process, including but not limited to learning rate, batch size, training epochs, and optimizer type. These parameters need to be finely set according to the distribution characteristics of specific process data, rather than simply applying general default values. The training dataset refers not only to the path references of image files but also to the combination strategy of data augmentation operators. For example, automatically disabling random scaling for size-sensitive defects and configuring the sampling ratio of positive and negative samples. Loss function weights are used to balance the gradient contributions between different types or different agents, especially in scenarios where defect samples are extremely imbalanced. By assigning a higher penalty coefficient to fatal defects, the model is forced to prioritize high-risk samples during optimization.

[0040] As one implementation method, business rules and feature descriptions are stored in a domain knowledge base, which is built based on a wiki engine.

[0041] Specifically, this application does not employ traditional relational databases or purely vector databases to store semiconductor-related expertise. Compared to the problem of pure vector databases losing original semantic details and logical structure after converting text into high-dimensional vectors, the knowledge base built on a wiki engine preserves the original textual form and explicit relationships of knowledge. This allows large language models to directly read and understand the process constraint logic within the knowledge without relying on vector retrieval that may have semantic biases. This architecture solves the semantic alignment problem between domain knowledge and generative AI models, providing agents with a foundation that possesses structured logic while retaining linguistic flexibility.

[0042] Furthermore, the domain knowledge base in this embodiment stores multiple knowledge files, which are stored in Markdown format and indexed by index.md, and the knowledge files are referenced by bidirectional links.

[0043] Specifically, each knowledge file is written in Markdown, ensuring cross-platform compatibility and allowing large language models to directly parse the content without additional format conversion due to its plain text nature, reducing information loss. Furthermore, at the file organization level, this embodiment introduces an `index.md` file as a global index file, which acts as the target navigation for the knowledge base, recording the entry points and hierarchical relationships of all key knowledge nodes. When the agent receives a task objective, it can preferentially read `index.md` to quickly locate the relevant knowledge domain, rather than blindly traversing all files, significantly improving retrieval response speed. Notably, knowledge files establish referencing relationships through bidirectional linking syntax. For example, in a file describing a "sphere size anomaly" defect, a link to the corresponding process rule file can be used via "Bumping process constraints," and the process rule file can then link back to related defect cases. This bidirectional linking mechanism constructs a semantic topology network between discrete Markdown files, enabling the agent to possess expert associative thinking. Starting from a knowledge point, it can automatically jump along the link path to related process parameters, imaging features, or historical solutions, achieving cross-knowledge point associative reasoning.

[0044] Through the above-mentioned combined architecture of "markdown storage + index + bidirectional link", the embodiments of this application, while ensuring that the knowledge base is easy to maintain and expand, endow the intelligent agent with the ability to navigate accurately and reason deeply in the complex semiconductor knowledge system, effectively supporting the automatic generation of high-quality training strategies.

[0045] As one implementation method, the construction of the above-mentioned domain knowledge base includes: extracting key information from the acquired original domain text, extracting attributes from the extracted key information to obtain structured knowledge records containing multiple attributes, and storing the structured knowledge records to form knowledge files.

[0046] Specifically, expertise in semiconductor manufacturing is often scattered across massive amounts of unstructured documents, such as process integration specifications, historical case records, and equipment maintenance logs. These texts lack unified semantic decoupling, making them difficult for intelligent agents to directly use for logical reasoning. Therefore, this embodiment uses natural language processing technology to transform unstructured text into understandable structured knowledge records. Specifically, the original corpus is first preprocessed and key information extracted. This process utilizes layout analysis technology to identify titles, paragraphs, and table areas, or text classification technology to filter out core segments strongly related to defect detection. Existing text processing technologies can be used for layout analysis and text classification. The results of different approaches do not affect the overall technical effect of this embodiment, and will not be elaborated further in this embodiment.

[0047] Specifically, fine-grained attribute extraction is performed on the extracted key information, decoupling the originally mixed information such as process parameters, defect phenomena, and equipment status into independent attribute fields. For example, a text describing "short circuit caused by solder ball diameter being too large during the Bumping process" is transformed into a structured record with "Process = Bumping", "Defect Type = Solder Ball Diameter Too Large", and "Consequence = Short Circuit". Finally, the above structured record is written into a knowledge file based on Markdown format, and the index and link relationships are automatically updated.

[0048] Based on the above processing, this application embodiment automatically extracts high-quality domain knowledge from complex raw text data, reducing the manual cost of knowledge base construction, while ensuring the standardization and consistency of knowledge entry formats, laying a data foundation for the subsequent accurate retrieval by intelligent agents.

[0049] Furthermore, in order to achieve high-precision information extraction in the semiconductor vertical field where labeled samples are scarce, the extracted key information is subjected to attribute extraction to obtain a structured knowledge record containing multiple attributes, including: filling boundary markers in the key information to predict different types of entities, and extracting multiple entities based on the start and end labels of the boundary markers.

[0050] Specifically, traditional named entity recognition methods typically require a large amount of manually labeled training data to achieve usable accuracy, which is often difficult to meet in the semiconductor field. To address this issue, this application adopts a prompt-based machine reading comprehension approach. During attribute extraction, it does not rely on a fixed sequence labeling system, but dynamically fills specific boundary markers into the input key information text sequence. Specifically, the prompt-based machine reading comprehension in this embodiment is constructed using the PMRC model, which transforms the machine reading comprehension framework into an entity recognition method implemented through template prompts. Furthermore, existing solutions can be used for the PMRC model in this embodiment, and will not be elaborated further in this embodiment.

[0051] In this model, the boundary markers act as semantic anchors, guiding the model to focus on specific types of entity fragments within the text. The precise boundaries of entities are located by predicting the probability distribution of each position as the start and end markers of an entity. For example, when extracting the attribute "defect type," boundary markers representing "defect type" are inserted in the text prefix or at specific positions. This involves calculating the confidence level of each word in the text as the start or end point of that type of entity, and finally decoding the specific entity content based on the pairing of start and end positions. It should be understood that although this embodiment uses start and end markers as the specific implementation method for boundary localization, other sequence labeling systems such as BIO and BIOES can also be used in other embodiments. As long as the function of locating and extracting target entities from unstructured text based on semantic cues can be achieved, it should be covered within the scope of protection of this invention. This boundary marker-based prediction mechanism allows the model to fully utilize the semantic understanding capabilities of the pre-trained language model, maintaining sensitivity to technical terms even with very few labeled samples, effectively solving the knowledge extraction problem in the cold start phase.

[0052] In the above entity extraction mechanism, boundary markers are constructed based on templates; the templates include word-based templates and instance-based templates, wherein word-based templates are filled with labeled words, and instance-based templates are constructed by concatenating instances of different entity types.

[0053] Specifically, the design quality of the template directly determines the accuracy and generalization ability of entity extraction. This embodiment enhances the semantic expressiveness of boundary markers by combining two construction strategies: word-based templates and example-based templates. Word-based templates are constructed by filling in explicit labeled words, such as using natural language terms like "dataset name," "defect name," "process stage," and "equipment model" as prompts. This leverages the prior knowledge of natural language from the large language model, enabling the model to quickly understand the semantic category of the entity to be extracted and providing a clear query instruction. Example-based templates are constructed by concatenating real-world instances of different entity types, for example including known defect instances such as "abnormal sphere size," "metal residue," and "photoresist peeling." This provides the model with few-sample examples within the context, helping it accurately identify entity boundaries through analogical reasoning when faced with ambiguous expressions or new terminology variations. In practical applications, word-based templates and example-based templates can be combined to form the following example text: "Please find the [defect type] in the following text, see examples: [abnormal sphere size], [crack]: {input text}", a composite prompt structure. This dual-template mechanism improves the model's accuracy in recognizing semiconductor terminology and enhances its transfer adaptability. When a new process is introduced to the production line or a new defect appears, only the corresponding tag words in the template need to be updated or a few new instances need to be added. There's no need to re-collect large-scale data for model fine-tuning, allowing for rapid adaptation to new extraction tasks. This transferability feature, which eliminates the need for model retraining, significantly reduces the technical barriers and computational costs of continuous knowledge base maintenance, ensuring that the domain knowledge base can evolve in real time with business development.

[0054] Step S13. Call the port to create a model training task, and issue training instructions based on the task strategy until the model training is completed.

[0055] Specifically, the agent encapsulates the generated task policy containing specific task parameters into standardized request data and interacts with the underlying model training platform by calling a predefined port. The port, as an abstract communication interface, shields the agent from the differences in the underlying training framework, allowing the agent to focus solely on policy-level command issuance without needing to concern itself with the specific code implementation or hardware environment. During training task creation, the system automatically executes the entire process, including data loading, model initialization, and iterative optimization, according to the task policy, until the model training is complete and the results are output.

[0056] In the above process, the intelligent agent acts as a bridge between the upper-level decision-maker and the lower-level executor, enabling unattended operation of the training process. It should be understood that although the diagram shows a linear execution flow, in practical applications, this port call can also support asynchronous feedback or status queries, as long as the training instructions are accurately executed according to the strategy. Through the above closed-loop process, this embodiment integrates the dispersed knowledge, decision-making, and execution stages into an organic whole, effectively solving the technical problem in the prior art where model training highly relies on human experience and has low knowledge utilization.

[0057] To more clearly illustrate the application value and technical effects of the present invention in actual industrial scenarios, this embodiment takes the detection of abnormal ball size in the Bumping process of semiconductor manufacturing as an example to provide a full-process exemplary demonstration of the technical solutions described in the foregoing embodiments.

[0058] In this application scenario, the intent parsing and task objective establishment phase is executed first. The process engineer, as the user, does not need to write any code or configure complex parameter files; they only need to input a natural language command through the human-computer interaction interface: "Detect ball size anomalies in the review image of the Bumping process." Upon receiving this command, the agent decouples it into dual task objectives based on the parsing logic: the training task objective is identified as "semantic segmentation model training," because ball size anomalies typically manifest as geometric deformation of the solder ball boundary, requiring pixel-level localization capabilities; the business task objective is precisely extracted as "process node = Bumping," "data modality = review optical image," and "defect type = ball size anomaly." This parsing method ensures that subsequent knowledge retrieval can be accurately anchored to a specific process context, avoiding semantic drift when a general-purpose model handles highly specialized tasks.

[0059] Subsequently, based on the parsed business task objectives, the agent performs targeted searches in the domain knowledge base. Specifically, the agent quickly locates the knowledge domain related to "Bumping process" through the index.md index and reads the associated process constraint files along the bidirectional link of "ball size anomaly". During this process, the agent retrieves a key business rule: "Ball size anomaly is a geometrically sensitive defect. Its judgment criteria strictly depend on the absolute pixel size and are extremely sensitive to data augmentation operators such as random scaling and elastic deformation. Such operations will destroy the mapping relationship between the true physical size of the solder ball and the image pixels, causing the model to learn incorrect scale features." Based on this domain knowledge, the agent's reasoning mechanism automatically generates a customized task strategy: in the data augmentation configuration, random scaling and elastic deformation operators are explicitly disabled, retaining only brightness adjustment and noise injection that do not affect geometric dimensions; in the model topology selection, based on the recommended entries for "minor boundary defects" in the knowledge base, UNet++ is automatically selected as the basic segmentation architecture, and the encoder is replaced with the ConvNeXt backbone network, utilizing its stronger local perception capability to capture subtle distortions at the solder ball edges; simultaneously, according to the defect severity level definition, the loss function weights are initialized, assigning an initial penalty coefficient three times higher than that for the critical defect category of "abnormal ball size" than for ordinary appearance defects. This process fully demonstrates the core technical advantage of this invention in transforming unstructured process experience into executable training parameters, making the generated strategy both compliant with deep learning specifications and embedding the physical constraints of semiconductor manufacturing.

[0060] Finally, the system executes the closed-loop training and dynamic adjustment phase. The agent initiates the model training task by calling the underlying training platform through a port. During training, the training supervision unit continuously monitors the feedback status of key parameters. Suppose that in the 20th training cycle, the system detects that the recall rate of the "abnormal sphere size" category on the validation set is only 75%, lower than the preset target threshold of 90%, and the loss curve shows that the loss value of this category decreases slowly, while the indicators of other categories are normal. At this time, based on the feedback adjustment mechanism, the agent determines that the current model is insufficient in responding to the features of small-sized defects, and then triggers adaptive parameter adjustment: automatically increasing the weight of the loss function for this category from 3 times to 5 times, forcing gradient updates to pay more attention to such difficult samples; at the same time, considering that the low recall rate may be due to the positive sample features being submerged by the background, the agent further adjusts to increase the sampling probability of high-loss samples. After the subsequent 10 training cycles of iterative training, the recall rate of this category increases to 92%, meeting the target requirement, and the training task is automatically completed and the optimal model weights are output. This specific scenario demonstration demonstrates that the present invention not only automates the process from natural language to model delivery, but more importantly, it establishes a dynamic optimization loop guided by domain knowledge during the training process. This effectively solves the practical problems of poor model generalization ability and high missed detection rate of key defects caused by the lack of process knowledge in traditional methods, and significantly reduces the collaboration threshold between algorithm engineers and process experts.

[0061] In summary, this application's embodiments, by constructing a semiconductor domain knowledge base and introducing an intelligent agent as the core scheduler, can automatically transform knowledge such as defect taxonomy experience, physical imaging characteristics, and process constraints in semiconductor defect detection tasks into model training strategies. Users do not need in-depth neural network parameter tuning knowledge; they only need to describe the detection task in natural language, and the intelligent agent can drive the closed-loop training of a high-performance model.

[0062] For further details, please refer to [link / reference]. Figure 2 This embodiment provides an agent-based device 20 for model training. Through modular functional unit design, the device solidifies the aforementioned method flow into a reusable product form, ensuring consistency between the scope of protection of the product claims and the method claims. The device includes: a parsing unit 21, a strategy generation unit 22, and a training supervision unit 23.

[0063] The parsing unit 21 is used to receive natural language from the user for model training and parse the natural language to obtain the task objective.

[0064] Specifically, the parsing unit is the human-computer interaction entry point and semantic understanding core of the device, integrating a natural language processing model and intent recognition algorithm. When a user inputs unstructured text commands, the parsing unit does not simply perform keyword matching, but decouples the command into structured data with two dimensions: a training task objective and a business task objective, through semantic analysis. For example, from the command "Train a segmentation model to detect sphere size anomalies in the Bumping process based on the Bumping sphere size anomaly dataset," the parsing unit can accurately extract the dataset content and name for training, with "segmentation model training" as the training task objective and "bumping sphere size defect" as the business task objective. It should be understood that although the parsing unit is described as an independent functional module in this embodiment, in actual deployment, it can be implemented by the API interface of a large language model, a locally deployed NLP service, or a dedicated semantic parsing module, as long as it can complete the mapping function from natural language to dual task objectives. Through the standardized output of the parsing unit, subsequent units do not need to process fuzzy natural language input, thereby reducing the processing complexity and error probability of the entire device.

[0065] The strategy generation unit 22 is used to retrieve relevant business rules and feature descriptions based on the task objectives, and generate corresponding task strategies based on the reasoning mechanism.

[0066] Specifically, the task strategy includes task parameters. The strategy generation unit maintains a communication connection with the domain knowledge base. After receiving the task objective output by the parsing unit, the strategy generation unit first performs a targeted search in the knowledge base based on the business task objective, obtaining business rules and feature descriptions such as process constraints and defect imaging characteristics. Subsequently, the unit uses a built-in reasoning mechanism to logically fuse the retrieved domain knowledge with the training task objective, automatically generating a task strategy that includes specific task parameters such as model topology, hyperparameters, dataset configuration, and loss function weights. For example, when the task objective involves size-sensitive defects, the strategy generation unit will automatically deduce a strategy to disable random scaling enhancement based on the rules in the knowledge base and write it into the task parameters. However, it is worth noting that the reasoning mechanism of the strategy generation unit can be based on chain-like thinking of cue engineering, path reasoning based on knowledge graphs, or a combination of both; this embodiment does not limit this.

[0067] The training supervision unit 23 is used to call the port to create a model training task and issue training instructions based on the task strategy until the model training is completed.

[0068] Specifically, the training supervision unit is the execution and feedback control center of the device. It interacts with the underlying neural network training platform through a standardized port, transforming the task policy output by the policy generation unit into an executable instruction sequence for the training platform. During training, the training supervision unit also undertakes closed-loop monitoring, i.e., real-time acquisition of feedback status of key parameters such as validation set error, loss curve, and recall rate, and calculation of their deviation from the preset target. When the deviation exceeds a threshold, the training supervision unit automatically triggers parameter adjustment logic, regenerating or fine-tuning the task policy, and issuing updated instructions through the port until the model performance meets the requirements. It can be understood that a port is an abstract communication interface, which can be an HTTP RESTful API, gRPC interface, or message queue subscription client. Its function is to shield the differences in the underlying training framework, enabling the device to have cross-platform adaptability. Through the automated closed-loop control of the training supervision unit, this invention transforms the discrete manual intervention links in traditional training into a continuous machine autonomous optimization process, significantly improving the efficiency of model training and the stability of the final quality.

[0069] See Figure 3 As one implementation, an agent-based device 20a for model training is also provided. Compared with the above implementation, the device further includes a database 24, which contains data configured for training. As a virtual execution unit, it can automatically locate and call the corresponding dataset for model training based on the description information about the dataset in the prompt instructions generated by the agent.

[0070] Specifically, in this embodiment, the database is a functional entity with autonomous response capabilities. It can accept standardized call instructions from the policy generation unit, and autonomously complete the retrieval, verification, and loading of the dataset according to the dataset description information contained in the instructions, and finally deliver the usable dataset to the training supervision unit.

[0071] Furthermore, at the architectural level, the dataset is internally configured with a metadata index layer and a storage mapping layer. The metadata index layer records the attribute information of each registered dataset, including but not limited to the dataset name, the task type (including but not limited to classification, segmentation, and detection tasks), the data modality (including but not limited to images, text, and time-series signals), sample size, annotation category system, and physical storage path. The storage mapping layer is responsible for maintaining the mapping relationship between metadata and the actual data storage location, allowing the physical storage location of the dataset to be flexibly adjusted without affecting the upper-layer calling logic. It should be understood that the database implementation can be a local relational database, a distributed file system, an object storage service, or a cloud database, as long as it has the ability to locate and load datasets based on the metadata index.

[0072] In actual interaction, when a user issues training instructions to the agent using natural language, they can directly describe the location and purpose of the dataset in the instructions. The parsing unit then parses the instructions, and the policy generation unit generates a prompt containing dataset access information. The database responds to this prompt and automatically retrieves the dataset. For example, a user might input the following natural language instruction: "I am working on a defect detection task and need to train a defect classification model. The data has been labeled and is located in the xxx directory. Please use a neural network model training platform to help me train this model. Before training, please check the wiki for relevant knowledge; the knowledge base is located in the xxx directory." Upon receiving this instruction, the agent's parsing unit extracts multi-dimensional structured information: the training task objective is identified as "defect classification model training," the business task objective is identified as "xxx defect detection," and the data location identifier "xxx directory" and the knowledge base path representation "xxx directory" are extracted. The policy generation unit retrieves relevant business rules from the knowledge base at the specified path based on the business task objective, such as recommendation model architectures, data augmentation strategies, and loss function configurations for defect tasks, and generates a task policy containing specific task parameters based on the inference mechanism. During this process, the strategy generation unit encapsulates the data location identifier into a dataset retrieval instruction, which is then passed to the database as part of a prompt instruction.

[0073] After responding to the prompt, the database, acting as a virtual execution unit, first parses the data location identifier carried in the instruction and queries the metadata index layer for dataset registration records matching "xxx directory". If the query finds a match, the database further verifies the integrity and format compatibility of the dataset, such as checking if the labeled files exist, whether the labeled format conforms to the specifications required by the training platform, and determining whether the number of samples meets the minimum training requirements. Upon successful verification, the database returns the dataset access handle or data flow pipeline configuration information to the training supervision unit, which then sends it along with the model topology, hyperparameters, and other task parameters to the neural network model training platform to initiate the training process. If the query fails or verification fails, the database returns an anomaly status message to the agent, such as "No labeled files conforming to the classification task format were detected in the specified directory." Based on this, the agent can generate feedback prompts to inform the user to make corrections.

[0074] It should be understood that the generation and response process of the above prompts is completed automatically within the intelligent agent. Users do not need to understand the specific calling mechanism of the database. They only need to know the location of the critical data in natural language to automatically complete the entire chain operation from data location to training start.

[0075] Furthermore, the database, acting as a virtual execution unit, also supports joint access and dynamic switching of multiple datasets. During training, if the agent determines, based on the feedback adjustment mechanism described above, that the imbalance in the class distribution of the current training dataset is causing model performance deviation, it can dynamically generate new dataset access instructions, instructing the database to record a compensation dataset or switch to a resampled dataset version, thereby achieving closed-loop optimization at the training data level. See also... Figure 4 This application also provides a computer system 400, which includes one or more client devices 410, a server 420, and one or more communication networks 430 coupling the one or more client devices to the server. The client devices can be configured to execute one or more applications.

[0076] In this embodiment, the server is used to run one or more services or software applications that enable the execution of agent-based methods for model training according to embodiments of this disclosure.

[0077] Specifically, a server may include one or more components that implement the functions performed by the server. These components include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices can sequentially interact with the server using one or more client applications to utilize the services provided by these components. The server may include one or more general-purpose computers, dedicated server computers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Furthermore, the server may include one or more virtual machines running a virtual operating system, or other computing architectures designed for virtualization.

[0078] It should be noted that, in the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and / or methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units / modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0079] The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units / modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0080] Furthermore, in the various embodiments of the present invention, the functional units / modules can be integrated into one processing unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated into one unit / module. The integrated unit / module described above can be implemented in hardware or in the form of hardware plus software functional units / modules.

[0081] The integrated unit / module implemented as a software functional unit / module described above can be stored in a computer-readable storage medium. The software functional unit, stored in a storage medium, includes several instructions to cause one or more processors of a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention.

[0082] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this invention and not to limit it; although the invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this invention.

Claims

1. A method for model training based on intelligent agents, characterized in that, The method includes: The system receives natural language from the user for model training and parses the natural language to obtain the task objective; the task objective includes the training task objective and the business task objective. Based on the task objective, relevant business rules and feature descriptions are retrieved, and corresponding task strategies are generated based on an inference mechanism; the task strategy includes task parameters. The system calls the port to create a model training task and issues training instructions based on the task strategy until the model training is complete.

2. The agent-based method for model training according to claim 1, characterized in that, The task parameters include model topology, hyperparameters, training dataset, and loss function weights.

3. The agent-based method for model training according to claim 1, characterized in that, The business rules and feature descriptions are stored in a domain knowledge base, which is built based on a wiki engine.

4. The agent-based method for model training according to claim 3, characterized in that, The domain knowledge base stores multiple knowledge files, which are stored in Markdown format, indexed by index.md, and referenced by each other through bidirectional links.

5. The agent-based method for model training according to claim 4, characterized in that, Constructing the domain knowledge base includes: extracting key information from the acquired original domain text, extracting attributes from the extracted key information to obtain structured knowledge records containing multiple attributes, and storing the structured knowledge records to form knowledge files.

6. The agent-based method for model training according to claim 5, characterized in that, The extracted key information is used to extract attributes to obtain a structured knowledge record containing multiple attributes, including: filling the key information with boundary markers to predict different types of entities, and extracting multiple entities based on the start and end marks of the boundary markers.

7. The agent-based method for model training according to claim 6, characterized in that, The boundary markers are constructed based on templates; the templates include word-based templates and instance-based templates, the word-based templates are filled with labeled words, and the instance-based templates are constructed by concatenating instances of different entity types.

8. The agent-based method for model training according to claim 2, characterized in that, The process of issuing training instructions based on the task strategy until the model training is completed includes: obtaining the degree of deviation of the feedback state of key parameters during the training process, and adjusting the task parameters based on the degree of deviation until the feedback state of the key parameters meets the target requirements.

9. The agent-based method for model training according to claim 8, characterized in that, The key parameters include validation set error, fitting parameters, class balance, loss curve, gradient value, recall, and precision.

10. An agent-based device for model training, characterized in that, The device includes: The parsing unit is used to receive natural language from the user for model training and parse the natural language to obtain the task objective; The strategy generation unit is used to retrieve relevant business rules and feature descriptions based on the task objective, and generate corresponding task strategies based on an inference mechanism; the task strategy includes task parameters. The training supervision unit is used to call the port to create a model training task and issue training instructions based on the task strategy until the model training is completed.