Electric power engineering project knowledge base construction method based on AI-agent and intelligent supervision system
By building a knowledge base for power engineering projects based on AI-agent, using the KAG framework and multimodal large model, intelligent supervision of power engineering projects is achieved, the problems of low supervision efficiency and insufficient intelligence are solved, and supervision efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510501564.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-12
AI Technical Summary
There are low information sources and data processing efficiency in the supervision of existing power engineering projects. Novice needs to spend a lot of time to review information, and the RPA process is difficult to adapt to business changes, resulting in insufficient supervision efficiency and intelligence.
Build a knowledge base for power engineering projects based on AI-agent, use the KAG framework to extract knowledge, generate vectors and store graph databases, and combine multimodal large models to achieve intelligent supervision, including the collaborative work of the perception layer, decision-making layer and execution layer.
It lowers the threshold for supervision business, improves efficiency and accuracy, automates the processing of supervision tasks, reduces manual operations, senses data changes in real time and automatically generates workflows.
Smart Images

Figure CN120471573A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system auxiliary tools, and in particular to an AI-agent-based power engineering project knowledge base construction method and an intelligent supervision system. Background Art
[0002] Currently, project supervision in the power industry primarily relies on manual and post-event oversight. This results in very limited information sources and data processing efficiency, making it difficult to meet the needs of effective risk management. Furthermore, project supervision requires significant human resources to review various project-related documents. For complex projects, the supervision process is complex, and new staff members require extensive training and extensive supervisory experience before they can independently engage in project supervision. While RPA technology has been widely used in certain specialized scenarios in the power industry by automating certain business processes to alleviate repetitive work for some staff, it can be used for simple business needs. However, because RPA process development relies heavily on business experience and programming skills, learning RPA process development is challenging for new staff with no programming experience. Furthermore, RPA processes are inherently static, requiring staff to update or even redevelop new processes whenever business systems or requirements change, making them far from intelligent. To address these issues, the present invention proposes an AI-agent-based method for constructing a knowledge base for power engineering projects and an intelligent supervision system. The knowledge base is the internal think tank of the supervision system, laying the foundation for providing staff with reliable supervision plans; the supervision system realizes the intelligent operation of business processes through the synergy of multiple agents based on a multimodal large model. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide an AI-agent-based method for constructing a knowledge base for power engineering projects and an intelligent supervision system. This method addresses the existing problem of novice supervisors wasting considerable time and effort searching for disorganized reference materials. By integrating all relevant reference materials into a single knowledge base, users can obtain a reliable supervision process simply by inputting their requirements, significantly improving work efficiency. The knowledge base is constructed based on the KAG framework, using a large multimodal model to assist in knowledge extraction, vector generation, and graph database storage. This provides professional supervisory reference materials for enhanced search agents.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: The AI-agent-based power engineering project knowledge base construction method includes the following steps: Step 1. Download the source code of the Knowledge Augmented Generation (KAG) framework to your local computer. Step 2. Copy the example_config.yaml template file in the source code and modify the configuration parameters according to the business requirements of the power engineering project. Step 3. Use the knext tool in the KAG framework to create and initialize the project, and then add the project's schema file; Step 4. Build the knowledge index in the builder folder of the project initialized and modified in Step 3. Step 5. Use the search script in the solver folder of the project to search.
[0005] In Step 2 above, the specific process of modifying the configuration parameters according to the business requirements of the power engineering project is as follows: Step 2.1. Configure the initial project parameters, including the project's namespace and host_address related parameters, multimodal large model parameters, and text embedding model parameters. Step 2.2. Configure the knowledge index in the template that supports formats such as pdf, docx, and csv, including the configuration of the knowledge extraction model, prompt words, and slices.
[0006] In Step 3 above, the specific process of adding the schema file after initializing the project is as follows: After initializing the project, three blank folders, builder, schema, and solver, are generated in the project root directory. Add relevant execution code scripts based on the business of the power engineering project. In the schema folder, copy the schema template in the original framework to the schema folder. Modify the file based on the business characteristics of the power engineering project supervision, and then submit the schema through the knext tool.
[0007] In Step 4 above, the specific process of building the knowledge index in the project builder folder is as follows: The builder folder contains two folders, data and prompt. Put the data of the power engineering project into the data folder, and then add Python scripts for named entity extraction, entity standardization, and subject-verb-object triple extraction into the prompt folder.
[0008] In Step 4 above, named entity extraction is performed using large model instruction fine-tuning technology, with a template attached to the script.
[0009] In Step 5 above, the specific process of searching using the search script in the solver folder of the project is as follows: Step 5.1. Before searching, add the scripts logic_form_plan.py and dense_passage_retrieve.py to the prompt folder under the solver folder according to the specific requirements of the supervisory business to be queried. The script logic_form_plan.py uses the LogicFormPlanPrompt in the framework to decompose a search question into multiple sub-questions. Step 5.2: Use a dual search strategy. First, use a structured knowledge graph for search. For each logical expression node, extract the subject, predicate, and object triples through the retrieval, sort, math, deduce, and output steps. If the knowledge graph fails to produce a satisfactory result in multiple rounds of search, use the unstructured dense_passage_retrieve.py script to obtain the final result through the open domain retrieval algorithm.
[0010] An intelligent supervision system using the aforementioned AI-agent-based power engineering project knowledge base construction method includes a perception layer, a decision layer, and an execution layer that sequentially transmit information. A multimodal large model provides data support for the perception layer, decision layer, and execution layer, and provides a specific solution for information transmission. The perception layer is used to receive specific supervision requirements provided by staff, and at the same time perceive relevant project data existing in other places to supplement the supervision requirements. The data includes multimodal information such as text, images, and voice; the decision-making layer further decomposes the staff's needs, including uploaded pictures and text information, into multiple specific subtasks, and provides corresponding solutions for each subtask; the execution layer further organizes the solution steps given by the decision-making layer into a standard workflow, and calls relevant tools to realize the automated operation of the supervision business.
[0011] The above-mentioned perception layer is composed of a web search agent, which is used to perceive the updated project information in the business system and upload the relevant updated content to the database of the intelligent supervision system based on the user's supervision business search.
[0012] The decision-making layer described above is composed of a knowledge base and an enhanced search agent, which is used to provide specific plans for conducting supervisory work. The construction of the knowledge base requires users to upload knowledge materials, including institutional documents, risk prevention and control documents, and typical cases, to provide an external database for the enhanced search agent. The enhanced search agent is composed of Knowledge Augmented Generation (KAG) components and a multimodal large model. The KAG component includes two modules: KAG-Builder and KAG-Solver. KAG-Builder is responsible for building offline retrieval, while KAG-Solver enhances the logic and accuracy of knowledge generation through a hybrid reasoning engine guided by logical forms. Both modules need to interact with the multimodal large model during their respective operations.
[0013] The execution layer is composed of external tools such as database search, code execution, and text generation. By combining a large model with different tools, multiple agents are formed. These agents work together to automatically generate a workflow for the supervision steps output by the decision layer. Each node in the workflow automatically calls the relevant tools to complete the supervision task.
[0014] The present invention provides a method for constructing a knowledge base for power engineering projects based on AI-agent and an intelligent supervision system, which uses agent technology to assist traditional supervision work, and has three major functions: automatic supervision, indicator analysis, and intelligent reporting, bringing three major results. First, it lowers the threshold for supervision business. When a new person is engaged in supervision work, with the help of the enhanced search agent, he can get a specific business process by entering his own supervision business needs in the system dialog box, helping supervisors to break free from the previous complex and disordered system, quickly understand and get started with supervision work; second, it improves supervision efficiency and accuracy. The perception layer of the intelligent supervision system can perceive data changes on the business system in real time, and the execution layer uses code generation tools to automatically generate and execute data analysis code, which improves the timeliness and accuracy of supervision work. Third, it helps to reduce the burden on the grassroots, and uses the cursor editor and large model to automatically generate workflow execution tasks, replacing some tedious manual operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The present invention will be further described below with reference to the accompanying drawings and examples: Figure 1 This is the architecture diagram of the AI-agent-based intelligent supervision system for power engineering projects of the present invention. DETAILED DESCRIPTION
[0016] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0017] Example 1: The AI-agent-based power engineering project knowledge base construction method includes the following steps: Step 1. Download the source code of the Knowledge Augmented Generation (KAG) framework to your local computer. Step 2. Copy the example_config.yaml template file in the source code and modify the configuration parameters according to the business requirements of the power engineering project. For example, this includes supervision of the bidding contract signing phase, power supply service quality, implementation of the "zero-fee" policy for business expansion, and compliance monitoring of distributed photovoltaic grid-connected capacity. Step 3. Use the knext tool in the KAG framework to create and initialize the project, and then add the project's schema file; Step 4. Build the knowledge index in the builder folder of the project initialized and modified in Step 3. Step 5. Use the search script in the solver folder of the project to search.
[0018] In Step 2 above, the specific process of modifying the configuration parameters according to the business requirements of the power engineering project is as follows: Step 2.1. Configure the initial project parameters, including the project's namespace and host_address related parameters, multimodal large model parameters, and text embedding model parameters. Step 2.2. Configure the knowledge index in the template that supports formats such as pdf, docx, and csv, including the configuration of the knowledge extraction model, prompt words, and slices.
[0019] In Step 3 above, the specific process of adding the schema file after initializing the project is as follows: After initializing the project, three blank folders, builder, schema, and solver, are generated in the project root directory. Add relevant execution code scripts based on the business of the power engineering project. In the schema folder, copy the schema template in the original framework to the schema folder. Modify the file based on the business characteristics of the power engineering project supervision, and then submit the schema through the knext tool.
[0020] In Step 4 above, the specific process of building the knowledge index in the project builder folder is as follows: The builder folder contains two folders, data and prompt. Put the professional information of the power engineering project into the data folder, and then add Python scripts for named entity extraction, entity standardization, and subject-verb-object triple extraction into the prompt folder.
[0021] In Step 4 above, named entity extraction uses large model instruction fine-tuning technology. A template like the one shown below is attached to the script, allowing the model to accurately generate query results based on the natural language instructions provided by the user.
[0022] In Step 5 above, the specific process of searching using the search script in the solver folder of the project is as follows: Step 5.1. Before searching, add the scripts logic_form_plan.py and dense_passage_retrieve.py to the prompt folder under the solver folder according to the specific requirements of the supervisory business to be queried. The script logic_form_plan.py uses the LogicFormPlanPrompt in the framework to decompose a search question into multiple sub-questions. Step 5.2: Use a dual search strategy. First, use a structured knowledge graph for search. For each logical expression node, extract the subject, predicate, and object triples through the retrieval, sort, math, deduce, and output steps. If the knowledge graph fails to produce a satisfactory result in multiple rounds of search, use the unstructured dense_passage_retrieve.py script to obtain the final result through the open domain retrieval algorithm.
[0023] The intelligent supervision system using the above-mentioned AI-agent-based power engineering project knowledge base construction method includes a perception layer, a decision layer, and an execution layer that transmit information in sequence. The multimodal large model provides data support for the perception layer, the decision layer, and the execution layer; it is the central nervous system of information transmission and provides specific solutions for information transmission.
[0024] The perception layer is used to receive specific supervision requirements provided by staff, and at the same time perceive relevant project data in other places to supplement supervision requirements. The data includes multimodal information such as text, images, and voice; the decision-making layer further decomposes the staff's needs, including uploaded pictures and text information, into multiple specific subtasks, and provides corresponding solutions for each subtask; the execution layer further organizes the solution steps given by the decision-making layer into a standard workflow, and calls relevant tools to realize the automated operation of the supervision business.
[0025] The above-mentioned perception layer is composed of a web search agent, which is used to perceive the updated project information in the business system and upload the relevant updated content to the database of the intelligent supervision system based on the user's supervision business search.
[0026] The decision-making layer described above consists of a professional knowledge base and an enhanced search agent, which is used to provide specific plans for conducting supervisory work. Building the knowledge base requires users to upload some professional knowledge materials, including institutional documents, risk prevention and control documents, and typical cases, to provide an external professional database for the enhanced search agent. The enhanced search agent consists of the Knowledge Augmented Generation (KAG) component and a multimodal large model. The KAG component includes two modules: KAG-Builder and KAG-Solver. KAG-Builder is responsible for building offline searches, while KAG-Solver enhances the logic and accuracy of knowledge generation through a hybrid reasoning engine guided by logical forms. Both modules interact with the multimodal large model during their respective operations to improve the quality of their output results. For specific steps, see How to Build a Professional Knowledge Base Based on the KAG Framework.
[0027] The execution layer is composed of external tools such as database search, code execution, and text generation. By combining a large model with different tools, multiple agents are formed. These agents work together to automatically generate a workflow for the supervision steps output by the decision layer. Each node in the workflow automatically calls the relevant tools to complete the supervision task.
[0028] Example 2: 1. Building a professional knowledge base based on the KAG framework The steps to building a professional knowledge base are document reading, document segmentation, knowledge extraction, vector generation, and graph storage. The documents provided here mainly include the project's compliance system, risk management system, daily inspection and examination system, etc. These systems complement each other and together constitute the reference standard for power engineering project supervision business. Because KAG provides a professional domain knowledge service framework for knowledge enhancement generation, this framework integrates multiple steps such as document segmentation, knowledge extraction, vector generation, and graph storage. Based on this framework, natural language processing technology is used here to build a local knowledge base. The specific steps are as follows: 1. Download the KAG source code to your local computer and install the relevant software dependencies as required; 2. Copy the example_config.yaml template file in the source code and modify the configuration parameters according to business needs. First, configure the initial project parameters, including project-related parameters (namespace, host_address), common parameters for multimodal large models (including knowledge extraction models and chat models) (client_type, api-key, base_url, model_name), and common parameters for text embedding models (api-key, base_url, model_name, type, vector_dimensions). The specific example is as follows: openie_llm:&openie_llm api_key: sk-V4rpB2LLM5sC6CGxmUWs1LRqhZpddDEIVmsGBmwH9rm67y6F base_url: https: / / yunwu.ai / v1 model: gpt-4o-mini type: maas chat_llm:&chat_llm api_key: sk-V4rpB2LLM5sC6CGxmUWs1LRqhZpddDEIVmsGBmwH9rm67y6F base_url: https: / / yunwu.ai / v1 model: gpt-4o-mini type: maas vectorize_model:&vectorize_model api_key: sk-V4rpB2LLM5sC6CGxmUWs1LRqhZpddDEIVmsGBmwH9rm67y6F base_url: https: / / yunwu.ai / v1 model: text-embedding-3-small type: openai vector_dimensions: 1536 vectorizer: *vectorize_model project: biz_scene: default host_addr: http: / / 127.0.0.1:8887 id: '1' language: zh namespace: Supervision checkpoint_path: . / runner-ckpt Next, configure the knowledge index in the template that supports formats such as pdf, docx, and csv, including the configuration of the knowledge extraction model, prompt words, and slices (slice length and sliding window size). The specific configuration is as follows: pdf_kag_builder_pipeline: chain: type: unstructured_builder_chain extractor: type: schema_constraint_extractor llm: *openie_llm ner_prompt: type: default_ner std_prompt: type: default_std triple_prompt: type: default_triple reader: type: pdf_readerpost_processor: type: kag_post_processor similarity_threshold: 0.9 splitter: type: length_splitter split_length: 800 window_length: 100 vectorizer: type: batch_vectorizer vectorize_model: *vectorize_model writer: type: kg_writer num_threads_per_chain: 1 num_chains: 16 scanner: type: file_scanner 3. Use the knext tool in the KAG framework to create and initialize the project. After initialization, three blank folders, builder, schema, and solver, will be generated in the project root directory. You will need to add relevant execution code scripts based on your specific business needs. In the schema folder, copy the schema template from the framework and modify it based on the keywords related to the oversight business. Then submit the schema using the knext tool. Considering that project oversight businesses involve key entities such as tasks, systems, departments, and terminology, the schema configuration here is as follows: Namespace Supervision Chunk: EntityType properties: content(content): Text index: TextAndVector Tasks: EntityType properties: desc(description): Text index: TextAndVector semanticType(semantic type): Text index: Text supervision(Supervision): Supervision constraint: MultiValue tools(Tools): Tools constraint: MultiValue method: Procedure constraint: MultiValue relations: violations:Object Blacklist: Reference System: EntityType properties: desc(description): Text index: TextAndVector semanticType(semantic type): Text index: Text Department: EntityType properties: desc(description): Text index: TextAndVector semanticType(semantic type): Text index: Text Terminology: EntityType properties: desc(description): Text index: TextAndVector semanticType(semantic type): Text index: Text Others: EntityType properties: desc(description): Text index: TextAndVector semanticType(semantic type): Text index: Text 4. Build the knowledge index in the project's builder folder. Within the builder folder are two folders: data and prompt. First, place all professional resources in the data folder. Then, add Python scripts to the prompt folder for named entity extraction, entity normalization, and subject-verb-object triple extraction. Named entity extraction uses large-scale model instruction fine-tuning technology. Attach the following template to the script to ensure that the model accurately generates query results based on user-provided natural language instructions.
[0029] template_zh = """ { "instruction": "You are an expert in named entity recognition. Please extract entities that match the pattern definition from the input. If no entities of that type exist, please return an empty list. Please respond in JSON string format. You can refer to the example for extraction.", "schema": $schema, "example": [ { "input": "The supervision process for contract violations is as follows: 1. The Materials Department will periodically maintain and update the blacklist supplier database on the XX system. Any data changes will be emailed to the supervisor's email address. 2. Supervisors will regularly export the current year's contract data from the Economic and Legal System each month and investigate each contract violation, primarily verifying that Party B is not on the blacklist." "output": [ {"name": "Illegal contract signing","category": "Tasks","description": "Illegal contract signing is the subject of supervision tasks"}, {"name": "Supervision","category": "Tasks","description": "Supervision is a task."}, {"name": "Process","category": "Tasks","description": "A process is a specific solution to a task."}, {"name": "Supplies Department","category": "Department","description": "Supplies Department is a department."}, {"name": "XX System","category": "System","description": "XX System is the system where the target data is located."}, {"name": "Mailbox","category": "Tasks","description": "Mailbox is a tool for implementing solutions."}, {"name": "Blacklist","category": "Tasks","description": "The blacklist is a reference for monitoring the progress of tasks."}, ] } ], "input": "$input"} The main function of the entity standardization script is to normalize entity names and associate the normalized names with the original entity information, so that the large model can recognize informal terms in the data. Triple extraction involves the large model first extracting the subject, predicate, and object of professional knowledge through information extraction, then combining this with the standardized entities to construct a knowledge graph, laying the foundation for the structured search strategy in step 5.
[0030] 5. Use the search scripts in the project's solver folder to perform the search. Before searching, add the scripts logic_form_plan.py and dense_passage_retrieve.py to the prompt folder within the solver folder, based on the specific requirements of the supervisory business being queried. In logic_form_plan.py, the design of the LogicFormPlanPrompt framework is utilized, as shown below, to break down complex problems into the logical form of multiple subproblems.
[0031] class LogicFormPlanPrompt(PromptABC): instruct_zh = """"instruction": "", "function_description": "functionName is the operator name; the basic format is functionName(arg_name1=arg_value1,[args_name2=arg_value2, args_name3=arg_value3]), the parameters are in brackets, parameters enclosed by [] are optional parameters, and parameters not enclosed by [] are required parameters", "function": [ { "functionName": "get_spo", "function_declaration": "get_spo(s=s_alias:entity_type[entity_name],p=p_alias:edge_type, o=o_alias:entity_type[entity_name], p.edge_type=value)", "description": "Search for spo information. s represents subject, o represents object, and is expressed as variable name: entity type [entity name]. The entity name is optional and must be given when there is a clear query entity. p represents the predicate, i.e., relationship or attribute, and is expressed as variable name: edge type or attribute type. Each variable is assigned a variable name to be used as a reference in subsequent mentions. Note that s, p, and o cannot appear multiple times in the same expression. When a variable is a variable name previously referred to, the variable name must be consistent with the variable name, and only the variable name needs to be given. The entity type is only given when it is first introduced." }, { "functionName": "count", "function_declaration": "count_alias=count(alias)", "description": "Counts the number of nodes. The parameter specifies the node set to be counted. It can only be the variable name that appears in get_spo. count_alias is the variable name representing the calculation result. It can only be of int type. The variable name can be used as a reference in the following text." }, { "functionName": "sum", "function_declaration": "sum(alias, num1, num2, ...)->sum_alias", "description": "Data summation. The parameter specifies the set to be summed. It can be a number or a variable name mentioned above. Its content can only be a numeric type. sum_alias is the variable name representing the calculation result. It can only be a numeric type. The variable name can be used as a reference in the following text." }, { "functionName": "sort", "function_declaration": "sort(set=alias, orderby=o_alias or count_alias or sum_alias, direction=min or max, limit=N)", "description": "Sorts a set of nodes. `set` specifies the node set to be sorted, which can only be the variable name that appears in `get_spo`. `orderby` specifies the basis for sorting, which can be the relationship or attribute name of the node. If it has been mentioned before, it is referred to by an alias. `direction` specifies the direction of sorting, which can only be `min` (ascending order) or `max` (reverse order). `limit` specifies the number of output nodes, which is an int type. This can be used as the final output result." }, { "functionName": "get", "function_decl:aration": "get(alias)", "description": "Returns the information represented by the specified alias, which can be an entity, relationship path, or attribute value obtained by get_spo; can be used as the final output result." } ] A dual search strategy is then used. First, a structured knowledge graph is used for search. For each logical expression node, subject, predicate, and object triples are extracted through retrieval, sort, math, deduce, and output. The discrete knowledge is then integrated and reasoned through a large model to form the final search results. If the knowledge graph fails to produce suitable results after multiple rounds of search, the unstructured dense_passage_retriever script is used to obtain the final results through open-domain search. In practice, due to the wide variety of professional knowledge and the lack of manual labeling, dense_passage_retriever considers using a transformer model and BERT tokenization to construct a dual encoding model for open-domain search. In this dual encoding model, one encoding module is responsible for question embedding, while the other encoder is responsible for knowledge embedding. Both the question embedding and the knowledge embedding vectors are in the same latent space. The entire dense_passage_retriever training process is divided into the following four steps: Step 1: Using BERT tokenization encoding parameters and Vectorize the questions and professional knowledge, then retrieve the top-K sampled professional information according to formula (1), and use the current encoding parameters to Recalculate the new retrieval score as shown in formula (2); ;(1) ;(2) in, represents the K highest-scoring expertise samples selected according to formula (1); D represents the expertise set, and q represents the question.
[0032] Step 2: Calculate the probability of the search result Z according to formula (3) based on the score of formula (2). Here is the temperature parameter of the large model.
[0033] ;(3) Step 3: According to formula (4), the decoder, i.e., the large model, is used to predict the relative score of the search result Z, and the score is processed into a value between 0 and 1 by softmax to facilitate the optimization of the KL divergence loss function in step 4. Here is the large model parameter.
[0034] ;(4) Step 4: Through multiple rounds of training, minimize the KL divergence loss function between the probability distribution of search results based on the dual encoding model and the probability distribution of search results predicted by the decoder, as shown in Formula (5). At this point, the question token output by the decoder and the question token input by the encoder reach the highest match.
[0035] ;(5) During the training process, the decoder output is used to train the encoder parameters, ultimately enabling the encoder to select expertise suitable for a specific problem. This unstructured search model can be used when the knowledge graph search results do not meet user needs.
[0036] 2. An AI-agent-based intelligent supervision system for power engineering projects The AI-agent-based intelligent supervision system for power engineering projects is an application development platform based on a multimodal large model. It can package the model with different components into various agents to carry out supervision business in a coordinated manner. (See attached Figure 1As shown in the figure, the system includes a perception layer, a decision-making layer and an execution layer. The perception layer is used to receive specific supervision requirements provided by staff, and at the same time perceive relevant project data in other places to supplement supervision requirements. The data includes multimodal information such as text, images, and voice, which can provide strong data support for the accurate decision-making of the decision-making layer; the decision-making layer further decomposes the needs of staff (including uploaded pictures, text and other information), splits them into multiple specific subtasks, and provides corresponding solutions for each subtask; the execution layer further organizes the solution steps given by the decision-making layer into a standard workflow, and calls relevant tools to realize the automated operation of the supervision business.
[0037] The perception layer is mainly composed of web search agents, which are used to perceive the updated project information in the business system and upload relevant updated content to the database of the intelligent supervision system based on the user's supervision business search.
[0038] The decision-making layer consists of a professional knowledge base and an enhanced search agent, primarily responsible for providing specific plans for conducting supervisory tasks. Building the knowledge base requires users to upload specialized knowledge, such as regulatory documents, risk prevention and control documents, and typical cases, to provide the enhanced search agent with an external database of specialized knowledge. The enhanced search agent consists of a Knowledge Augmented Generation (KAG) component and a multimodal big model. The KAG component includes two modules: KAG-Builder and KAG-Solver. KAG-Builder is responsible for constructing offline searches, while KAG-Solver enhances the logic and accuracy of knowledge generation through a hybrid reasoning engine guided by logical formalisms. Both modules interact with the multimodal big model during their respective operations to improve the quality of their output. For detailed steps, see How to Build a Professional Knowledge Base Based on the KAG Framework.
[0039] The execution layer consists of external tools such as database search, code execution, and text generation. By combining the large model with different tools, multiple agents are formed. These agents work together to automatically generate a workflow based on the supervision steps output by the decision layer. Each node in the workflow automatically calls the relevant tools to complete the supervision task. To generate more precise workflows, it is necessary to upload some workflow templates to the cursor editor, a code generation tool. The specific workflow of the execution layer is as follows: first, a standard template for the supervision business workflow is uploaded to the file import module of the supervision system. After the supervision plan output by the decision layer is input to the execution layer, the user enters the following dialog box: "Please match the relevant business workflows in the standard template with the supervision business plan to generate a specific workflow for this project." The language model in the multimodal large model then extracts and classifies the user's requirements. Then, based on the workflow template, it infers and generates a workflow file suitable for the business. After the user uploads the workflow file to the workflow center of the smart supervision system and clicks "Run", each node in the workflow will sequentially call the relevant external tools to execute the task.
[0040] Example 3: The following uses the distributed photovoltaic access capacity supervision service as an example to introduce how to use the intelligent supervision system for automated service supervision.
[0041] Step 1: The supervisor creates a new project called "Distributed PV Access Capacity Supervision" in the intelligent supervision system and enters the following in the dialogue box: "Please query the distributed PV access capacity of new users in the past year on the XX system and provide the corresponding supervision process." The large model then uses natural language processing technology to perform semantic analysis on the input information and identify the keywords "distributed PV access capacity." Then, based on the large model's initial understanding of the requirements, the web search agent in the system's perception layer automatically crawls the XX system for relevant information on "distributed PV access capacity of new users in the past year," including grid connection information and power generation household profile information, and uploads it to the supervision project's database. Step 2: The system's decision layer further understands the requirements through the large model and, by invoking an enhanced search agent, retrieves reference cases from the professional database to develop a more appropriate supervision approach. For example, the large model first understands the user's requirements and identifies the key entities "distributed photovoltaics," "connected capacity," and "supervision." Based on this, it searches the professional database for each of these entities using a structured knowledge graph. Through retrieval, sorting, calculation, reasoning, and output, it collects subject, predicate, and object triples from the professional knowledge base related to the project. The large model then integrates and reasons with the model to generate preliminary results. If this process fails to provide a satisfactory answer, the control layer employs an unstructured search strategy called dense passage retrieval. This strategy utilizes a dual-encoding model composed of a Transformer and BERT tokenization, working in conjunction with the large model to generate the most appropriate solution to the requirements without the need for specialized knowledge annotation. In this example, the control layer, after reasoning about the requirements using the enhanced search agent, arrives at the following solution: 1. Query the project database for relevant filing information, such as the grid-connected capacity reported in the XX system and the grid-connected capacity in the generator's archives. 2. Compare the two to see if they are consistent. If the registered capacity in the generator's file matches the grid-connected capacity reported in the XX system, the comparison result will be displayed as normal. If there is no generator's file information or the registered capacity in the file information does not match the grid-connected capacity, the comparison result will be displayed as abnormal. 3. After the comparison, save all results in an XLS spreadsheet, including the specific project name, organizing unit, organizer, and supervision results. 4. Analyze the results to identify the distribution of illegal projects over the past year and use this to determine the key areas for supervision work in the second year.
[0042] Step 3: The above steps at the decision-making layer serve as prompts to enter the system's execution layer, which then invokes the workflow agent. The workflow agent consists of a cursor code generation tool integrated with the big model. To generate more targeted and precise workflows, users upload the supervision business template folder to the cursor editor and enter the following in the editor's dialog box: "Please generate a specific workflow for this project based on the relevant business workflows in the distributed photovoltaic access capacity supervision business matching standard template." The cursor then automatically generates workflow code based on key information extracted from the template file by the big model.
[0043] Step 4: After the user runs the code, a workflow file is generated. The workflow file is imported into the workflow center of the supervision system and the entire supervision task is completed by clicking "Run". This file contains a start node, a large model node, a tool node, and an end node. The requirement to "query relevant filing information in the project database" is input into the large model node as the start node. Based on the analysis of the requirement, the large model triggers the database search tool in the tool node and feeds back the retrieved "distributed photovoltaic access capacity" project information to the user. The tool node then calls the code execution tool to generate and execute the data verification code according to step 2. During this process, because the filing capacity in the power generation household's archival information requires OCR recognition, the tool node will call the OCR tool to identify the filing capacity. After the code execution is completed, the large model will integrate all the results into a supervision report and feed it back to the user, at which point the entire supervision workflow is complete.
Claims
1. The method for constructing a knowledge base of power engineering projects based on AI-agent is characterized by: The steps include: Step 1. Download the source code of the Knowledge Augmented Generation (KAG) framework to your local computer. Step 2. Copy the example_config.yaml template file in the source code and modify the configuration parameters according to the business requirements of the power engineering project. Step 3. Use the knext tool in the KAG framework to create and initialize the project, and then add the project's schema file; Step 4. Build the knowledge index in the builder folder of the project initialized and modified in Step 3. Step 5. Use the search script in the solver folder of the project to search.
2. The method for constructing a power engineering project knowledge base based on AI-agent according to claim 1 is characterized in that: In Step 2, the specific process of modifying the configuration parameters according to the business requirements of the power engineering project is as follows: Step 2.
1. Configure the initial project parameters, including the project's namespace and host_address related parameters, multimodal large model parameters, and text embedding model parameters. Step 2.
2. Configure the knowledge index in the template that supports formats such as pdf, docx, and csv, including the configuration of the knowledge extraction model, prompt words, and slices.
3. The method for constructing a power engineering project knowledge base based on AI-agent according to claim 2 is characterized in that: In Step 3, the specific process of adding the schema file after initializing the project is as follows: After initializing the project, three blank folders, builder, schema, and solver, are generated in the project root directory. Add relevant execution code scripts based on the business of the power engineering project. In the schema folder, copy the schema template in the original framework to the schema folder. Modify the file based on the business characteristics of the power engineering project supervision, and then submit the schema through the knext tool.
4. The method for constructing a power engineering project knowledge base based on AI-agent according to claim 3 is characterized in that: In Step 4, the specific process of building a knowledge index in the project builder folder is as follows: The builder folder contains two folders, data and prompt. Put the data of the power engineering project into the data folder, and then add Python scripts for named entity extraction, entity standardization, and subject-verb-object triple extraction into the prompt folder.
5. The method for constructing a power engineering project knowledge base based on AI-agent according to claim 4 is characterized in that: In the aforementioned Step 4, named entity extraction is performed by fine-tuning the large model instruction with a template attached to the script.
6. The method for constructing a power engineering project knowledge base based on AI-agent according to claim 5 is characterized in that: In Step 5, the specific process of searching using the search script in the solver folder of the project is as follows: Step 5.
1. Before searching, add the scripts logic_form_plan.py and dense_passage_retrieve.py to the prompt folder under the solver folder according to the supervisory business requirements. The script logic_form_plan.py uses the LogicFormPlanPrompt in the framework to decompose a search problem into multiple sub-problems. Step 5.2: Use a dual search strategy. First, use a structured knowledge graph for search. For each logical expression node, extract the subject, predicate, and object triples through the retrieval, sort, math, deduce, and output steps. If the knowledge graph fails to produce a satisfactory result in multiple rounds of search, use the unstructured dense_passage_retrieve.py script to obtain the final result through the open domain retrieval algorithm.
7. An intelligent supervision system using the method for constructing a power engineering project knowledge base based on an AI-agent according to any one of claims 1 to 6, characterized in that: The supervision system includes a perception layer, a decision layer, and an execution layer that sequentially transmit information. The multimodal large model provides data support for the perception layer, decision layer, and execution layer, and provides a specific plan for information transmission. The perception layer is used to receive specific supervision requirements provided by staff, and at the same time perceive relevant project data existing in other places to supplement the supervision requirements. The data includes multimodal information such as text, images, and voice; the decision-making layer further decomposes the staff's needs, including uploaded pictures and text information, into multiple specific subtasks, and provides corresponding solutions for each subtask; the execution layer further organizes the solution steps given by the decision-making layer into a standard workflow, and calls relevant tools to realize the automated operation of the supervision business.
8. The intelligent monitoring system according to claim 7, characterized in that: The perception layer is composed of a web search agent, which is used to perceive the updated project information in the business system and search for relevant updated content based on the user's supervision business and upload it to the database of the intelligent supervision system.
9. The intelligent monitoring system according to claim 8, characterized in that: The decision-making layer consists of a knowledge base and an enhanced search agent, which is used to provide specific plans for conducting supervisory work. The construction of the knowledge base requires users to upload knowledge materials, including institutional documents, risk prevention and control documents, and typical cases, to provide an external database for the enhanced search agent. The enhanced search agent consists of a Knowledge Augmented Generation (KAG) component and a multimodal large model. The KAG component includes two modules: KAG-Builder and KAG-Solver. KAG-Builder is responsible for building offline retrieval, while KAG-Solver enhances the logic and accuracy of knowledge generation through a hybrid reasoning engine guided by logical forms. Both modules need to interact with the multimodal large model during their respective operations.
10. The intelligent monitoring system according to claim 9, characterized in that: The execution layer is composed of external tools such as database search, code execution and text generation. By combining a large model with different tools, multiple agents are formed. Multiple agents work together to automatically generate a workflow for the supervision steps output by the decision layer. Each node in the workflow automatically calls the relevant tools to complete the supervision task.