Intelligent question-answering system and method for power grid dispatching based on LLMs prompt word optimization

Through an intelligent question-answering system based on LLMs prompt word optimization, and using FESS, RTST and MIX search modes to process structured and unstructured data, the problems of difficult knowledge base maintenance and insufficient data utilization in traditional power grid dispatching systems are solved, and efficient and accurate power grid dispatching question-answering support is achieved.

CN116860925BActive Publication Date: 2025-10-03JILIN POWER SUPPLY COMPANY STATE GRID JILIN ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310677415.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-09
Publication Date
2025-10-03
Estimated Expiration
2043-06-09

AI Technical Summary

Technical Problem

Traditional power grid dispatching question-and-answer systems require manual writing and maintenance of a large number of rules or knowledge bases, which are difficult to update, cannot handle semantically complex or ambiguous problems, and cannot utilize unstructured text data, resulting in incomplete knowledge coverage and incomplete answers.

Method used

An intelligent question-answering system based on LLMs prompt word optimization is adopted, including a user interface module, a knowledge management module, a question-answering engine module and an evaluation optimization module. It uses FESS, RTST and MIX search modes, combines large language models to generate answers, dynamically selects knowledge sources and optimizes prompt information, and supports the processing of structured and unstructured data.

Benefits of technology

It improves the accuracy and comprehensiveness of questions and answers, reduces the workload of manual maintenance, improves the work efficiency and quality of power grid dispatchers, supports simultaneous use by multiple users with data security, and adapts to multiple scenarios and tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116860925B_ABST
    Figure CN116860925B_ABST
Patent Text Reader

Abstract

A power grid dispatch intelligent question-and-answer system and method based on LLMs prompt word optimization belongs to the field of artificial intelligence. The system includes a user interface module, a question-and-answer engine module, a knowledge management module, and an evaluation and optimization module, each of which is used to receive and display user input and output, generate answers, manage and maintain the knowledge base, collect user feedback and evaluations, and perform system optimization. The present invention adopts three prompt information search modes: FESS search mode, RTST search mode, and MIX search mode. It respectively utilizes the locally deployed FESS keyword search service, RTST semantic search service, and a combination of the two to retrieve or match the most relevant content from data of different types and sources, insert it into the conversation to generate prompt information, and then use the optimized prompt information as input to the large language model to stimulate the large language model's generation capabilities. Finally, the large language model performs comprehensive analysis and summary to generate answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence, and in particular, relates to an intelligent question-answering system and method for power grid dispatching based on LLMs prompt word optimization. Background Art

[0002] Grid dispatching is a crucial component of the power system, responsible for real-time monitoring and control of the system's operational status to ensure a secure, stable, and economical power supply. Grid dispatchers require extensive expertise and, faced with complex operating environments and emergencies, must quickly and accurately answer questions and provide decision support.

[0003] Traditional power grid dispatch question-and-answer systems are primarily rule-based or knowledge-based, matching predefined questions and answers or returning relevant information by querying structured knowledge bases. These approaches have the following drawbacks: First, they require the manual writing and maintenance of numerous rules or knowledge bases, which is labor-intensive and difficult to update; second, they are unable to handle semantically complex or ambiguous questions, prone to matching errors or unanswered questions; and third, they cannot leverage unstructured text data, such as documents, reports, and papers, resulting in incomplete knowledge coverage and imperfect answers.

[0004] A large language model (LLM) is a general-purpose language generation model trained using deep learning techniques. It can generate relevant output text based on input text. LLMs possess powerful language understanding and expression capabilities, and one of their most important applications is content generation for specific environments. To achieve this goal, two main approaches are currently being used: full fine-tuning and LoRa fine-tuning. Full fine-tuning involves retraining the original LLM using domain-specific data to adapt it to specific tasks or scenarios. This approach can improve the LLM's performance in specific domains, but requires significant computing power and is prohibitively expensive, making it affordable only for a few large companies. LoRa fine-tuning involves adding a locally reparameterizable (LoRA) layer to the original LLM. This fine-tuning uses domain-specific data without changing the original LLM's parameters. This approach reduces the computing power and cost required for fine-tuning, but sacrifices basic performance in exchange for single-task performance. Summary of the Invention

[0005] The purpose of the present invention is to provide an intelligent question-answering system and method for power grid dispatching based on LLMs prompt word optimization, which can effectively utilize structured and unstructured data sources, improve the accuracy and comprehensiveness of questions and answers, reduce the workload of manual writing and maintenance of rules or knowledge bases, and improve the work efficiency and quality of power grid dispatchers.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: an intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization, comprising:

[0007] The user interface module is configured to receive questions input by the user and convert the questions into a standard format, which is a text format or a voice format that can be parsed by the knowledge management module using a content parsing algorithm. The user interface module is also configured to send the selected knowledge base and knowledge search mode to the question-answering engine module. The user interface module displays the answers output by the question-answering engine module to the user, collects user feedback and evaluation of the answers, and transmits the feedback and evaluation to the evaluation and optimization module.

[0008] The knowledge management module is used to manage and maintain the knowledge base. It uses OCR, NLP, CV and other technologies as content parsing algorithms to process documents of different formats and sources, extract entity word information, and convert it into structured data. Based on the different ranges of power grid dispatch technical issues and contextual information input by users, it dynamically selects knowledge sources and passes the content found in the selected knowledge sources that is related to the user's question keywords or semantically related and can be used as answer material as auxiliary information to the question-answering engine module.

[0009] The question-answering engine module is used to call the corresponding submodule to search the corresponding knowledge base using an automatic script based on the knowledge base and knowledge search mode selected by the user. After finding relevant keywords, it inserts them into the conversation to generate prompt information and optimizes them. In this way, the information in the knowledge base will be utilized by the large language model. The optimized prompt information is then used as input by the large language model, which performs comprehensive analysis and summary to generate answers, and finally returns the answers to the user interface module.

[0010] The knowledge search mode includes FESS search mode, RTST search mode and MIX search mode;

[0011] The submodules include FESS keyword search submodule, RTST semantic search submodule and MIX search submodule;

[0012] in:

[0013] The FESS keyword search submodule is a local search engine that crawls local file contents and extracts keywords. Using the locally deployed FESS search server, it can retrieve relevant content from intranet pages, TXT files, PDF files, and databases that can be used to generate answers to user-entered questions, insert it into the conversation to generate prompt information, and then use the optimized prompt information as input to the large language model to stimulate its generative capabilities. The FESS keyword search submodule can search based on the knowledge base selected by the user and supports keyword extraction and similarity sorting.

[0014] The RTST semantic search submodule is a text similarity calculation engine based on vectorized processing of knowledge such as TXT and PDF. It can solve the problem of comparing the similarity between user input text and records in a given corpus. It uses sentence_transformers and faiss to build a semantic search engine. It matches the records with the most similar semantics to the user's input question in a pre-defined question-answer pair library and returns the corresponding contextual information that can be used to generate the answer to the question. This information is inserted into the conversation as input to the large language model to stimulate its generative capabilities.

[0015] The MIX search submodule is used to comprehensively utilize the FESS keyword search submodule and the RTST semantic search submodule to retrieve or match the content most relevant to the user's question from local data of different types and sources, insert it into the conversation to generate prompt information, and then use the optimized prompt information as input to the large language model to stimulate its generative capabilities.

[0016] The evaluation and optimization module is used to evaluate and optimize the performance and quality of the question-answering engine, and to collect and analyze user feedback and evaluations.

[0017] Furthermore, the knowledge base includes a basic power knowledge base, a power grid dispatching knowledge base and a power equipment knowledge base. The content covers the basic information of various equipment in the power grid in the user's area, the grid structure and topological relationship, localized information such as power grid dispatching operation procedures and plans, as well as national standards, industry standards, enterprise standards, systems, regulations, etc. in the field of power grid dispatching.

[0018] Furthermore, the large language model is ChatGLM-6B, chatRWKV, and llama, but is not limited thereto.

[0019] Furthermore, the text similarity calculation in the RTST search submodule adopts the BERT algorithm.

[0020] Furthermore, the evaluation method adopted by the evaluation optimization module includes accuracy, recall rate and response time indicators.

[0021] Furthermore, the optimization methods adopted by the evaluation optimization module include transfer learning, reinforcement learning and meta-learning.

[0022] An intelligent question-answering method for power grid dispatching based on LLMs prompt word optimization is implemented using the aforementioned intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization. Specifically, the method includes:

[0023] The user enters a question and selects a knowledge base and knowledge search mode;

[0024] Dynamically select knowledge sources based on a range of power grid dispatch technical issues and contextual information input by users;

[0025] Based on the knowledge base and knowledge search mode selected by the user, the FESS keyword search submodule, RTST semantic search submodule, or MIX search submodule is called to search the corresponding knowledge base using an automatic script. Relevant keywords are found to generate prompt information and optimize it. The optimized prompt information and question are then used as input for the large language model, and the answer is returned to the user.

[0026] Users review the answers and provide feedback;

[0027] Collect and analyze user feedback;

[0028] Use the evaluation and optimization module to perform evaluation and optimization.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention proposes an intelligent question-answering system and method for power grid dispatching based on LLMs prompt word optimization, which can improve the generation capability of LLM without changing the original LLM parameters or adding additional parameter layers, and realizes an intelligent question-answering system for power grid dispatching that can be independently deployed locally or in an intranet and adapt to multiple scenarios and tasks.

[0031] The present invention can effectively utilize structured and unstructured data sources, improve the accuracy and comprehensiveness of questions and answers, reduce the workload of manual writing and maintenance of rules or knowledge bases, and improve the work efficiency and quality of power grid dispatchers.

[0032] The present invention adopts three prompt information search modes: FESS search mode, RTST search mode and MIX search mode. It respectively uses the locally deployed FESS keyword search server, RTST semantic search technology and the combination of the two to retrieve or match the content most relevant to the user's question in local file data of different types and sources, and inserts it into the conversation to generate prompt information. The optimized prompt information is then used as the input of the large language model to stimulate the generation ability of the large language model. Finally, the large language model performs comprehensive analysis and summary to generate the answer.

[0033] The power grid dispatching intelligent question-answering system based on LLMs prompt word optimization proposed in the present invention includes a user interface module, a knowledge management module, a question-answering engine module, and an evaluation and optimization module, which are respectively used to receive and display user input and output, manage and maintain multiple knowledge bases, generate answers, collect user feedback and evaluation, and perform system optimization.

[0034] The present invention can be independently deployed in a local or intranet environment, does not rely on external networks or cloud services, ensures data security and privacy, and supports simultaneous use by multiple users. When multiple users use it at the same time, it will automatically queue up and display the current user's information. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a functional block diagram of the overall structure of the power grid dispatching intelligent question-answering system based on LLMs prompt word optimization of the present invention;

[0036] Figure 2 This is a module call link diagram of the power grid dispatching intelligent question-answering system based on LLMs prompt word optimization of the present invention;

[0037] Figure 3 This is a workflow diagram of the power grid dispatching intelligent question-answering system based on LLMs prompt word optimization of the present invention. DETAILED DESCRIPTION

[0038] In order to make the technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be fully and clearly described below in conjunction with the accompanying drawings in the examples of the present invention.

[0039] like Figure 1 As shown, the intelligent question-and-answer system for power grid dispatching based on LLMs prompt word optimization of the present invention includes a user interface module, a question-and-answer engine module, a knowledge management module, and an evaluation and optimization module. Users enter questions through the user interface module, select a knowledge search mode (keyword search or semantic search) and a knowledge base (power basic knowledge base, power grid dispatch knowledge base, power equipment knowledge base, etc.), and then submit their questions. Based on the user-selected knowledge search mode and knowledge base, the question-and-answer engine module calls the corresponding submodule to use an automated script to search the corresponding knowledge base, find relevant keywords or relevant semantic content, generate prompt information, and optimize it. The optimized prompt information and question are then used as input for the large language model to answer, and the answer is returned to the user interface module for display. The knowledge management module is responsible for managing and maintaining multiple knowledge bases, supporting functions such as incremental knowledge updates, document uploads, and content parsing. The evaluation and optimization module is responsible for evaluating and optimizing the performance and quality of the question-and-answer engine, collecting and analyzing user feedback and evaluations, and providing some evaluation and optimization methods and indicators.

[0040] The user interface module is the interface between the system and the user. It provides a WebUI page and supports switching between model question-and-answer and retrieval question-and-answer modes, knowledge base selection, document upload, and content parsing. Users can enter a question on the WebUI page, select a prompt information search mode and knowledge base, and then click the Submit button. The user interface module sends the user-entered question, along with the selected knowledge search mode and knowledge base, to the Q&A engine module and awaits an answer. When the Q&A engine module returns an answer, the user interface module displays the answer on the WebUI page and prompts the user to determine whether they are satisfied with the answer and whether they wish to provide feedback or evaluation. Users can view the answer on the WebUI page and select whether they are satisfied with the answer and whether they wish to provide feedback or evaluation. The user interface module sends the user's feedback or evaluation to the evaluation and optimization module and stores it in the database. Users can also upload documents on the WebUI page, select a document type (e.g., PDF, Word, PPT, etc.), and then click the Upload button. The user interface module sends the uploaded document to the knowledge management module and awaits content parsing results. When the knowledge management module returns content parsing results, the user interface module displays the content parsing results on the WebUI page and prompts the user to confirm whether the document has been added to the corresponding knowledge base. The user can view the content analysis results on the WebUI page and choose whether to confirm adding it to the corresponding knowledge base. The user interface module sends the user's confirmation information to the knowledge management module and saves it in the database.

[0041] The knowledge management module is a module used by the system of the present invention to manage and maintain the knowledge base, supporting functions such as incremental knowledge updates, document uploads, and content parsing. The knowledge management module can convert documents of different formats and sources into structured data and store it in a database for easy retrieval and use. When the knowledge management module receives a document uploaded from the user interface module and a selected document type, it first calls the corresponding content parsing algorithm based on the document type to extract the text, images, tables, and other content contained in the document and convert them into structured data; then it stores the structured data in the database and updates the pre-defined question-and-answer database in the corresponding knowledge base; finally, it returns the content parsing results to the user interface module and waits for the user to confirm whether to add it to the corresponding knowledge base. When the knowledge management module receives confirmation information from the user interface module, it adds the structured data to the corresponding knowledge base based on the confirmation information and updates the database. The system of the present invention uses technologies such as OCR, NLP, and CV as content parsing algorithms, which can effectively process documents of different formats and sources, extract useful information, and convert it into structured data.

[0042] like Figure 2As shown, the question-answering engine module is the core module for question-answering in the system of the present invention, and includes a FESS keyword search submodule, an RTST semantic search submodule, and a MIX search submodule. When the question-answering engine module receives questions from the user interface module and the selected question-answering mode and knowledge base, it calls the corresponding submodule to perform question-answering according to the selected question-answering mode and returns the answer to the user interface module. If the FESS search mode is selected, the FESS keyword search submodule is called to perform question-answering; if the RTST search mode is selected, the RTST semantic search submodule is called to perform question-answering; if the MIX search mode is selected, the MIX search submodule is called to perform question-answering.

[0043] like Figure 2 As shown, the FESS keyword search submodule utilizes a locally deployed FESS search server to retrieve content related to the user's input question from various data types, such as web pages, files, and databases. It then inserts prompts before the answer to stimulate the large language model's generative capabilities. This submodule can search based on the user's selected knowledge base and supports functions such as keyword extraction and similarity ranking. When the FESS keyword search submodule receives a question and a selected knowledge base from the question-answering engine module, it first generates a corresponding search script based on the knowledge base. It then sends the question and search script as input to the FESS search server to obtain search results. It then generates prompts based on the search results and inserts them into the conversation. The large language model then forms a complete answer. Finally, the answer is returned to the question-answering engine module. The system uses FESS as its search server, which can be deployed locally or on an intranet. It supports retrieval of data from various types and sources, and provides powerful search capabilities and flexible configuration options.

[0044] like Figure 2As shown, the RTST semantic search submodule is a semantic search submodule in which the system of the present invention uses sentence_transformers+faiss technology to match the question most similar to the question input by the user in the predefined question-answer pair library, and returns the corresponding answer and context information, and inserts some prompt information before the answer to stimulate the generation ability of the large language model. The RTST semantic search submodule can support multiple text formats, such as txt, doc, pdf and md, and supports two methods of pre-building indexes and running indexes. When the RTST semantic search submodule receives the question from the question-answering engine module and the selected knowledge base, it first loads the pre-defined question-answer pair library in the corresponding knowledge base, as well as the pre-built or running index; then uses sentence_transformers technology to convert the user question into a vector representation, and uses faiss technology to find the most similar vector in the index and return its corresponding question and answer; then generates some prompt information based on the returned question and answer, and inserts the prompt information before the answer to form a complete question; finally, returns the answer to the question-answering engine module.

[0045] like Figure 2 As shown, the MIX search submodule is a system of the present invention that utilizes the combined advantages of the FESS keyword search submodule and the RTST semantic search submodule to retrieve or match the most relevant content from data of different types and sources, and inserts some prompt information before the answer to stimulate the generative capabilities of the large language model. This MIX search submodule can combine the functions of the FESS keyword search submodule and the RTST semantic search submodule and dynamically generate the most appropriate prompt information based on the user's input question and context information. When the MIX search submodule receives the question from the question-answering engine module and the selected knowledge base, it first selects the corresponding FESS search script and RTST index based on the knowledge base; then sends the question to the FESS keyword search server and the RTST semantic search engine respectively, obtaining two types of search or matching results; and inserts these into the conversation to generate prompt information. The optimized prompt information is then used as input to the large language model to stimulate the generative capabilities of the large language model. Finally, the large language model performs comprehensive analysis and summary to generate an answer and returns it to the question-answering engine module. The system of the present invention adopts a prompt information generation algorithm based on weight and similarity, which can dynamically adjust the number, content and order of prompt information according to data of different types and sources to achieve the best stimulation effect.

[0046] The evaluation and optimization module is a module that the system of the present invention uses to evaluate and optimize the performance and quality of the question-answering engine, collect and analyze user feedback and evaluations, and provide some evaluation and optimization methods and indicators. The evaluation and optimization module can achieve continuous improvement of the system. When the evaluation and optimization module receives feedback or evaluations from the user interface module, it first stores the feedback or evaluations in the database and performs statistical analysis; then, based on the feedback or evaluation content, it calls the corresponding evaluation or optimization method to evaluate or optimize the question-answering engine; finally, it returns the evaluation or optimization results to the user interface module and displays them on the WebUI page. The system of the present invention uses indicators such as accuracy, recall rate, and response time as evaluation methods, which can objectively reflect the performance and quality of the question-answering engine; it uses transfer learning, reinforcement learning, meta-learning and other technologies as optimization methods, and can dynamically adjust and improve the question-answering engine based on user feedback or evaluations.

[0047] like Figure 3 As shown in FIG, the intelligent question-answering method for power grid dispatching based on LLMs prompt word optimization includes:

[0048] The user enters a question and selects a knowledge base and knowledge search mode;

[0049] Dynamically select knowledge sources based on a range of power grid dispatch technical issues and contextual information input by users;

[0050] According to the knowledge base and knowledge search mode selected by the user, the FESS keyword search submodule, RTST semantic search submodule or MIX search submodule is called, and the corresponding knowledge base is searched using an automatic script to find relevant keywords or related semantic content to generate prompt information and optimize it. The optimized prompt information and questions are then used as input to the large language model, and the answer is returned to the user.

[0051] The following is an example of a conversation process:

[0052] There are tens of thousands of question-answer pairs in the local "Regional Power Grid Dispatching Technology Question and Answer Knowledge Base.txt", including the following:

[0053] 11. What are the configuration principles for busbar protection in distributed power access systems?

[0054] The busbar protection of the distributed power access system should meet the following configuration principles: (1) When the distributed power system is equipped with a busbar, dedicated busbar protection may not be required. In the event of a fault, the backup protection of the busbar active connection element can be used to clear the fault. If the backup protection time limit cannot meet the stability requirements, a corresponding protection device can be configured to quickly clear the busbar fault. (2) The busbar protection on the substation or switch station side of the system should be verified. If it cannot meet the requirements, a protection device should be configured on the substation or switch station side to quickly clear the busbar fault.

[0055] 12. What is distributed photovoltaic power generation?

[0056] Distributed photovoltaic power generation refers to a distributed power generation system that uses photovoltaic modules to directly convert solar energy into electricity. It is a new and promising method for power generation and comprehensive energy utilization. It advocates the principles of local generation, local grid connection, local conversion, and local use. This not only effectively increases the power generation of photovoltaic power stations of similar size, but also effectively solves the problem of power loss during voltage boosting and long-distance transmission.

[0057] 13. How many types of distributed photovoltaic power generation systems are there?

[0058] Distributed photovoltaic power generation systems can be categorized as standalone photovoltaic power generation systems and grid-connected photovoltaic power generation systems. Standalone photovoltaic power generation systems, also known as off-grid photovoltaic power generation systems, are solar power generation systems that are not connected to the public power grid. Grid-connected solar photovoltaic power generation systems are solar power generation systems that are directly connected to the public power grid.

[0059] When the user asks a conversation question such as "Please briefly introduce the distributed photovoltaic power generation system", the system of the present invention will first search the local knowledge base, and find the above content related to "distributed photovoltaic power generation system" from it, and ask the following question to the large language model: Please summarize and conclude the following text and answer the question in Chinese. If you cannot get the answer from the following text, please ignore the content of the text and answer the question in Chinese: (Here is the text content searched above).

[0060] After receiving the above question, the large language model will combine the above searched text content and give the following answer:

[0061] A distributed photovoltaic power generation system uses photovoltaic modules to directly convert solar energy into electricity. It promotes the principles of local generation, local grid connection, local conversion, and local use. This not only effectively increases the power generation of photovoltaic power plants of similar size, but also effectively addresses power losses during voltage boosting and long-distance transmission.

[0062] Distributed photovoltaic power generation systems can be categorized as standalone and grid-connected. Standalone systems require photovoltaic modules to be installed in users' homes or on rooftops. They collect solar energy and convert it into electricity, while also requiring a connection to the power grid, separating power generation from power supply. Grid-connected systems, on the other hand, require photovoltaic modules to be installed on rooftops or public spaces. A controller then connects the modules' power generation to the grid, unifying both power generation and power supply.

[0063] The advantages of distributed photovoltaic power generation systems include: (1) advocating the principles of local power generation, local grid connection, local conversion, and local use, effectively increasing the power generation of photovoltaic power stations of the same size; (2) no noise during operation; (3) no combustion process, and the power generation process does not require fuel.

[0064] The present invention optimizes the prompt information of the large language model in the form of a knowledge base and automatic scripts, improving the generation capability of the LLM without changing the original LLM parameters or adding additional parameter layers. While retaining the versatility and flexibility of the LLM, it realizes an intelligent question-and-answer system for power grid dispatching that can be independently deployed locally or in an intranet and adapt to multiple scenarios and tasks.

Claims

1. An intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization, characterized by: include: The user interface module is configured to receive questions input by the user and convert the questions into a standard format, which is a text format or a voice format that can be parsed by the knowledge management module using a content parsing algorithm. The user interface module is also configured to send the selected knowledge base and knowledge search mode to the question-answering engine module. The user interface module displays the answers output by the question-answering engine module to the user, collects user feedback and evaluation of the answers, and transmits the feedback and evaluation to the evaluation and optimization module. The knowledge management module is used to manage and maintain the knowledge base. It processes documents of different formats and sources using OCR, NLP, or CV algorithms as content parsing algorithms, extracts entity word information, and converts it into structured data. Based on the different ranges of power grid dispatch technical issues and contextual information input by the user, it dynamically selects knowledge sources and passes the content found in the selected knowledge sources that is related to the user's question keywords or semantically related and can be used as answer material as auxiliary information to the question-answering engine module. The question-answering engine module is used to call the corresponding submodule to search the corresponding knowledge base using an automatic script based on the knowledge base and knowledge search mode selected by the user. After finding relevant keywords, it inserts them into the conversation to generate prompt information and optimizes them so that the information in the knowledge base can be used by the large language model. The optimized prompt information is then used as input by the large language model, which performs comprehensive analysis and summary to generate answers, and finally returns the answers to the user interface module. The knowledge search mode includes FESS search mode, RTST search mode and MIX search mode; The submodules include FESS keyword search submodule, RTST semantic search submodule and MIX search submodule; in: The FESS keyword search submodule is a local search engine that crawls local file content and extracts keywords. Using the locally deployed FESS search server, it retrieves relevant content from intranet pages, TXT files, PDF files, and databases that can be used to generate answers to user-entered questions. It then inserts this content into the conversation to generate prompts, which are then used as input for the large language model. The FESS keyword search submodule can search based on the user's selected knowledge base and supports keyword extraction and similarity ranking. The RTST semantic search submodule is a text similarity calculation engine based on vectorized text knowledge. It can solve the problem of comparing the similarity between user input text and records in a given corpus. It uses sentence_transformers and faiss to build a semantic search engine. It matches the records with the most similar semantics to the user's input question in a predefined question-answer pair library and returns the corresponding contextual information that can be used to generate the answer to the question. This information is then inserted into the conversation as input to the large language model. The MIX search submodule is used to comprehensively utilize the FESS keyword search submodule and the RTST semantic search submodule to retrieve or match the content most relevant to the user's input question from local data of different types and sources, insert it into the conversation to generate prompt information, and then use the optimized prompt information as input to the large language model; The evaluation and optimization module is used to evaluate and optimize the performance and quality of the question-answering engine, and to collect and analyze user feedback and evaluations.

2. The intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization according to claim 1 is characterized in that: The knowledge base includes a basic electric power knowledge base, a power grid dispatching knowledge base and an electric power equipment knowledge base.

3. The intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization according to claim 1 is characterized in that: The large language models are ChatGLM-6B, chatRWKV and llama.

4. The intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization according to claim 1 is characterized in that: The text similarity calculation in the RTST semantic search submodule adopts the BERT algorithm.

5. The intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization according to claim 1 is characterized in that: The evaluation methods adopted by the evaluation optimization module include accuracy, recall rate and response time indicators.

6. The intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization according to claim 1 is characterized in that: The optimization methods adopted by the evaluation and optimization module include transfer learning, reinforcement learning and meta-learning.

7. A method for intelligent question-answering in power grid dispatching based on LLMs prompt word optimization, the method being operated using the intelligent question-answering system for power grid dispatching based on LLMs prompt word optimization as claimed in any one of claims 1 to 6, and specifically comprising: The user enters a question and selects a knowledge base and knowledge search mode; Dynamically select knowledge sources based on a range of power grid dispatch technical issues and contextual information input by users; Based on the knowledge base and knowledge search mode selected by the user, the FESS keyword search submodule, RTST semantic search submodule, or MIX search submodule is called to search the corresponding knowledge base using an automatic script. Relevant keywords are found to generate prompt information and optimize it. The optimized prompt information and question are then used as input for the large language model, and the answer is returned to the user. Users review the answers and provide feedback; Collect and analyze user feedback; Use the evaluation and optimization module to perform evaluation and optimization.

Citation Information

Patent Citations

  • Power grid dispatching data searching method and system

    CN110704577A

  • Semantic analysis search method and device and storage medium

    CN112507076A