Generation method for improving emergency knowledge question answering accuracy of large model

By building a professional knowledge base in the emergency industry and adopting a two-stage search strategy, the problem of insufficient accuracy of the emergency knowledge question-and-answer model is solved, and the high accuracy and professional answers of the big model on emergency knowledge issues are achieved.

CN119025643APending Publication Date: 2024-11-26DEEP BLUE PERCEPTION (HANGZHOU) IOT TECH CO LTD

Patent Information

Application Number
CN202411085754.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When answering emergency knowledge questions, the existing emergency knowledge question and answer models lack accuracy and rationality, due to data richness, model training quality and problem complexity, and it is difficult to judge the most appropriateness of the generated content.

Method used

Build an emergency industry professional knowledge base and adopt a two-stage search strategy, including a semantic similarity model and a Cross-Encoder model, to improve the hit rate and relevance of answers in the knowledge base and ensure the accuracy and professionalism of generated answers.

Benefits of technology

By building a professional knowledge base and a two-stage search strategy, the accuracy and efficiency of the big model's answers on emergency knowledge issues are significantly improved, and the generated answers are more accurate, professional and logical.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025643A_ABST
    Figure CN119025643A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of emergency knowledge question and answer model generation. According to the generation method for improving the accuracy of answering the emergency knowledge problem by the large model, the emergency industry professional knowledge base is constructed, and the recall rate is improved during retrieval, so that the understanding and answering accuracy of the model for the emergency industry related problems and answers is improved. According to the main thought of the method, firstly, different types of knowledge about the emergency industry direction are searched, and a knowledge base is constructed and stored according to different types of features; secondly, during retrieval, a two-stage retrieval strategy is adopted, and the hit rate of related answers in the knowledge base is increased. And finally, inputting the retrieved answers into the large model for reasoning and generation, thereby obtaining more accurate and professional answers. According to the invention, the construction strategy and the storage scheme of the professional knowledge base in the emergency industry are optimized; in addition, the invention provides a two-stage retrieval strategy capable of reordering based on a hybrid retrieval algorithm and a Cross-Encoder model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of emergency knowledge question-answering model generation, and specifically to a generation method for improving the accuracy of a large model in answering emergency knowledge questions. Background Art

[0002] In today's increasingly complex and changing social environment, various emergencies occur frequently, and the demand for emergency knowledge is growing. As a powerful information processing and generation tool, big models play an important role in responding to these emergencies. However, when big models deal with emergency knowledge problems, the accuracy of their answers is often restricted by many factors, such as the richness of data, the quality of model training, and the complexity of the problem itself. Therefore, improving the accuracy of big models in answering emergency knowledge questions has become an urgent problem to be solved.

[0003] The main development defect of the existing emergency knowledge question-and-answer model is that the current answers to emergency knowledge questions mainly rely on two methods: one is to obtain them through Internet search, but the accuracy and relevance of search results are often affected by multiple factors such as search engine algorithms and network environment; the other is to directly generate them using a trained large model, but large models often have "hallucination" problems, that is, the generated content appears reasonable and logical on the surface, but there are factual errors, which make the generated answers misleading.

[0004] CN114969355A discloses a method for constructing an ontology model of a dam break emergency plan. The method formalizes the text of the dam break emergency plan based on ontology theory, constructs a basic vocabulary terminology list for the dam break emergency plan and an ontology knowledge base between the basic vocabulary terms, uses the ontology description language OWL to define the rules within the ontology knowledge base, and selects the currently widely used ontology editing tool Protégé for modeling.

[0005] The above technical solution can standardize the relevant concepts in the dam break emergency plan, making the language of the emergency management plan unified. However, the solution still cannot guarantee the accuracy of the content generated by the emergency knowledge question-and-answer model;

[0006] CN118332076A discloses a dam emergency response rule question-answering recommendation system based on a large language model and a construction method thereof. The system encodes the emergency response document uploaded by the user and builds a corresponding knowledge base; performs an aggressive tendency test on the user input; performs emergency scenario recognition and question keyword extraction on the user input; matches the emergency response rules in the knowledge base according to the emergency scenario and question keywords; integrates the emergency response rule text into a prompt word template and outputs the result.

[0007] The above technical solution optimizes and improves the accuracy of the content generated by the emergency knowledge question and answer model to a certain extent by extracting keywords from emergency scenarios and matching them with the knowledge base. However, this solution cannot determine whether the generated content is the most appropriate answer. Therefore, there is still much room for improvement.

[0008] Therefore, in view of the shortcomings of the existing technology, there is an urgent need for a generation method to improve the accuracy of large models in answering emergency knowledge questions, so as to further improve the rationality and accuracy of large models in answering emergency knowledge questions. Summary of the invention

[0009] In order to solve the problems existing in the prior art, the present invention proposes a generation method for improving the accuracy of a large model in answering emergency knowledge questions; the present invention improves the model's understanding and accuracy of answering questions and answers related to the emergency industry by constructing a professional knowledge base for the emergency industry and improving the recall rate during retrieval. The main idea of ​​the present invention is to first search for different types of knowledge about the emergency industry direction, and construct and store the knowledge base according to different types of characteristics. Secondly, when searching, a two-stage retrieval strategy is adopted to improve the hit rate of relevant answers in the knowledge base. Finally, the retrieved answers are input into the large model for reasoning and generation, so as to obtain more accurate and professional answers.

[0010] In order to achieve the above object, the present invention proposes a generation method for improving the accuracy of a large model in answering emergency knowledge questions, comprising the following steps:

[0011] S1. Obtain information related to the emergency industry and perform pre-processing operations;

[0012] S2, constructing the information processed in step S1 into a professional knowledge base of the emergency industry; and classifying the information according to its type and characteristics, and parsing and storing different types of information;

[0013] S3, when receiving emergency knowledge questions, use the semantic similarity model and keyword search algorithm to filter out answer candidates related to the question from the knowledge base;

[0014] S4. Use the Cross-Encoder model to re-rank candidate answers and exclude answers with low relevance or low quality;

[0015] S5. Input the retrieved answers and questions into the big model, which will integrate and generate the final answer.

[0016] The present invention proposes a new generation method for improving the accuracy of large models in answering emergency knowledge questions, aiming to optimize the construction method of the emergency safety knowledge base and improve the retrieval method of questions to be answered in the knowledge base, so as to improve the accuracy and efficiency of the large model in answering emergency knowledge questions.

[0017] The present invention not only optimizes the construction strategy and storage scheme of the professional knowledge base of the emergency industry, but also proposes a two-stage retrieval strategy that can be re-ranked based on a hybrid retrieval algorithm and a Cross-Encoder model.

[0018] Preferably, the specific method for obtaining information related to the emergency industry and performing preprocessing operations in step S1 is: collecting text content related to the emergency industry from multiple channels, including but not limited to laws and regulations, accident cases, professional books, safety examination materials, and daily questions and answers; then, cleaning the text information data of the above text content, removing irrelevant information, and retaining only content closely related to the emergency industry.

[0019] Preferably, the method for constructing the emergency industry professional knowledge base in step S2 is:

[0020] S2.1. Classify the cleaned text information data, for example, by type: laws and regulations, accident cases, examination materials, questions and answers; then build a structured professional knowledge base; and parse and store the classified data in a structured form to facilitate subsequent retrieval;

[0021] S2.2. The key value text and value value text in the professional knowledge base are then generated into vectors E_k and E_v through the vector embedding model and stored in the Milvus vector database; the key value text and value value text in the professional knowledge base are stored in the ElasticSearch search engine according to two fields after word segmentation.

[0022] Preferably, in step S3, candidate answers related to the question are screened out from the knowledge base by hybrid retrieval; the specific steps are as follows:

[0023] S3.1, semantic embedding conversion: the question Q input by the user is transformed into a vector E_q with semantic information through the embedded vector model;

[0024] S3.2, semantic similarity retrieval: use E_q to perform similarity retrieval in the Milvus vector database, find the most semantically relevant TopK1 text segments {key, value} to form the text paragraph set P1. The general similarity value can be obtained using the cosine similarity calculation formula;

[0025] S3.3, Keyword search: Use the ElasticSearch search engine to perform keyword matching search on the user input question Q, and find the TopK2 text fragments {key, value} with the highest scores to form the text paragraph set P2; the keyword score is implemented using the BM25 algorithm, which is a sorting algorithm widely used in the field of information retrieval; the BM25 algorithm generates a score for each document based on the frequency of occurrence of the query word in the document and the length of the document, thereby realizing the sorting of the search results;

[0026] S3.4, result merging: De-duplicate and merge the two text paragraphs P1 and P2; first, use the de-duplicate algorithm to deduplicate the overlapping text paragraphs in P1 and P2, and then merge the paragraph sets on both sides into a set P_mix to form candidate answer text paragraphs.

[0027] Preferably, the retrieved knowledge is reordered in step S4: through semantic similarity and keyword retrieval, a set of text fragments P_mix similar to question Q can be searched, but it does not necessarily contain the answer to question Q, that is, the correlation is not very high. For example, "What are the basic methods and measures for fire prevention?" and "What are the basic methods and measures for fire extinguishing?" have very high similarity in terms of semantics and keywords, but there is no causal relationship between the two, and the correlation is low. Therefore, it is necessary to build a correlation model to reorder the candidate answers.

[0028] The method of reordering the candidate answers using the Cross-Encoder model in step S4 is as follows:

[0029] S4.1. Construct a Cross-Encoder relevance model. The Cross-Encoder model generally adopts the Transformer structure, a deep learning model architecture based on the self-attention mechanism, which can effectively solve various problems in natural language processing (NLP). Through the Cross-Encoder, two text fragments (user question Q and candidate answer A) are merged together and input into the model, and then interacted through self-attention to determine whether the candidate answer A is the content of the user question Q. The output is the relevance score of the two text fragments. The score value is in the range of 0-1, where 0 indicates low relevance and 1 indicates high relevance.

[0030] S4.2. Training the Cross-Encoder model: Collect a large number of question-answer pairs [[Q_1,A_1],...[Q_n,A_n]], assign the pair [Q_i,A_i] that belongs to the same question and answer to the positive examples, and then randomly assign some pairs that do not belong to the same question and answer, such as [Q_j,A_k],[A_j,A_k],[Q_j,Q_k] to the negative examples;

[0031] S4.3. Apply the Cross-Encoder model: The Cross-Encoder model receives the user's question Q and multiple candidate answers P_mix, generates multiple samples by splicing the question and the answer, and inputs them into the model. It calculates the relevance score of each answer to the question, sorts them according to the score, and returns the K text fragments with the highest scores P_final.

[0032] Preferably, in the step S4.2, a binary cross entropy loss function is used to optimize the model parameters during the model training process; by minimizing the loss function, the model can gradually learn how to accurately determine whether the answer A is related to the question Q, and ultimately it is expected that the sample model belonging to the positive example can output 1, while the sample model of the negative example outputs 0.

[0033] Preferably, the specific method of integrating and generating the final answer through the large model in step S5 is: the candidate answer P_final and the question after reordering by the Cross-Encoder model are spliced ​​and input into the large model through the prompt word template, and the large model integrates and infers to generate the final answer. Among them, the prompt word template is as follows:

[0034] “““

[0035] Reference Information:

[0036] {P_final}

[0037] My questions or instructions:

[0038] {Q}

[0039] Please answer my questions or respond to my instructions based on the references above. Be faithful to the original text and do not make up anything. If the given references alone are not sufficient to answer my questions, please simply reply "Sorry, I don't know".

[0040] Your reply:

[0041] ”””

[0042] The large model generated by this application, with its powerful language understanding and generation capabilities, can combine the context and background knowledge of the question to generate accurate, professional and logical answers.

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

[0044] The present invention builds a specialized emergency industry professional knowledge base to ensure that the answers are based on the professional knowledge and latest information of the emergency industry, thereby greatly improving the accuracy and professionalism of the answers. At the same time, the two-stage retrieval strategy, including preliminary screening and Cross-Encoder model reordering, can effectively improve the hit rate of retrieving relevant answers from the knowledge base, ensuring that users obtain answers directly related to the questions. In addition, by inputting the retrieved answers and questions into the large model for reasoning, more accurate, comprehensive and logical answers can be generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A flow chart of a method for improving the accuracy of a large model in answering emergency knowledge questions according to the present invention;

[0047] Figure 2 A schematic diagram of the working principle of a generation method for improving the accuracy of a large model in answering emergency knowledge questions according to the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0049] Embodiment 1

[0050] like Figure 1 As shown, this embodiment proposes a generation method for improving the accuracy of a large model in answering emergency knowledge questions, comprising the following steps:

[0051] S1. Obtain information related to the emergency industry, including laws and regulations, accident cases, professional books, safety examinations, daily questions and answers, etc., and perform pre-processing operations such as cleaning the document data;

[0052] S2, constructing the information processed in step S1 into a professional knowledge base of the emergency industry; and classifying the information according to its type and characteristics, and parsing and storing different types of information;

[0053] S3, when receiving emergency knowledge questions, use the semantic similarity model and keyword search algorithm to filter out answer candidates related to the question from the knowledge base;

[0054] S4. Use the Cross-Encoder model to re-rank candidate answers and exclude answers with low relevance or low quality;

[0055] S5. Input the retrieved answers and questions into the big model, which will integrate and generate the final answer.

[0056] This embodiment proposes a new generation method for improving the accuracy of large models in answering emergency knowledge questions, aiming to optimize the construction method of the emergency safety knowledge base and improve the retrieval method of questions to be answered in the knowledge base, so as to improve the accuracy and efficiency of the large model in answering emergency knowledge questions.

[0057] This embodiment not only optimizes the construction strategy and storage scheme of the emergency industry professional knowledge base, but also proposes a two-stage retrieval strategy that can be re-ranked based on a hybrid retrieval algorithm and a Cross-Encoder model.

[0058] Embodiment 2

[0059] like Figure 1-2 As shown, this embodiment proposes a generation method for improving the accuracy of a large model in answering emergency knowledge questions, based on the technical solution and technical principle mentioned in the first embodiment, and also includes the following steps:

[0060] Step S1: Methods for acquiring relevant knowledge of the emergency industry:

[0061] Collect information related to the emergency industry from a variety of channels, including but not limited to laws and regulations, accident cases, professional books, safety examination materials, and daily questions and answers. Then, clean these document data, remove irrelevant information, and retain content closely related to the emergency industry.

[0062] Step S2: Method for building a professional knowledge base for the emergency industry:

[0063] S2.1. Analyze and classify the cleaned data, and build a structured knowledge base based on the type and characteristics of knowledge, such as laws and regulations, accident cases, examination materials, etc.; this knowledge is stored in a structured form to facilitate subsequent retrieval.

[0064] For example:

[0065] Laws and regulations: Each law or regulation is formed into a json file. In each piece of data, the key is the title and the value is the content.

[0066] S2.2. Store the structured knowledge base into the database:

[0067] The key value text and value value text in the knowledge base are generated into vectors E_k and E_v through the vector embedding model and stored in the Milvus vector database;

[0068] The key value text and value value text in the knowledge base are stored in the ElasticSearch search engine in two fields after word segmentation.

[0069] Step S3: Knowledge base search method based on hybrid retrieval method:

[0070] S3.1, semantic embedding conversion: the question Q input by the user is transformed into a vector E_q with semantic information through the embedded vector model;

[0071] S3.2, semantic similarity retrieval: use E_q to perform similarity retrieval in the vector database, find the most semantically relevant TopK1 text segments {key, value} to form the text paragraph set P1. The general similarity value can be obtained using the cosine similarity calculation formula;

[0072] S3.3. Keyword search: Use the ElasticSearch search engine to perform keyword matching search on the user input question Q, and find the TopK2 text fragments {key, value} with the highest scores to form the text paragraph set P2; the keyword score is implemented using the BM25 algorithm, a sorting algorithm widely used in the field of information retrieval; the BM25 algorithm generates a score for each document based on the frequency of occurrence of the query term in the document and the length of the document, thereby realizing the sorting of the search results.

[0073] S3.4, result merging: De-duplicate and merge the two text paragraphs P1 and P2. First, use the de-duplicate algorithm to deduplicate the overlapping text paragraphs in P1 and P2, and then merge the paragraph sets on both sides into a set P_mix to form the candidate answer text paragraphs.

[0074] Step S4: Method for re-ranking the retrieved knowledge:

[0075] Through semantic similarity and keyword retrieval, we can search for a set of text fragments P_mix that are similar to question Q, but they do not necessarily contain the answer to question Q, that is, the correlation is not very high. For example, "What are the basic methods and measures for fire prevention?" and "What are the basic methods and measures for fire extinguishing?" have very high similarity in terms of semantics and keywords, but there is no causal relationship between the two, and the correlation is low. Therefore, it is necessary to build a correlation model to reorder the candidate answers.

[0076] S4.1. Constructing a Cross-Encoder relevance model: The Cross-Encoder model generally adopts the Transformer structure, a deep learning model architecture based on the self-attention mechanism, which can effectively solve various problems in natural language processing (NLP). The Cross-Encoder combines two text fragments (user question Q and candidate answer A) and inputs them into the model. Through self-attention, it interacts with the answer A to determine whether the answer A is what the question Q is concerned about. The output is the relevance score of the two text fragments. The score value is in the range of 0-1, where 0 indicates low relevance and 1 indicates high relevance.

[0077] S4.2. Training the Cross-Encoder model: Collect a large number of question-answer pairs [[Q_1,A_1],...[Q_n,A_n]], and assign the combination [Q_i,A_i] that belongs to the same question and answer to the positive example, and then randomly combine some combinations that do not belong to the same question and answer, such as [Q_j,A_k],[A_j,A_k],[Q_j,Q_k] to the negative example. During the model training process, the binary cross entropy loss function is used to optimize the model parameters; by minimizing the loss function, the model can gradually learn how to accurately judge whether the answer A is related to the question Q, and ultimately expect the sample model to output 1 for the positive example, and 0 for the negative example;

[0078] S4.3. Apply the Cross-Encoder model: Receive the user's question Q and multiple candidate answers P_mix through the Cross-Encoder model, generate multiple samples by splicing the question and the answer and input them into the model, calculate the relevance score of each answer to the question, sort them according to the score, and return the K text fragments with the highest scores P_final.

[0079] Step S5: Method for integrating the large model to generate output results:

[0080] The candidate answers P_final and the question after reordering by the Cross-Encoder model are spliced ​​and input into the big model through the prompt word template, and the big model integrates and infers to generate the final answer. The prompt word template is as follows:

[0081] """

[0082] Reference Information:

[0083] {P_final}

[0084] My questions or instructions:

[0085] {Q}

[0086] Please answer my questions or respond to my instructions based on the references above. Be faithful to the original text and do not make up anything. If the given references alone are not sufficient to answer my questions, please simply reply "Sorry, I don't know".

[0087] Your reply:

[0088] """

[0089] The large model of this embodiment, with its powerful language understanding and generation capabilities, can combine the context and background knowledge of the question to generate accurate, professional and logical answers.

[0090] Of course, the above description is only a specific embodiment of the present invention and is not intended to limit the scope of implementation of the present invention. All equivalent changes or modifications made according to the structure, characteristics and principles described in the patent application scope of the present invention should be included in the patent application scope of the present invention.

[0091] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for improving the accuracy of a large model in answering emergency knowledge questions, characterized in that: The steps include: S1. Obtain information related to the emergency industry and perform pre-processing operations; S2, constructing the information processed in step S1 into a professional knowledge base of the emergency industry; and classifying the information according to its type and characteristics, and parsing and storing different types of information; S3, when receiving emergency knowledge questions, use the semantic similarity model and keyword search algorithm to filter out answer candidates related to the question from the knowledge base; S4. Use the Cross-Encoder model to re-rank candidate answers and exclude answers with low relevance or low quality; S5. Input the retrieved answers and questions into the big model, which will integrate and generate the final answer.

2. A method for improving the accuracy of a large model in answering emergency knowledge questions according to claim 1, characterized in that: The specific method for obtaining the information related to the emergency industry and performing preprocessing operations in step S1 is: collecting text content related to the emergency industry from multiple channels, including laws and regulations, accident cases, professional books, safety examination materials and daily questions and answers; then, cleaning the text information data of the above text content, removing irrelevant information, and retaining only the content closely related to the emergency industry.

3. A method for improving the accuracy of a large model in answering emergency knowledge questions according to claim 2, characterized in that: The method for constructing the emergency industry professional knowledge base in step S2 is: S2.

1. Classify the cleaned text information data, for example, by type: laws and regulations, accident cases, examination materials, questions and answers; then build a structured professional knowledge base; and parse and store the classified data in a structured form to facilitate subsequent retrieval; S2.

2. The key value text and value value text in the professional knowledge base are then generated into vectors E_k and E_v through the vector embedding model and stored in the Milvus vector database; the key value text and value value text in the professional knowledge base are stored in the ElasticSearch search engine according to two fields after word segmentation.

4. A method for improving the accuracy of a large model in answering emergency knowledge questions according to claim 3, characterized in that: In step S3, candidate answers related to the question are screened out from the knowledge base by hybrid retrieval; The specific steps are as follows: S3.1, semantic embedding conversion: the question Q input by the user is transformed into a vector E_q with semantic information through the embedded vector model; S3.2, semantic similarity retrieval: use E_q to perform similarity retrieval in the Milvus vector database, find the most semantically relevant TopK1 text segments {key, value} to form the text paragraph set P1. The general similarity value can be obtained using the cosine similarity calculation formula; S3.3, Keyword search: Use the ElasticSearch search engine to perform keyword matching search on the user input question Q, and find the topK2 text fragments {key, value} with the highest scores to form the text paragraph set P2; the keyword score is implemented using the BM25 algorithm; the BM25 algorithm generates a score for each document based on the frequency of occurrence of the query word in the document and the length of the document, thereby realizing the sorting of the search results; S3.4, result merging: De-duplicate and merge the two text paragraphs P1 and P2; first, use the de-duplicate algorithm to deduplicate the overlapping text paragraphs in P1 and P2, and then merge the paragraph sets on both sides into a set P_mix to form candidate answer text paragraphs.

5. A method for improving the accuracy of a large model in answering emergency knowledge questions according to claim 4, characterized in that: The method for reordering the candidate answers using the Cross-Encoder model in step S4 is: S4.

1. Construct Cross-Encoder relevance model: The two text segments "user question Q" and "candidate answer A" are merged together and input into the model through Cross-Encoder, and then interacted through self-attention to determine whether the candidate answer A is the content of user question Q. The output is the relevance score of the two text segments. The score value is in the range of 0-1, where 0 indicates low relevance and 1 indicates high relevance. S4.

2. Training the Cross-Encoder model: Collect a large number of question-answer pairs [[Q_1,A_1],...[Q_n,A_n]], assign the pair [Q_i,A_i] that belongs to the same question and answer to the positive examples, and then randomly assign some pairs that do not belong to the same question and answer, such as [Q_j,A_k],[A_j,A_k],[Q_j,Q_k] to the negative examples; S4.

3. Apply the Cross-Encoder model: The Cross-Encoder model receives the user's question Q and multiple candidate answers P_mix, generates multiple samples by splicing the question and the answer, and inputs them into the model. It calculates the relevance score of each answer to the question, sorts them according to the score, and returns the K text fragments with the highest scores P_final.

6. A method for improving the accuracy of large models in answering emergency knowledge questions according to claim 5, characterized in that: In the step S4.2, during the model training process, a binary cross entropy loss function is used to optimize the model parameters. By minimizing the loss function, the model can gradually learn how to accurately determine whether the answer A is related to the question Q. Ultimately, it is expected that the sample model for the positive example can output 1, while the sample model for the negative example can output 0.

7. A method for improving the accuracy of large models in answering emergency knowledge questions according to claim 5, characterized in that: The specific method of integrating and generating the final answer through the large model in step S5 is: the candidate answer P_final and the question reordered by the Cross-Encoder model are spliced ​​into the large model through the prompt word template, and the large model integrates and infers to generate the final answer.

Citation Information

Patent Citations

  • Online intelligent question answering method and device based on instruction fine tuning and retrieval enhancement generation

    CN117688163A

  • Search question-answering system and method based on large model and electronic equipment

    CN117708274A

Cited By

  • Chaotic engineering atomic fault library question-answering method and system based on retrieval enhancement generation

    CN119227811A

  • Knowledge base construction method, question and answer method, computing device and computer readable storage medium

    CN119357333A

  • Intelligent question answering method, system and equipment based on large model and medium

    CN119377371A

  • Classification and question and answer large model joint parameter adjustment method and device

    CN119621912A

  • Psychological support question and answer generation method and system based on two-stage retrieval enhanced LLM

    CN119760102A