LLM-based power field intelligent question answering method, system, device and medium
By building a local knowledge base and combining multi-path recall and contextual retrieval, the problems of low recall accuracy and missing content in the power industry have been solved, achieving more accurate and adaptable intelligent question answering, and generating more accurate and readable answers.
Patent Information
- Application Number
- CN202410216625.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-02-27
AI Technical Summary
In the power industry, existing vector retrieval methods suffer from low recall accuracy and missing recall content, making it difficult to handle complex problems and domain-specific semantic relationships.
An intelligent question-answering method based on LLM in the power field is adopted. By constructing a local knowledge base, using multi-way recall and contextual retrieval, and combining a vector model to vectorize text content blocks, multi-way retrieval and document rearrangement are performed. Finally, the complete document content is sent to the LLM model to answer the question.
It improves recall accuracy in the power sector, ensures the completeness and accuracy of knowledge, generates more accurate and readable answers, is highly adaptable, and can handle a wide range of power sector issues.
Smart Images

Figure CN118277521B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent question answering technology, and specifically relates to an intelligent question answering method, system, device and medium in the power field based on LLM. Background Technology
[0002] The importance of intelligent question answering in the power sector lies in the fact that the design, operation, and maintenance of power systems require timely and accurate information and advice to ensure system reliability, safety, and efficiency. Traditional power information retrieval methods have some limitations in meeting these needs. Regarding keyword retrieval, traditional power information retrieval methods typically rely on user-provided keywords or phrases, then match these keywords with those in the text. While this method is simple, it has the following drawbacks: lack of semantic understanding: it often fails to understand the context and semantics of the user's question, leading to potentially inaccurate search results. Dependence on terminology: users must use precise terms and keywords; otherwise, search results may be incomplete. In terms of semantic retrieval, some advanced search attempts to provide more accurate search results by understanding the semantics of the user's query. They use natural language processing techniques to understand the question and find relevant content. Vector retrieval is one such method. Vector models are a widely used technique in information retrieval and natural language processing that represents text or data as vectors for various analysis and retrieval tasks. The core idea of this model is to transform text, documents, or data into vectors in a high-dimensional space for tasks such as semantic similarity calculation, text classification, and information retrieval. However, this approach still has some limitations, such as: limited comprehension capability: while it can understand semantics, its comprehension capability remains limited when facing complex problems. Difficulty in handling new problems: these systems often rely on known patterns and databases, and therefore may struggle to cope with new problems and changes in the domain.
[0003] Currently, intelligent question answering solutions based on LLM models can be categorized into the following approaches: One approach uses an open-source LLM as the base model, fine-tuning it with a knowledge base specific to the vertical domain to obtain a domain-specific model, which is then used to build the intelligent question answering system. The drawbacks of this method are: the collection and organization of training data requires significant manpower; the hardware requirements for fine-tuning training are high, resulting in substantial costs; knowledge updates are not timely, as real-time updates for large models are difficult to achieve, typically taking several days per update, thus the received data is inevitably delayed; and because LLM uses a probabilistic model, predicting the probability of generating the next character, errors are always possible in the generated results.
[0004] The second approach involves building a vertical domain knowledge base locally, then retrieving and recalling the knowledge from the local knowledge base based on the user's question. The retrieved knowledge is then post-processed, and finally, the user's question and the processed knowledge information are sent together to a general-purpose model for inference, allowing the model to answer the user's question. The drawbacks of this method are low recall precision, as vector models are typically general-purpose and struggle to capture domain-specific semantic relationships; certain domains have unique terminology, context, and relationships, requiring more specialized models or domain knowledge to improve accuracy; and due to document segmentation, large sections of content may be divided into multiple blocks, potentially resulting in only one block being recalled during retrieval, leading to incomplete answers.
[0005] Chinese patent publication number "CN117290485A" discloses a question-answering enhancement method based on a large language model. The method converts the original corpus text into corresponding corpus text vectors using a Text2Vec model and stores them in a vector database, while simultaneously recording the mappings matching the information in the original corpus text. The question text is then converted into a corresponding question text vector using the Text2Vec model, and a similarity search is performed between this vector and the corpus text vectors in the vector database to obtain the original corpus text corresponding to the most similar corpus text vector. This original corpus text and the question text are then input into an LLM (Large Language Model) to obtain the final answer. However, because vector models are typically general-purpose and struggle to capture domain-specific semantic relationships, and some domains have unique terminology, context, and relationships, this invention may suffer from low recall and precision. Summary of the Invention
[0006] This invention provides an intelligent question-answering method, system, device, and medium based on LLM in the power field, aiming to solve the problems of low recall accuracy and missing recall content in current vector retrieval in the power field.
[0007] To address the aforementioned technical problems, this invention provides an intelligent question-answering method for the power industry based on LLM, comprising the following steps:
[0008] S1: By reading and parsing various documents in the power industry, the text content is obtained. After text segmentation, uniform text content blocks are obtained. The contextual information of the documents is constructed and saved. The text content blocks are vectorized one by one using a vector model to obtain text word vectors. The text content blocks and text word vectors are saved to a vector database to build a local knowledge base.
[0009] S2: Based on the user's input question, perform multi-path recall and retrieval aggregation, and rearrange the retrieved documents.
[0010] S3: Based on the contextual association information of the top 1 document obtained from the multi-way recall stage, use the contextual retrieval tool to find the contextual document record of the document and merge them into a complete document.
[0011] S4: Combine the merged complete document content and user questions with the Prompt input to the LLM model to answer the questions.
[0012] Preferably, step S1 specifically includes:
[0013] S11: Extract and segment text from various documents in the power industry to obtain text content blocks, and save the contextual association information of the segmented documents.
[0014] S12: Input the text content blocks after text segmentation and the summary Prompt into the LLM model to generate text summary information.
[0015] S13: Input the text content blocks after text segmentation and the hypothetical question generation Prompt into the LLM model to generate hypothetical question information.
[0016] S14: Vectorize the text content blocks, text summary information and hypothesis question information in steps S2 and S3 using a vector model.
[0017] S15: Store the document context association information, text content blocks, text summary information, hypothetical question information, text content block word vectors, text summary word vectors, and hypothetical question word vectors generated in the above steps into the Elasticsearch vector database.
[0018] Preferably, the text segmentation in step S11 is specifically divided into line-by-line segmentation and automatic segmentation.
[0019] Line-by-line segmentation involves manually organizing multiple documents and then segmenting the text according to the manually organized paragraphs.
[0020] Automatic segmentation uses a semantic segmentation model to split the text, while also combining line-by-line segmentation to prioritize the integrity of small paragraphs. For large paragraphs, semantic segmentation is performed to ensure the semantic integrity of the text.
[0021] Preferably, the document context association information saved after text segmentation in step S11 includes: record ID, document ID, document name, and document sequence number.
[0022] Preferably, in step S3, finding the context document record of the document using the context retrieval tool specifically involves: retrieving the associated document record based on the document ID and document sequence number in the document context association information of the current document record, ensuring that the retrieved document records come from the same document and are sequentially adjacent.
[0023] Preferably, step S2 specifically comprises:
[0024] S21: Perform hypothetical question vector retrieval, text summary vector retrieval, text content block vector retrieval, and ES full-text retrieval based on the user's input question.
[0025] S22: Perform vector retrieval in the vector database using user questions and hypothetical questions. This retrieval requires a similarity score of 0.90 and sets the recall top 1 document.
[0026] S23: Perform vector retrieval in the vector database using user questions and text summary information. This retrieval requires a similarity score of 0.80 and sets the recall of the top 3 documents.
[0027] S24: Perform vector retrieval in the vector database using user questions and text content block word vectors. This retrieval requires a similarity score of 0.80 and sets the top 3 documents to be recalled.
[0028] S25: Perform ES full-text search on the text content field using user questions. This search requires a similarity score of 0.80 and sets the top 3 documents to be recalled.
[0029] S26: Merge the top 10 document lists retrieved by the four-way retrieval in steps S22, S23, S24, and S25, and use the re-ranking model to re-rank the documents to obtain the final sorted document list.
[0030] On the other hand, the present invention provides an intelligent question-answering system for the power field based on LLM, including a local construction module, a multi-path recall module, a retrieval merging module, and a question answering module.
[0031] The local construction module is used to read and parse various documents in the power industry to obtain text content, segment the text to obtain uniform text content blocks, build and save the contextual association information of the documents, use a vector model to vectorize the text content blocks one by one to obtain high-dimensional word vectors, and save the text content blocks and word vectors to a vector database to build a local knowledge base.
[0032] The multi-path recall module is used to perform multi-path recall and retrieval aggregation based on the user's input question, and to rearrange the retrieved documents.
[0033] The retrieval and merging module is used to find the context document records of the document based on the context association information of the top 1 document obtained from the multi-way recall stage, and merge them into a complete document using the context retrieval tool.
[0034] The question-and-answer module is used to combine the merged complete document content and user questions with the Prompt input to the LLM model to answer questions.
[0035] In another aspect, the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an LLM-based intelligent question-answering method for the power field as described in any embodiment of the present invention.
[0036] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an LLM-based intelligent question-answering method for the power field as described in any embodiment of the present invention.
[0037] Compared with the prior art, the present invention has the following technical effects:
[0038] 1. The LLM-based intelligent question-answering method for the power industry provided by this invention adopts a scheme of local LLM deployment + local knowledge base, and uses a multi-path recall combined with a contextual retrieval method to overcome the limitations of traditional methods and semantic-based retrieval methods. It compensates for the low recall rate problem in vector retrieval in the power industry and solves the problem of missing recalled content. This invention can provide a more accurate, comprehensive, and adaptable intelligent question-answering solution, and the generated answers are generally more accurate and readable.
[0039] 2. This invention fully utilizes the characteristics of LLM to construct a high-quality and complete knowledge base. On the one hand, the solution of this invention is based on hypothetical question generation, which improves the accuracy of vector retrieval in the power industry; on the other hand, based on multi-path recall, it solves the problem of low accuracy of single-path retrieval in the power industry, providing a better method for vector retrieval in vertical domains. The method of this invention is based on a contextual retrieval system, which solves the problem of missing recalled content, ensures the integrity of knowledge, and reduces the illusion problem of LLM. Attached Figure Description
[0040] Figure 1 This is an overall flowchart of an intelligent question-answering method for the power field based on LLM as described in this invention;
[0041] Figure 2 This is a flowchart of the method for constructing a local knowledge base as described in this invention;
[0042] Figure 3 This is a schematic diagram of the multi-path recall method described in this invention;
[0043] Figure 4This is an overall structural diagram of an intelligent question-answering system for the power industry based on LLM, as described in this invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present application and with reference to the accompanying drawings.
[0045] Example 1
[0046] This embodiment provides an intelligent question-answering method for the power industry based on Large Language Model (LLM). Compared with traditional keyword retrieval and semantic-based retrieval methods, this method has the following advantages:
[0047] Deep Semantic Understanding: LLM possesses powerful natural language understanding capabilities, enabling it to better understand the semantics and context of user questions, thus resulting in more accurate search results.
[0048] Extensive knowledge base: The method in this embodiment accesses a knowledge base containing a wide range of power-related information, allowing users to ask complex questions covering multiple aspects such as equipment specifications, operating guidelines, safety standards, and historical data, thus expanding the scope of application.
[0049] Dynamic learning: The local knowledge base can be continuously learned and updated to adapt to changes in the power sector and the emergence of new knowledge. This makes the system more adaptable and practical.
[0050] Accuracy and Scalability: Due to LLM's natural language generation capabilities, the system-generated answers are generally more accurate and readable. Furthermore, it can handle a wide range of problems across the power sector, from basic to advanced, thus offering advantages in scalability.
[0051] The core idea of this embodiment is to use a multivector retriever to retrieve knowledge from the local knowledge base, obtain a summarized list of knowledge information, and then sort the knowledge information through a reordering process to finally select the knowledge information most relevant to the question. Simultaneously, a parent document retriever is used to find and merge complete knowledge segments. Finally, the user's question and the complete knowledge information are sent together to the LLM model for reasoning, allowing the LLM model to answer the user's question. The LLM model used in this embodiment can be any existing LLM model.
[0052] See Figure 1 As shown, the method includes the following steps:
[0053] S1: By reading and parsing various documents in the power industry, the text content is obtained. After text segmentation, uniform text content blocks are obtained. The contextual information of the documents is constructed and saved. The text content blocks are vectorized one by one using a vector model to obtain text word vectors. The text content blocks and text word vectors are saved to a vector database to build a local knowledge base.
[0054] S2: Based on the user's input question, perform multi-path recall and retrieval aggregation, and rearrange the retrieved documents.
[0055] S3: Based on the contextual association information of the top 1 document obtained from the multi-way recall stage, use the contextual retrieval tool to find the contextual document record of the document and merge them into a complete document.
[0056] S4: Combine the merged complete document content and user questions with the Prompt input to the LLM model to answer the questions.
[0057] As a preferred embodiment of this example, see [link / reference]. Figure 2 As shown, step S1 specifically includes:
[0058] S11: Extract and segment text from various documents in the power industry to obtain text content blocks, and save the contextual information of the segmented documents. Text extraction specifically involves reading documents of various formats into text format. Open-source tools such as Langchain can be used. This embodiment uses a self-developed text extraction component, supporting text extraction from files such as txt, word, pdf, ceb, and ofd.
[0059] S12: Input the text content blocks after text segmentation and the summary Prompt into the LLM model to generate text summary information.
[0060] S13: Input the text content blocks after text segmentation and the hypothetical question generation Prompt into the LLM model to generate hypothetical question information.
[0061] S14: Generate text word vectors for the text content blocks, text summary information, and hypothesis question information in steps S2 and S3 using a vector model. This can be done by calling a vector model (moka-ai_m3e-base or BAAI / bge-large-zh-v1.5).
[0062] S15: Store the document context association information, text content blocks, text summary information, hypothetical question information, text content block word vectors, text summary word vectors, and hypothetical question word vectors generated in the above steps into the Elasticsearch vector database. This embodiment adopts a multi-path recall scheme, which requires the integration of traditional keyword retrieval and vector retrieval. Since Elasticsearch supports both BM25 (Best Match 25) algorithm retrieval (BM25 is an improved algorithm based on TF and IDF, which considers term frequency and document frequency and introduces some adjustment parameters to improve the quality of search results) and vector model retrieval, this embodiment uses Elasticsearch as the vector database.
[0063] In a preferred embodiment of this invention, the text segmentation in step S11 is specifically divided into line-by-line segmentation and automatic segmentation.
[0064] Line-by-line segmentation involves manually organizing multiple documents and then segmenting the text according to the manually organized paragraphs.
[0065] Automatic segmentation uses a semantic segmentation model to split the text. The available semantic segmentation models can be the nlp_bert_document-segmentation_chinese-base model or the LLM model. At the same time, it combines line-by-line segmentation to prioritize the integrity of small paragraphs. For large paragraphs, it segments them according to semantics to ensure the semantic integrity of the text.
[0066] In a preferred embodiment of this invention, the document context association information saved after text segmentation in step S11 includes: record ID, document ID, document name, and document sequence number. Other information in the document context association information, such as the main text and time, constitutes the primary information of the document and is used for intelligent question answering.
[0067] In a preferred embodiment of this example, the step S3 of finding the context document record of the document using the context retrieval tool specifically involves: retrieving the associated document record based on the document ID and document sequence number in the document context association information of the current document record, ensuring that the retrieved document records come from the same document and are adjacent in order.
[0068] As a preferred embodiment of this example, see [link / reference]. Figure 3 As shown, step S2 specifically includes:
[0069] S21: Perform hypothetical question vector retrieval, text summary vector retrieval, text content block vector retrieval, and ES full-text retrieval based on the user's input question.
[0070] S22: Perform vector retrieval in the vector database using user questions and hypothetical questions. This retrieval requires a similarity score of 0.90 and sets the recall top 1 document.
[0071] S23: Perform vector retrieval in the vector database using user questions and text summary information. This retrieval requires a similarity score of 0.80 and sets the recall of the top 3 documents.
[0072] S24: Perform vector retrieval in the vector database using user questions and text content block word vectors. This retrieval requires a similarity score of 0.80 and sets the top 3 documents to be recalled.
[0073] S25: Perform ES full-text search on the text content field using user questions. This search requires a similarity score of 0.80 and sets the top 3 documents to be recalled.
[0074] The specific formula for calculating the similarity score is as follows:
[0075]
[0076] In the formula, Cosine Similarity is the similarity score, A and B are two vectors, · is the dot product, ||A|| is the modulus of vector A, and ||B|| is the modulus of vector B. The similarity score ranges from [-1, 1], where a similarity score of 1 indicates that the two vectors are completely identical, a similarity score of -1 indicates that the two vectors are completely opposite, and a similarity score of 0 indicates that the two vectors are unrelated.
[0077] S26: Merge the top 10 document lists retrieved by the four-way retrieval in steps S22, S23, S24, and S25, and use a re-ranking model to re-rank the documents. The re-ranking model can call bge-reranker-base to finally obtain the sorted document list.
[0078] Example 2
[0079] Accordingly, see Figure 4 As shown, this embodiment provides an intelligent question-answering system for the power industry based on LLM, including a local construction module, a multi-channel recall module, a retrieval merging module, and a question answering module.
[0080] The local construction module is used to read and parse various documents in the power field to obtain text content, segment the text to obtain uniform text content blocks, construct and save the contextual association information of the document, use a vector model to vectorize the text content blocks one by one to obtain high-dimensional word vectors, and save the text content blocks and word vectors to a vector database to build a local knowledge base. This module is used to implement the function of step S1 in embodiment one, and will not be described in detail here.
[0081] The multi-path recall module is used to perform multi-path recall and retrieval summary based on the user's input question, and to rearrange the retrieved documents. This module is used to implement the function of step S2 in Embodiment 1, and will not be described in detail here.
[0082] The retrieval and merging module is used to find the context document records of the document based on the context association information of the top 1 document obtained by the multi-way recall stage, and merge them into a complete document using a context retrieval tool. This module is used to implement the function of step S3 in embodiment one, and will not be described in detail here.
[0083] The question answering module is used to combine the merged complete document content and user questions with the Prompt input to the LLM model to answer questions. This module is used to implement the function of step S4 in Example 1, and will not be described again here.
[0084] Example 3
[0085] This embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements an LLM-based intelligent question-answering method for the power field as described in any embodiment of the present invention.
[0086] Example 4
[0087] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements an LLM-based intelligent question-answering method in the power field as described in any embodiment of the present invention.
[0088] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0089] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0090] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0091] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An LLM-based intelligent question-answering method in the field of electric power, characterized in that, Comprise the following steps: S1: by reading and analyzing various types of documents in the field of electric power to obtain text content, through text segmentation to obtain uniform text content block, build and save the context association information of the document, use vector model to vectorize the text content block one by one, get text word vector, save the text content block and text word vector to vector database to build local knowledge base; S2: according to the user input question, multi-channel recall and retrieval summary is carried out, and the retrieved document is rearranged; S3: according to the context association information of top1 document rearranged in the multi-channel recall stage, use context retriever to find the context document record of the document, and combine them into complete document; S4: combine the complete document content and user question Prompt input LLM model to answer the question; The step S1 is specifically: S11: text extraction and text segmentation are carried out on various types of documents in the field of electric power to obtain text content block, and the context association information of the text segmented document is saved; S12: the text content block after text segmentation and summary Prompt input LLM model are input into the LLM model to generate text summary information; S13: the text content block after text segmentation and hypothesis question generation Prompt input LLM model are input into the LLM model to generate hypothesis question information; S14: the text content block, text summary information and hypothesis question information in steps S11, S12 and S13 are vectorized by vector model; S15: the document context association information, text content block, text summary information, hypothesis question information, text content block word vector, text summary word vector and hypothesis question word vector generated in the above steps are stored in Elasticsearch vector database; The step S2 is specifically: S21: according to the user input question, hypothesis question vector retrieval, text summary vector retrieval, text content block vector retrieval and ES full text retrieval are carried out; S22: use the user question and hypothesis question information to carry out vector retrieval in the vector database, which requires that the similarity score reaches 0.90, and sets the top1 document to be recalled; S23: use the user question and text summary information to carry out vector retrieval in the vector database, which requires that the similarity score reaches 0.80, and sets the top3 document to be recalled; S24: use the user question and text content block to carry out vector retrieval in the vector database, which requires that the similarity score reaches 0.80, and sets the top3 document to be recalled; S25: use the user question to carry out ES full text retrieval on the text content field, which requires that the similarity score reaches 0.80, and sets the top3 document to be recalled; S26: combine the top10 document list recalled by four channel retrieval of steps S22, S23, S24 and S25, use the rearrangement model to rearrange the document, and finally get the sorted document list. 2.The LLM-based power domain intelligent question-answering method of claim 1, wherein, The text segmentation in step S11 is specifically divided into line segmentation and automatic segmentation; The line segmentation is to manually arrange multiple documents, and carry out text segmentation according to the way of manually arranging paragraphs; The automatic segmentation is to split the text using a semantic segmentation model, and meanwhile, a line segmentation mode is combined to preferentially ensure the integrity of small paragraphs and to split long paragraphs according to semantics to ensure the integrity of text semantics. 3.The LLM-based power domain intelligent question-answering method of claim 1, wherein, The document context association information saved after the text segmentation in the step S11 includes a record ID, a document ID, a document name and a document serial number.
4. The LLM-based intelligent question-answering method in the field of electricity according to claim 3, characterized in that, The step S3 specifically includes: according to the document ID and the document serial number in the document context association information of the provided current document record, searching for the document record associated therewith to ensure that the searched document record is from the same document and is sequentially adjacent.
5. An LLM-based intelligent question-answering system in the field of electric power, characterized by, The system is used to implement the LLM-based power field intelligent question answering method according to any one of claims 1 to 4, and includes a local construction module, a multi-path recall module, a retrieval merging module and a question answering module. The local construction module is used to obtain text content by reading and analyzing local documents, obtain uniform text content blocks through text segmentation, construct and save context association information of the documents, vectorize the text content blocks one by one using a vector model to obtain high-dimensional word vectors, save the text content blocks and the word vectors into a vector database to construct a local knowledge base, and the like. The multi-path recall module is used to perform multi-path recall and retrieval summary according to a user input question, and rearrange the searched documents. The retrieval merging module is used to find context document records of the top1 document obtained through rearrangement in the multi-path recall stage using a context retriever according to context association information of the top1 document, and merge the context document records into a complete document. The question answering module is used to combine the merged complete document content and the user question to input a Prompt into an LLM model for question answering.
6. An electronic device, comprising: The memory, the processor and the computer program stored on the memory and executable on the processor are characterized in that the processor implements the LLM-based power field intelligent question answering method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the LLM-based power field intelligent question answering method according to any one of claims 1 to 4.
Citation Information
Patent Citations
LLM-based question and answer enhancement method
CN117290485A
Question and answer processing method and device and question and answer processing model training method and device
CN116662495A
Generative large model document library question and answer method based on reasoning prompt
CN117251550A