A component similarity evaluation method based on structure-enhanced RAG

By using the Structure Enhancement (RAG) method, unstructured text of components is transformed into structured representations. Combined with LLM deep reasoning, this solves the challenges of semantic loss and complex decision-making in component text, and achieves efficient and professional similarity assessment and multi-task adaptation.

CN122173926APending Publication Date: 2026-06-09NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
Filing Date
2026-03-12
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies suffer from severe semantic loss when processing unstructured component text, making it difficult to embed domain rules and lacking domain knowledge guidance and task adaptation capabilities in complex business decisions.

Method used

We employ a structure-enhanced RAG approach, which embeds domain rules into the vector representations of components through structured attribute parsing and type-adaptive models, and combines customized hints with engineering-driven LLM for deep reasoning and decision-making.

Benefits of technology

It effectively solves the semantic loss problem, improves the accuracy and professionalism of similarity assessment, enhances the model's robustness to text noise and missing attributes, has strong scalability, and can flexibly support a variety of differentiated tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173926A_ABST
    Figure CN122173926A_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence and electronic information, in particular to a component similarity evaluation method based on structure-enhanced RAG, aiming to solve the problems of semantic loss, difficulty in embedding domain rules and insufficient complex decision support in unstructured text processing. The method first analyzes component parameters into a structured attribute matrix based on a classification system; then trains a type-adaptive matrix compression model, compresses it into a structure-enhanced representation vector containing rules through contrastive learning, and constructs a type-specific retrieval library; finally, a two-stage process of "accurate preliminary screening + task-specific fine judgment" is adopted: first, vector retrieval preliminary screening is carried out by using the structure-enhanced representation, and then LLM deep reasoning and decision are driven according to the task type through a customized prompt template. The application significantly improves the evaluation accuracy and professionalism of component replacement recommendation, project duplication checking and other scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of artificial intelligence and electronic information, and more specifically, to a method for constructing a candidate knowledge base for electronic components based on structural reinforcement learning (RAG) and for evaluating the similarity of components to support multiple tasks. Background Technology

[0002] In the field of electronic component management, core scenarios such as alternative product recommendation, R&D project duplication checking, and component clustering heavily rely on similarity assessment between components. Existing technologies primarily employ structured rule-based solutions, but these face numerous bottlenecks in practical applications. On one hand, traditional structured rules struggle to process unstructured text. Core fields such as component performance parameter descriptions, necessity of requirements, and technological advancements are all in long text formats. Different manufacturers use inconsistent descriptions, physical units, and comparison logic for the same parameter. Traditional methods, when forcibly converting text into structured data, suffer from semantic loss risks and complex rule formulation. On the other hand, existing algorithms cannot support professional decision-making in complex situations and rely heavily on human intervention. Based on structured tables, existing algorithms rely on statistical methods such as collaborative filtering or attribute intersection-union ratio to assess similarity, only calculating numerical similarity. They struggle to incorporate domain knowledge for deep reasoning and cannot meet professional needs such as assessing the compatibility of alternative components and determining substantial duplication of projects.

[0003] Retrieval Enhancement Generation (RAG) technology has been widely applied to knowledge-intensive tasks in recent years. Its core principle is to assist LLM (Limited Language Management) in generating more accurate responses by retrieving relevant contextual information. In similarity calculation scenarios, it is divided into a retrieval phase and an enhancement generation phase. However, in the specialized scenario of electronic components, general RAG technology still has significant shortcomings: insufficient integration of domain knowledge, difficulty in identifying key attribute constraints in component performance parameters, and susceptibility to retrieval bias due to redundant descriptions; lack of rule execution mechanisms, failing to effectively embed the 244 differentiated rules under a three-level classification system, and the potential for LLM to ignore exclusion conditions defined by domain experts during the generation phase; and weak support for complex decision-making, with existing frameworks lacking mechanisms to dynamically adapt to different task reasoning logics, making it difficult to meet the needs of multi-level professional decision-making. Therefore, there is an urgent need for a two-stage framework that integrates structured knowledge guidance and LLM professional decision-making capabilities, utilizing domain indicator systems for accurate initial screening of candidates and achieving complex business judgments through task-customized prompts and engineering. Summary of the Invention

[0004] (a) Technical problems to be solved The present invention aims to solve the problems of severe semantic loss, difficulty in embedding domain rules, and lack of domain knowledge guidance and task adaptation capabilities in the processing of unstructured component text in existing technologies.

[0005] (II) Technical Solution To address the aforementioned issues, this invention proposes a component similarity evaluation method based on structurally enhanced RAG (Representational Aspect Ratio), the core of which lies in the framework of "structurally enhanced representation" and "two-stage routing decision". This method first embeds domain rules and key constraints into the vector representation of components through structured parsing and type-adaptive model training; then, it utilizes this representation for efficient and accurate initial screening; finally, based on specific business tasks, it drives LLM (Limited Least Mean Model) through customized prompting engineering to complete deep reasoning and decision-making.

[0006] The specific technical solution includes the following steps: S1. Structured Attribute Parsing and Item-by-Item Encoding: Based on a predefined three-level classification index system, LLM is used to parse the unstructured performance parameter descriptions of components into structured JSON data, where each attribute includes an attribute name, value, and unit. Subsequently, each attribute is encoded using an embedding model to obtain an attribute vector of equal length, which is then concatenated into a two-dimensional structured attribute matrix according to the attribute order.

[0007] S2. Training Dataset Construction: Representative devices are randomly selected from each tertiary category as anchor points. Multiple strategies are employed to generate positive and negative examples for comparative learning. Positive example generation strategies include making minor semantic perturbations to the anchor point descriptions, identifying substitutable devices of the same type, and randomly masking some attributes. Negative example generation strategies include constructing flawed samples that violate the rules, identifying non-substitutable devices of the same type, and randomly masking attributes under different types. The ratio of positive to negative examples is maintained in a balanced manner.

[0008] S3. Matrix Compression Model Architecture Design: Design a type-adaptive matrix compression model. This model comprises a type-adaptive Stem module and a shared Transformer backbone network. The Stem module transforms a variable-length attribute matrix into a fixed-number token sequence through a cross-attention mechanism. The shared Transformer backbone performs deep feature extraction on this sequence and finally outputs a fixed-dimensional structure-enhanced representation vector through global pooling layers and fully connected layers.

[0009] S4. Contrastive Learning Training of the Fusion Structure: Using the dataset constructed in step S2, train the model designed in step S3 using the contrastive learning framework. The training objective is to minimize the InfoNCE loss, ensuring high similarity between the output vectors of positive sample pairs and low similarity between the output vectors of negative sample pairs, thereby enabling the model's output vectors to contain rich structured semantics and domain rule knowledge.

[0010] S5. Construction of the Structure-Enhanced Retrieval Library: Using a trained matrix compression model, the performance parameter descriptions of all target components are transformed into structure-enhanced representation vectors of a unified dimension through step S1 and model processing. Based on the three-level classification label of each component, the vectors are stored in the corresponding retrieval sub-libraries, forming a categorized structure-enhanced retrieval library.

[0011] S6. Task-Customized LLM Screening and Decision Making: In actual evaluation, for the input query device and task type, the system first transforms them into structure-enhanced representation vectors through steps S1 to S4, and routes them to the corresponding retrieval sub-libraries according to their classification. A preliminary candidate set is retrieved through vector similarity calculation. Then, based on the task type, the system routes to a pre-designed customized prompt word template. This template combines the evaluation rules, weights, and reasoning logic specific to the task. Finally, the query device information, the preliminary candidate set, and the prompt word template are input into the LLM (Limited LLM Analyzer), which performs in-depth analysis, scoring, and ranking, outputting the final recommendation result or decision suggestion.

[0012] (III) Beneficial Effects Compared with the prior art, the present invention has the following beneficial effects: 1. This invention transforms unstructured text descriptions into structured representations containing domain rules through structured attribute parsing and type adaptive models, effectively solving the problems of semantic loss and difficulty in rule embedding in traditional methods.

[0013] 2. The "precise initial screening + task-customized fine judgment" two-stage framework designed in this invention combines the efficiency of vector retrieval with the flexibility of LLM deep reasoning, which significantly improves the accuracy and professionalism of similarity assessment in complex business scenarios.

[0014] 3. This invention utilizes contrastive learning training and rule-driven negative sample generation strategies to enhance the model's robustness to textual noise, representational changes, and attribute missingness, thereby improving the stability of the evaluation results.

[0015] 4. This invention significantly improves retrieval efficiency by constructing a categorized structure-enhanced retrieval library, and through a task routing mechanism, enables a single system to flexibly support various differentiated tasks such as alternative recommendations, project deduplication, and device clustering, exhibiting strong scalability. Attached Figure Description

[0016] Figure 1 This is a flowchart of the component similarity assessment method based on structural reinforcement RAG. Detailed Implementation

[0017] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0018] This specific embodiment is only used to illustrate the present invention and is not intended to limit the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also fall within the protection scope of the present invention.

[0019] LLM model configuration: Steps S1, S2, and S6 all use the Qwen3-32B model, deployed via MindIE.

[0020] Embedding model configuration: Steps S1, S2, S5, and S6 all use the Qwen3-8B Embedding model, deployed via Xinference.

[0021] like Figure 1 As shown, the entire system comprises the following core modules: ① Structured attribute parsing and item-by-item encoding module, ② Training dataset construction module, ③ Matrix compression model architecture design module, ④ Contrastive learning training module for fused structures, ⑤ Structure-enhanced retrieval library construction module, and ⑥ Task-customized LLM screening and decision-making module. Modules ① to ④, which train the matrix compression unified representation model, only need to be executed once when the classification system remains stable. Module ⑤, used to build the retrieval library, is executed only once when the candidate set is determined. Module ⑥ is the application unit that actually performs multi-task customized LLM screening and decision-making.

[0022] S1: Structured Attribute Parsing and Item-by-Item Coding This step aims to transform unstructured text into structured semantic vectors, providing input for the construction of the training dataset: 1) Input Data Preparation. This includes unstructured performance parameter descriptions of the device, a predefined three-level classification index system (244 categories), and device type labels. The index system format is as follows: {attribute name: physical unit}, for example: {"withstand voltage": "V", "operating temperature": "°C"...} 2) Processing flow.

[0023] ① Structured parsing: Using LLM to parse unstructured text according to a three-level classification standard index system. A simplified example of the prompt word template is as follows: Input format: <Three-level classification index system> <Device Performance Description> Output: JSON {attribute name: (value, unit)} Constraint handling: Automatically standardize the units of numerical parameters (e.g., "30kV" → 30000V).

[0024] ② Vectorize each attribute item by item, for each structured attribute Generate embedding vectors The output vector has a dimension of 4096.

[0025] ③ Feature matrix construction: Concatenate the features into a two-dimensional matrix according to the attribute order. For example, if there are... Devices with one attribute item: 2) Output: Structured attribute matrix .

[0026] S2: Training Dataset Construction This step constructs a contrastive learning dataset for training the matrix compression model, ensuring the model's robustness to domain rules through multi-policy sample generation: 1) Input Data Preparation. Anchor device dataset: Representative devices randomly selected from 244 categories in a three-level classification (20 devices per category). Original performance parameter descriptions, device names, and device type labels for all devices. Structured attribute matrix for all devices. .

[0027] 2) Processing flow.

[0028] ① Positive example generation strategy, three types of sources a. Minor Perturbations of Non-Critical Fields (LLM-Driven). Use LLM to semantically perturb the anchor device description. Example: LLM("Synonymous rewrite of the following description, keeping key parameters unchanged:" ⊕ Original performance parameter description). Constraints: Numerical fluctuation < ±10%, units unchanged, core indicators unchanged. Generation: 3 perturbation samples generated per anchor.

[0029] b. Same-type positive example determination (LLM driven). Randomly select another device B within the same tertiary classification and use LLM to determine if a substitutable relationship exists between the anchor data and device B. Generation quantity: Generate 3 substitutable samples for each anchor.

[0030] c. Random attribute missing. 30% of the attributes in the attribute matrix of anchor point A are randomly masked. Generation quantity: 3 samples with missing attributes are generated for each anchor point.

[0031] ② Counterexample generation strategy, three types of sources a. Rule-based Flaw Construction (LLM-driven). LLM is used to generate constraint-violation samples by combining anchor device descriptions and domain rules. Example: LLM("Given that this device is a:" ⊕ Device type label ⊕ "Given the following performance parameter description, generate a similar sample, but with obviously incorrect parameters" ⊕ Original performance parameter description). Constraints: Attribute fluctuation < ±10%, units are variable, attribute values ​​are variable. Generation quantity: 3 easily misjudged flaw samples are generated for each anchor.

[0032] b. Counterexample Judgment (LLM-driven). Randomly select another device B within the same tertiary classification. Use LLM to determine whether the anchor data and device B are completely different and cannot be substituted for each other. Generation quantity: Generate 3 non-substitutable samples for each anchor.

[0033] c. Random missing attributes across different types. For anchor point A, 30% of the attributes in the attribute matrix are randomly masked, and other devices of different types are randomly selected. Generation quantity: Three samples with missing attributes of different types are generated for each anchor point.

[0034] ③ Dataset balancing The ratio of positive to negative examples is 1:1. The sample size distribution formula is as follows: 3) Output the results.

[0035] Training dataset ,in It is an anchor data attribute matrix. It is the attribute matrix of the comparison samples. These are similarity labels (1 for positive examples, 0 for negative examples). The total sample size is approximately 87,000.

[0036] S3: Matrix Compression Model Architecture Design This step involves designing an adaptive matrix compression model to achieve compression of variable-dimensional attribute matrices ( Efficient conversion from 8192-dimensional structure enhancement vectors: 1) Input data preparation. Device structured attribute matrix. .

[0037] 2) Model structure design ① Type-adaptive Stem module in It is a fixed number of tokens, defined as 32. This refers to the dimension of the hidden layers, which must be consistent with the dimension of the Transformer backbone network. Generated through a cross-attention mechanism.

[0038] ② Share the Transformer backbone Includes a multi-layer Transformer encoder: Each layer contains multi-head self-attention and feedforward networks. ③Compressed output layer The output of the Transformer backbone is received using a global pooling layer and a fully connected layer, and mapped to a fixed-length 8192-dimensional structure.

[0039] 3) Output the results.

[0040] Dimensionally unified representation vector .

[0041] S4: Comparative Learning Training of Fusion Structures This step, based on the structured attribute matrix generated in step S2 and the positive and negative examples fused with domain rule knowledge, trains the matrix compression model designed in step S3 to obtain the structure-enhanced representation vector: 1) Input data preparation. Divide the dataset generated in step S2 into training samples and validation samples in a 7:3 ratio.

[0042] 2) Train the model using a contrastive learning framework.

[0043] ① Calculation of forward propagation and contrast loss Input the device structured attribute matrix in the triplet After the initial matrix compression model transformation in step S3, the representation vector is obtained. Calculate the contrastive loss InfoNCE: in The batch size is fixed at 64. The temperature parameter is fixed at 0.05. As a counterexample, Let be the cosine similarity between two vectors.

[0044] ② Backpropagation and Model Parameter Update Calculate contrast loss The gradient relative to the model parameters.

[0045] Update parameters using the Adam optimizer, where It is the learning rate.

[0046] ③ Conditions for stopping training The maximum number of iterations (epochs) should not exceed 2000, compared to the target loss. 0.2, accuracy in determining positive and negative examples 0.95.

[0047] 3) Output the results.

[0048] Matrix compression model with enhanced structural representation capabilities Output format: PyTorch model file.

[0049] S5: Construction of a structurally enhanced search library This step utilizes a trained matrix compression model to construct a rule-enhanced retrieval library for the field of electronic components: 1) Input data preparation.

[0050] ① Target device data, full dataset of electronic components (model, description, three-level classification), example: {"Model": "LT1083CP", "Description": "7.5A low dropout regulator, input voltage ≤30V...", "Classification: linear regulator"}.

[0051] ② Matrix compression model .

[0052] ③ Three-level classification system.

[0053] ④ The indicator system of the three-level classification standard.

[0054] 2) Processing flow.

[0055] ① Structured attribute parsing and item-by-item encoding, same as step S1, yields the structured attribute matrix. .

[0056] ②Use the trained The structure is enhanced and the matrix is ​​compressed to obtain a representation vector with uniform dimensions. .

[0057] ③ Store representation vectors in separate libraries according to device type labels. It can be routed based on type tags through faiss storage.

[0058] 3) Output results. The structured search library is divided into 244 sub-libraries with a vector dimension of 8192, and is stored and managed using a vector database indexing tool.

[0059] S6: Task-Customized LLM Screening and Decision Making This step implements an online service process of "precise initial screening + customized task-based judgment," generating final recommendation results based on the device information and task type queried by the user. 1) Input data preparation.

[0060] ① Device data to be matched and task type (model, description, three-level classification), example: { "Model: LT1099CP", "Description": 6.5A low dropout regulator, input voltage ≤20V...", "Classification: Linear regulator", "Task type": "Recommended alternative product"}.

[0061] ② Matrix compression model .

[0062] ③ Three-level classification system.

[0063] ④ The indicator system of the three-level classification standard.

[0064] 2) Processing flow. ① Structured attribute parsing and item-by-item encoding, same as step S1, to obtain the structured attribute matrix. ②Use the trained The structure is enhanced and the matrix is ​​compressed to obtain a representation vector with uniform dimensions. .

[0065] 3) Based on the device type label, route to the corresponding database and retrieve the top 20 candidate sets based on cosine similarity. .

[0066] 4) Based on the task type, route to the customized prompt word template, provide the fine screening judgment results, and give relevant decision suggestions.

[0067] Here is an example template for alternative product recommendation prompts: Task: Recommendation of electronic component alternatives Objective: To recommend the optimal alternative solution by comprehensively evaluating its adaptability to special environments, quality level, and delivery cycle, while ensuring performance parameter compatibility. --- Rule System --- 1. Performance parameter weight: 0.7 - Key performance indicators (electrical characteristics must be 100% met) compatibility. - Minor parameter deviation ≤ ±10% 2. Special environment adaptability weight: 0.15 - Temperature range: Target device ≥ Original device - Protection rating: Target device ≥ original device (e.g., IP68 > IP67) - Shock / vibration resistance: Target device ≥ Original device 3. Quality grade weight: 0.10 Military grade > Industrial grade > Commercial grade - Certification standards: AEC-Q100 > ISO / TS16949 > No certification 4. Delivery cycle weight: 0.05 - Spot > Within 8 weeks > Within 12 weeks > Risky delivery time --- Query Device Information --- [Model Number] LT1083CP [Classification] Linear regulator [Performance Parameters] Input voltage: ≤30V - Output current: ≥7.5A - Differential voltage: 1.5V@5A Operating temperature: -40°C ~ +125°C [Environmental adaptability] - Protection rating: IP67 (dustproof and waterproof) - Vibration resistance: 20g RMS (10-2000Hz) - Special requirements: Marine salt spray environment [Quality Grade] Industrial Grade (AEC-Q100 Certified) [Delivery Time] Current lead time is 12 weeks. --- Candidate Device Set (Top 20 Precisely Selected) --- 1. [Model Number] LT1084CP [Performance] Input ≤35V, Output ≥8A, Dropout Voltage 1.2V@5A, Temperature -40~125°C [Environment] IP67, Vibration Resistance 15g, Salt Spray Free Certification [Quality] Industrial grade (AEC-Q100) [Supply] Spot goods 2. [Model] LM317T [Performance] Input ≤40V, Output ≥1.5A, Dropout Voltage 3V@1.5A, Temperature 0~125°C [Environment] IP54, vibration resistance 10g [Quality] Commercial grade [Supply] Spot goods 3. ... --- Decision Analysis Requirements --- 1. Performance compatibility analysis: - Key performance indicators: Must meet or exceed those of the original components. - Derating analysis: Calculating the safety margin under actual operating conditions - Formula: Compatibility score = Σ(Parameter weight × Match degree) 2. Environmental adaptability assessment: - Verification of special environmental certifications (salt spray / marine / aviation) - Protection level numericalized: IPXX → Protection index (IP68=10, IP67=9, etc.) 3. Overall Recommendation: - Calculate the total score as follows: 0.7 × Performance Score + 0.15 × Environmental Score + 0.10 × Quality Score + 0.05 × (1 - Supply Risk) - Supply risk = max(0, (delivery time - 8) / 20) - Generate a risk matrix: ```mermaid graph LR A [Performance Risk] --> |Key Parameters| D [Reject] B [Environmental Risk] --> Salt Spray Certification | E [High] C [Supply Risk] --> |> 12 weeks | F [Medium] ``` --- Output Format --- { "Item-by-item comparative analysis results":[{ Recommended Model: TPS7A4700RGWT Overall score: 92.4 Detailed Analysis: { "Performance compatibility": { Rating: 96 Key Advantages: ["Input voltage 36V > 30V", "Voltage difference 1V < 1.5V"] Risk Points: None }, "Environmental adaptability": { Rating: 98 "Certification Advantages": ["IP67 Equivalent", "Classification Society Certification"], Risk point: Salt spray test data needs verification. }, "Quality Grade": { Rating: 90 Certification: AEC-Q100 Industrial Grade }, "Supply Assessment": { Rating: 80 Delivery time: 8 weeks "Risk": "Controllable" } }}, { Recommended Model:... }}, ] "Comparison of Severely Defective Solutions": [ ["LT1084CP", 88.2, "Insufficient environmental adaptability"], ["ADM7170ACPZ", 85.7, "High supply risk"] ], Final Conclusion: The TPS7A4700RGWT is recommended due to its optimal overall performance and compliance with marine environmental requirements. } 3) Output Results. The results of "precise initial screening + task-customized fine judgment" include the comparison results of the devices to be matched and the candidate devices, as well as relevant decision suggestions. The returned results are sorted from highest to lowest according to the relevance of the candidate devices.

[0068] This specific embodiment is only used to illustrate the present invention and is not intended to limit the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also fall within the protection scope of the present invention.

Claims

1. A component similarity evaluation method based on structural reinforcement RAG, characterized in that, Includes the following steps: S1. Structured Attribute Parsing and Item-by-Item Encoding: Based on a predefined three-level classification index system, a large language model (LLM) is used to parse the unstructured performance parameter descriptions of components into structured JSON data, where each attribute contains an attribute name, value, and unit; subsequently, each attribute is encoded using an embedding model to obtain an attribute vector of equal length, which is then concatenated into a two-dimensional structured attribute matrix according to the attribute order. S2. Training Dataset Construction: Representative devices are randomly selected from each tertiary category as anchor points. Multiple strategies are used to generate positive and negative examples required for comparative learning. The positive example generation strategy includes making minor semantic perturbations to the anchor point description, determining substitutable devices of the same type, and randomly masking some attributes. The negative example generation strategy includes constructing hard-fault samples that violate the rules, determining non-substitutable devices of the same type, and randomly masking attributes under different types. The ratio of positive to negative examples is kept balanced. S3. Matrix Compression Model Architecture Design: Design a type-adaptive matrix compression model, which includes a type-adaptive Stem module and a shared Transformer backbone network; the Stem module converts a variable-length attribute matrix into a fixed-number token sequence through a cross-attention mechanism; the shared Transformer backbone performs deep feature extraction on the sequence, and finally outputs a fixed-dimensional structure-enhanced representation vector through a global pooling layer and a fully connected layer; S4. Comparative learning training of the fusion structure: Use the dataset constructed in step S2 to train the model designed in step S3 using the comparative learning framework; The training objective is to minimize the InfoNCE loss, so that the output vectors of positive sample pairs have high similarity and the output vectors of negative sample pairs have low similarity. S5. Construction of the structure-enhanced retrieval library: Using the trained matrix compression model, the performance parameter descriptions of all target components are processed by step S1 and the model to be transformed into structure-enhanced representation vectors of a unified dimension; according to the three-level classification label of each component, the vectors are stored in the corresponding retrieval sub-libraries to form a categorized structure-enhanced retrieval library; S6. Task-customized LLM screening and decision-making: For the input query device and task type, the process of steps S1 to S4 is first used to convert it into a structure enhancement representation vector, and the vector is routed to the corresponding retrieval sub-library according to its classification. The preliminary candidate set is retrieved by calculating the vector similarity. Then, based on the task type, the system routes to a pre-designed customized prompt word template. Finally, the system inputs the queried device information, the initial candidate set, and the prompt word template into the LLM, which performs in-depth analysis, scoring, and sorting, and outputs the final recommendation results or decision suggestions.

2. The method according to claim 1, characterized in that, In step S1, when using LLM to parse unstructured text, the input prompt word template includes a three-level classification index system and device performance description, and the output is constrained to be in JSON format; unit standardization processing is automatically performed on numerical parameters.

3. The method according to claim 1, characterized in that, In step S2, the constraint conditions for the slight semantic perturbation are that the numerical fluctuation is less than ±10%, the unit remains unchanged, and the core index remains unchanged; the random masking of some attributes refers to randomly masking 30% of the attributes in the attribute matrix.

4. The method according to claim 1, characterized in that, In step S3, the type-adaptive Stem module transforms the calculation formula of the attribute matrix through the cross-attention mechanism as follows: , where Q is the learnable query vector and V is the structured attribute matrix.

5. The method according to claim 1, characterized in that, In step S4, the batch size B is 64 and the temperature parameter τ is 0.05 in the InfoNCE loss function used for the contrastive learning training.

6. The method according to claim 1, characterized in that, In step S5, the constructed structure-enhanced retrieval library is stored and managed using a vector database indexing tool.

7. The method according to claim 1, characterized in that, In step S6, the task type includes alternative product recommendation; for the customized prompt word template for this task, an evaluation rule system, weight allocation, and comprehensive score calculation method are defined for performance parameter compatibility, environmental adaptability, quality level, and delivery cycle.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

10. A component similarity evaluation system based on structural reinforcement RAG, characterized in that, It includes a structured attribute parsing and item-by-item encoding module for performing step S1 of claim 1, a training dataset construction module for performing step S2, a matrix compression model architecture design module for performing step S3, a contrastive learning training module for performing step S4, a structure-enhanced retrieval library construction module for performing step S5, and a task-customized LLM screening and decision-making module for performing step S6.