Retrieval question and answer method and device based on large model, storage medium and equipment

By splitting the thinking chain and recalling the target query problem in multiple dimensions, generating and verifying the search results, the problem of low accuracy of search results in the existing technology is solved, and higher accuracy and correlation of search results are achieved.

CN119621890APending Publication Date: 2025-03-14CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202411668376.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the existing search question and answer schemes, there is a lack of key information, especially when focusing on summary query, the problem of irrelevant search recall content will occur, resulting in low accuracy of the search results.

Method used

By splitting the thinking chain of the target query problem, we obtain the results of multiple sub-problems splitting, and determine the model prompt information based on the results of these sub-problems splitting. Then, a multi-dimensional search recall is performed in the preset index knowledge base, the context content is generated to generate text, and the input content is generated to generate preliminary search results in the big model, and fact verification is performed to obtain the target search results.

Benefits of technology

It improves the accuracy of the target search results, avoids factual errors generated by large models, and ensures the relevance and accuracy of the search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621890A_ABST
    Figure CN119621890A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a retrieval question and answer method and device based on a large model, a storage medium and equipment, and relates to the technical field of natural language process.The method comprises the steps that thinking chain splitting is conducted on a target query question, multiple sub-question splitting results are obtained, and model prompt information is determined according to the multiple sub-question splitting results; performing retrieval recall in a preset index knowledge base on the basis of the multiple sub-question splitting results to obtain multiple retrieval results of different dimensions; generating a context content generation text according to the retrieval results of the plurality of different dimensions and the model prompt information; and inputting the context content generation text into a preset content generation large model to obtain a preliminary retrieval result, and performing fact verification on the preliminary retrieval result to obtain a target retrieval result. The accuracy of the target retrieval result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the existing retrieval question and answer scheme, the classic method of segmentation, indexing, retrieval and recall can be used to provide the context of a large model to achieve question and answer; however, in this scheme, there is a lack of key information, especially when focusing on summary queries, there will be problems with irrelevant retrieval and recall content, which will result in a low accuracy rate of the retrieval results.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of the present disclosure is to provide a large-model-based retrieval question-answering method, a large-model-based retrieval question-answering device, a computer-readable storage medium, and an electronic device, thereby at least to a certain extent overcoming the problem of low accuracy of retrieval results caused by the limitations and defects of related technologies.

[0005] According to one aspect of the present disclosure, a retrieval question answering method based on a large model is provided, comprising:

[0006] Splitting the target query question into a thought chain to obtain multiple sub-question splitting results, and determining model prompt information according to the multiple sub-question splitting results;

[0007] Based on the split results of the multiple sub-questions, a search is performed in a preset index knowledge base to obtain search results of multiple different dimensions;

[0008] Generate text based on the search results of the multiple different dimensions and the model prompt information;

[0009] The context content generation text is input into a preset content generation macro model to obtain a preliminary search result, and the preliminary search result is fact-checked to obtain a target search result.

[0010] In an exemplary embodiment of the present disclosure, the target query question is split into a thought chain to obtain multiple sub-question splitting results, including:

[0011] In response to a user input operation on the question-answer search display interface, determining an original search term;

[0012] Rewriting the original search term based on a preset keyword rewriting model to obtain the target query question; wherein the preset keyword rewriting model includes a large language model with a first preset scale and / or a model generated based on a preset rewriting strategy;

[0013] Based on the target query problem, determine to execute a first task execution model corresponding to the thought chain splitting task, and split the thought chain of the target query problem based on the first task execution model to obtain multiple sub-problem splitting results.

[0014] In an exemplary embodiment of the present disclosure, determining model prompt information according to the splitting results of the multiple sub-problems includes:

[0015] Determine a target query scenario corresponding to the target query problem according to the splitting results of the multiple sub-questions, and determine a knowledge base name of the preset index knowledge base according to the target query scenario;

[0016] Determine the model memory parameters required to generate the model prompt information according to the target query scenario and the name of the knowledge base;

[0017] The model memory parameters are embedded into a large model with a second preset scale to obtain a prompt information generation model, and the multiple sub-problem splitting results are input into the prompt information generation model to obtain the model prompt information.

[0018] In an exemplary embodiment of the present disclosure, the preset index knowledge base includes at least one of a document tree / pseudo-graph knowledge base, a vector knowledge base, and a knowledge graph;

[0019] Among them, based on the split results of the multiple sub-questions, a search is performed in a preset index knowledge base to obtain search results of multiple different dimensions, including:

[0020] Based on the split results of the multiple sub-questions, a search is performed in the document tree / pseudo-graph knowledge base to obtain a search result of a first dimension; wherein the search result of the first dimension includes a document summary or a document keyword;

[0021] Searching in the vector knowledge base based on the splitting results of the multiple sub-questions to obtain search results of the second dimension; wherein the search results of the second dimension include text blocks;

[0022] Based on the split results of the multiple sub-questions, a search is performed in the knowledge graph to obtain a search result of the third dimension; the search result of the third dimension includes a triple consisting of a head entity, a tail entity, and an entity relationship between the head entity and the tail entity;

[0023] The retrieval results of the multiple different dimensions are generated according to the retrieval results of the first dimension, the retrieval results of the second dimension, and the retrieval results of the third dimension.

[0024] In an exemplary embodiment of the present disclosure, generating text based on the retrieval results of multiple different dimensions and the model prompt information includes:

[0025] Filtering the search results of the multiple different dimensions and the model prompt information based on a preset filtering condition to obtain a first filtering result and a second filtering result;

[0026] The first filtering result and the second filtering result are rearranged based on a preset information rearrangement model, and a context content generation text is generated according to the information rearrangement result.

[0027] In an exemplary embodiment of the present disclosure, the preset content generation macro model includes an embedding mapping layer, a coding layer, and a hybrid expert model layer;

[0028] The context content generation text is input into a preset content generation model to obtain preliminary search results, including:

[0029] Based on the embedding mapping layer, embedding mapping is performed on the text generated by the context content to obtain a context marker sequence, and based on the encoding layer, encoding is performed on the context marker sequence to obtain a context overall representation;

[0030] The context marker sequence and the overall context representation are predicted based on the hybrid expert model layer to obtain the preliminary retrieval result.

[0031] In an exemplary embodiment of the present disclosure, the hybrid expert model layer includes a gated network model and an expert neural network model;

[0032] The preliminary search result is obtained by predicting the context marker sequence and the overall context representation based on the hybrid expert model layer, including:

[0033] Determining a model weight of the expert neural network model based on the gating network model according to the contextual marker sequence, and determining a target neural network model required to perform a preliminary retrieval result generation task from the expert neural network according to the model weight;

[0034] The context marker sequence and the overall context representation are input into the target neural network model to obtain the preliminary retrieval result.

[0035] In an exemplary embodiment of the present disclosure, the contextual marker sequence and the overall context representation are input into the target neural network model to obtain the preliminary search result, including:

[0036] Inputting the context marker sequence and the context overall representation into the target neural network model to obtain a first output result;

[0037] The first output result is weightedly summed according to the model weight corresponding to the target neural network model to obtain the preliminary search result.

[0038] In an exemplary embodiment of the present disclosure, fact checking is performed on the preliminary search results to obtain target search results, including:

[0039] Performing fact verification on the preliminary search results based on a preset fact knowledge graph to obtain a first fact verification result, and filtering the preliminary search results according to the first fact verification result to obtain the target search result; and / or

[0040] The preliminary search results are fact-checked based on preset expert knowledge resources to obtain a second fact-checked result, and the preliminary search results are filtered according to the second fact-checked result to obtain the target search result.

[0041] According to one aspect of the present disclosure, a retrieval question-answering device based on a large model is provided, comprising:

[0042] A model prompt information generation module is used to split the target query question into a thought chain, obtain multiple sub-question splitting results, and determine the model prompt information according to the multiple sub-question splitting results;

[0043] A retrieval and recall module, used to perform retrieval and recall in a preset index knowledge base based on the split results of the multiple sub-questions, and obtain retrieval results of multiple different dimensions;

[0044] A context text generation module, used to generate context content generation text according to the retrieval results of the multiple different dimensions and the model prompt information;

[0045] The retrieval result generation module is used to input the context content generation text into a preset content generation model to obtain preliminary retrieval results, and to perform fact verification on the preliminary retrieval results to obtain target retrieval results.

[0046] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements any one of the above-mentioned large model-based retrieval question-answering methods.

[0047] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0048] Processor; and

[0049] A memory, configured to store executable instructions of the processor;

[0050] Wherein, the processor is configured to execute any one of the above-mentioned large model-based retrieval question and answer methods by executing the executable instructions.

[0051] The disclosed embodiment provides a retrieval question-answering method based on a large model. On the one hand, a target query question is split into a thought chain to obtain multiple sub-question splitting results, and model prompt information is determined according to the multiple sub-question splitting results; then, based on the multiple sub-question splitting results, a search and recall is performed in a preset index knowledge base to obtain multiple retrieval results of different dimensions; then, a context content generation text is generated according to the retrieval results of multiple different dimensions and the model prompt information; finally, the context content generation text is input into a preset content generation large model to obtain a preliminary retrieval result, and the preliminary retrieval result is fact-checked to obtain a target retrieval result, which solves the problem in the prior art that irrelevant content will be retrieved and recalled, resulting in a low accuracy rate of the obtained retrieval result, and improves the accuracy rate of the target retrieval result; on the other hand, since the preliminary retrieval result can be fact-checked to obtain the target retrieval result, the problem of factual errors generated by the large model can be avoided.

[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0054] Figure 1 A flowchart of a large model-based retrieval question-answering method according to an exemplary embodiment of the present disclosure is schematically shown.

[0055] Figure 2 A schematic diagram shows an example structure of a retrieval enhancement generation model for implementing a retrieval question-answering method according to an example embodiment of the present disclosure.

[0056] Figure 3 A diagram schematically shows an example of a model structure of a content generation model according to an example embodiment of the present disclosure.

[0057] Figure 4 A diagram schematically shows an example structure of a hybrid expert model in a content generation model according to an example embodiment of the present disclosure.

[0058] Figure 5A scene example diagram of a target query question obtained according to an example embodiment of the present disclosure is schematically shown.

[0059] Figure 6 A scene example diagram schematically shows a sub-problem splitting result obtained according to an exemplary embodiment of the present disclosure.

[0060] Figure 7 The following is a flowchart schematically showing a process of generating a preliminary search result according to an exemplary embodiment of the present disclosure.

[0061] Figure 8 A scene example diagram schematically illustrates a process of generating a preliminary search result according to an example embodiment of the present disclosure.

[0062] Fig. 9 A block diagram of a large model-based retrieval question-answering device according to an exemplary embodiment of the present disclosure is schematically shown.

[0063] Fig.10 An electronic device for implementing a large model-based retrieval question-answering method according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0064] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0065] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0066] At present, the retrieval-enhanced question-answering method based on a large model can be implemented in the following two ways: one implementation method is: first, the query question text is converted into a target query question, and the key prompt words of the target query question are extracted; second, based on the document retrieval enhancement model, a set of documents to be matched is retrieved from the knowledge base according to the target query question, and the target document is obtained based on the relevance of each document to be matched with the target query question; then, the target document is matched based on the key prompt words to obtain the target text fragment, and the target text fragment is sorted to obtain the sorted text fragment sequence; finally, the target query question and the sorted text fragment sequence are input as an input set into the text generation enhancement model to obtain the answer text output by the text generation enhancement model. Another implementation method is: first, entities, relations and attributes are extracted from medical literature using a large language model to construct a medical knowledge graph; second, relevant medical entities are identified by analyzing user queries, and the relations between entities are extracted; then, entity-related information is retrieved from the medical knowledge graph based on the entity recognition results, and a structured query is generated; finally, accurate and comprehensive answers are generated through a large language model in combination with the retrieved information and user queries.

[0067] However, the above scheme has the following defects: on the one hand, in the first implementation method, it adopts the classic method of segmentation, indexing and then retrieval and recall to provide the context of the large model to realize question and answer; however, in this scheme, there is not only the problem of a single retrieval method, but also the lack of key information, especially when focusing on summary queries, there will be problems with irrelevant retrieval and recall content, that is, the accuracy of the obtained retrieval results is low; on the other hand, in the second implementation method, since it adopts the method of establishing a knowledge graph to realize retrieval and recall, this part requires a large cost in terms of graph construction, and the accuracy and completeness of the knowledge graph will greatly affect the results of retrieval and recall, thereby affecting the accuracy and relevance of the results generated by the large model.

[0068] Based on this, this exemplary embodiment first provides a retrieval question-answering method based on a large model, which can be run on a terminal device, a server, a server cluster or a cloud server, etc. Of course, those skilled in the art can also run the method disclosed in this disclosure on other platforms as required, and this exemplary embodiment does not specifically limit this. Specifically, refer to Figure 1 As shown, the large model-based retrieval question answering method may include the following steps:

[0069] Step S110: splitting the target query question into thought chains to obtain multiple sub-question splitting results, and determining model prompt information according to the multiple sub-question splitting results;

[0070] Step S120: Based on the split results of the multiple sub-questions, a search is performed in a preset index knowledge base to obtain search results of multiple different dimensions;

[0071] Step S130. Generate text based on the search results of the multiple different dimensions and the model prompt information to generate context content;

[0072] Step S140: Input the context content generation text into a preset content generation model to obtain a preliminary search result, and perform fact verification on the preliminary search result to obtain a target search result.

[0073] In the above-mentioned retrieval question and answer method based on the big model, on the one hand, by splitting the thought chain of the target query question, multiple sub-question splitting results are obtained, and the model prompt information is determined according to the multiple sub-question splitting results; then, based on the multiple sub-question splitting results, retrieval and recall are performed in the preset index knowledge base to obtain retrieval results of multiple different dimensions; then, the context content generation text is generated according to the retrieval results of multiple different dimensions and the model prompt information; finally, the context content generation text is input into the preset content generation big model to obtain preliminary retrieval results, and the preliminary retrieval results are fact-checked to obtain the target retrieval results, which solves the problem in the prior art that the accuracy of the obtained retrieval results is low due to the retrieval of irrelevant content, and improves the accuracy of the target retrieval results; on the other hand, since the preliminary retrieval results can be fact-checked to obtain the target retrieval results, the problem of factual errors generated by the big model can be avoided.

[0074] Hereinafter, the large model-based retrieval question-answering method described in the exemplary embodiment of the present disclosure will be further explained and illustrated in conjunction with the accompanying drawings.

[0075] First, the terms involved in the exemplary embodiments of the present disclosure are explained.

[0076] (1) Knowledge Graph: Knowledge Graph (KG) is a semantic network structure used to represent entities and the relationships between entities. In practical applications, a graph can be constructed through nodes (i.e. entities or concepts) and edges (i.e. relationships between entities) to construct a graph-based knowledge representation method, which can intuitively and systematically display complex knowledge systems. Knowledge graphs can be widely used in different technical fields such as natural language processing scenarios, information retrieval scenarios, and recommendation system scenarios. They can help machines understand semantics and perform effective reasoning and query in large-scale data.

[0077] (2) Retrieval-Augmented Generation Model: The Retrieval-Augmented Generation Model (RAG) is a framework in natural language processing that can combine information retrieval with generative models to enhance the context-awareness of generative models. In practical applications, the working principle of the enhanced generation model is as follows: first, relevant documents or knowledge fragments are retrieved, and the retrieved information is used as the input of the generative model to generate more accurate and context-relevant text or answers. This method improves the knowledge breadth of the model, especially in tasks that require external knowledge or the latest information. At the same time, RAG combines the dual functions of retrieval and generation, making it more intelligent and flexible in tasks such as question-answering systems, text generation, and dialogue systems.

[0078] Large Model: Large Model (LM) usually refers to a machine learning model with extremely large parameter scale based on deep learning; for example, in the field of natural language processing, large models can include but are not limited to GPT or BERT; in the process of actual application, large models have powerful pattern recognition, language generation and understanding capabilities through training on massive data; and they are called large models because their parameter volume often reaches billions or even trillions of levels, which can capture complex data distribution and rich language features; further, the development of large models depends on large-scale computing resources and data sets, and has strong generalization capabilities, and has shown performance that exceeds previous models in tasks such as translation, dialogue, and text generation.

[0079] In an exemplary embodiment, the retrieval enhancement generation model described herein is implemented based on a large model. Figure 2 As shown, the retrieval enhancement generation model may include a question query rewriting layer 210, a thought chain question decomposition layer 220, a prompt information generation layer 230, a multi-path retrieval recall layer 240, a content generation model 250, and a fact verification layer 260. Among them:

[0080] ① The query rewriting layer can include two parts: query transformation and query routing. Among them, query routing can introduce agent intelligent bodies to make judgments on queries and determine which agent intelligent body or model will implement the judgment processing. Query transformation is to rewrite the original query problem input by the user. Through rewriting, the semantic space of the query problem input by the user can be aligned with the semantic space of the knowledge base to be retrieved.

[0081] ② The thinking chain problem decomposition layer can further decompose the problem after the query is rewritten; specifically, since a question / query, especially a summary question / query, actually contains multiple steps, if the original question / query is directly input into the large model, due to the limited reasoning ability of the large model, incorrect results may occur. Therefore, it is necessary to use the thinking chain problem decomposition layer to directly decompose the original question / query Q into multiple simple sub-questions / sub-queries Q 1 , Q 2 ,…,Q k , and process each simple sub-problem separately to get the result.

[0082] ③The prompt information generation layer can also be called the memory information layer; specifically, in the memory information layer, a small large model A (that is, a large model with a preset scale) with a small parameter amount of less than 3B can be introduced, and then for the original web page and document data, A needs to be pre-trained as needed; then a memory information layer is designed, the parameters are embedded into the model A with a fixed interval, and a batch of data is sorted and labeled to fine-tune the parameters of the memory module. The effect achieved is that memory clues can be obtained based on the input query or question, and then questions are asked to the large model B (that is, the content generation model) with the assistance of memory clues to obtain the final question and answer results; it should be noted here that the training of the memory information layer is carried out offline, and only reasoning operations are performed during query, and no training is performed.

[0083] ④ The multi-path retrieval and recall layer can perform multi-path retrieval on the sub-problems obtained by the thought chain problem decomposition module, and recall the returned results; specifically, in the actual application process, the specific retrieval and recall results may include but are not limited to the abstracts / keywords of the documents corresponding to the document tree / pseudo-graph recall, the text blocks corresponding to the vector knowledge base recall, and the entity and relationship triples corresponding to the recall in the knowledge graph, etc.

[0084] ⑤ The content generation model can be used to generate preliminary search results based on the document keywords / abstracts, text blocks, entity relationship triples, prompt information, and target query questions obtained through retrieval. For details, refer to Figure 3 As shown, the content generation model described herein may include a first input layer 310, an embedding mapping layer 320, an encoding layer 330, a hybrid expert model layer 340, and a first output layer 350; at the same time, referring to Figure 4As shown, the hybrid expert model layer recorded here may include a gated network model and an expert neural network model; further, the specific operations that need to be performed at each model level will be described in detail later, and no further details will be given here. In addition, the encoding layer 230 recorded here may be a multi-layer bidirectional Transformer or a deep interest network (DIN). In the process of actual application, it can be determined according to actual needs, and this example does not impose any special restrictions on this; and the hybrid expert model layer recorded here may be implemented based on Expert or on a factor decomposition machine (FM). In the process of actual application, it can be determined according to actual needs, and this example does not impose any special restrictions on this.

[0085] ⑥ The fact verification layer can be used to perform fact verification on the preliminary results generated by the large model. Specifically, in the actual application process, the verification can be based on two methods: the first method is knowledge graph verification, that is, verification based on the previously constructed knowledge graph or the introduced trusted external knowledge graph to see if there are factual errors; the second method is to use trusted external retrieval to achieve verification, that is, external retrieval is used to verify the results generated by the large model, and only trusted retrieval sources are used to achieve factual judgment, thereby filtering to obtain the final result.

[0086] Secondly, the application scenarios of the example embodiments of the present disclosure are explained and illustrated. Specifically, the large model-based retrieval question-answering method recorded in the example embodiments of the present disclosure can be widely used in question-answering systems in all fields, especially official document question-answering in government enterprises, academic question-answering in papers in the field of scientific research, and operation guide question-answering in the field of engineering technology; at the same time, the software architecture involved in the large model-based retrieval question-answering method recorded in the example embodiments of the present disclosure is mainly based on large language models, knowledge graphs, and regular expressions as the algorithm core, and the Pytorch framework and Kafka framework of the Python language are used as the basic framework to implement the entire question-answering method.

[0087] The following will explain and illustrate the preset index knowledge base involved in the exemplary embodiment of the present disclosure. Specifically, the preset index knowledge base recorded in the exemplary embodiment of the present disclosure can be constructed before the user queries or asks questions; further, in constructing the index knowledge base, a large number of original web pages or documents can be processed through different technologies or methods to obtain knowledge bases of different dimensions; for example, document tree / pseudo-graph knowledge base, vector knowledge base and knowledge graph, etc. Among them:

[0088] First of all, for the document tree / pseudo-graph knowledge base, its core is to take each original web page or document as the basis, first generate the keywords and summaries of each document through a large model (for example, it can be a keyword extraction model and a summary generation model based on the large model); then, the documents are formed into a document tree or mind map through classification or clustering methods, so as to establish the relationship between documents; among them, the classification or clustering recorded here can be implemented based on the corresponding classification model or clustering model (such as a deep neural network model or a tree model, etc.), or based on the corresponding classification algorithm or clustering algorithm (such as a K-means clustering algorithm), and this example does not impose any special restrictions on this.

[0089] Secondly, for the vector knowledge base, its core is to cut and index the original documents or web pages to obtain smaller text blocks, then build a keyword or summary index for each text block, and then vectorize it through the embedding model to obtain the vector knowledge base; based on the obtained vector knowledge base, it is convenient to calculate the similarity between the query question vectorization and the text block vector in the query retrieval process to recall the corresponding text block as the context of the large model to assist in answering and generating the final result. In the actual application process, the text cutting process can be implemented in the following ways: divide each document Di into several smaller text blocks T through a sliding window with a preset step size or a custom semantic segmentation symbol or train a document segmentation model ij ; Furthermore, the text vectorization process can be achieved by using a pre-trained embedding model (such as the BERT model) to embed each text block T ij Convert to vector V ij ; The specific vector conversion process can be expressed as follows:

[0090] V ij =E(T ij ); Formula (1)

[0091] Among them, E represents the pre-trained embedding model.

[0092] Furthermore, vector similarity retrieval can be implemented in the following way: first, the target query question Q is vectorized into q based on a pre-trained embedding model (such as the BERT model), and then vector similarity retrieval is performed through a similarity algorithm or a nearest neighbor search method to obtain the corresponding retrieval results. The specific similarity calculation process can be implemented by the following formula (2):

[0093]

[0094] Among them, Retrieve vector(Q) represents the retrieval result of the target query question. If Sim uses the most common cosine similarity, it can be expressed as follows:

[0095]

[0096] Furthermore, for knowledge graphs, in the process of actual application, first of all, it is necessary to customize the domain of the knowledge graph (that is, the application scenario) based on expert experience; secondly, it is necessary to determine whether a knowledge graph needs to be built based on whether there is an existing available knowledge graph; among them, for scenarios where a knowledge graph needs to be built, it is necessary to customize the schema of the knowledge graph, and then perform named entity recognition and relationship extraction on the text to obtain triples and store them in the graph database to obtain the corresponding knowledge graph; for scenarios where a knowledge graph does not need to be built, entities and relationships can be directly extracted from the text to form triples and then integrated into the original knowledge graph; further, in the process of named entity recognition and entity relationship extraction, it can be achieved by extracting entities and relationships from the text to generate triples (h, r, t); among them, h (head) is the head entity, t (tail) is the tail entity, and r (relationship) is the entity relationship between the head entity h and the tail entity t; the specific generation process of the triples can be achieved by the following formula (4):

[0097] {(h,r,t)}=NER&RE(D i ); Formula (4)

[0098] Among them, NER represents the named entity recognition (Named Entity Recognition) model, which may include but is not limited to a convolutional neural network model, a recurrent neural network model, a long short-term memory network model, a decision tree model, etc.; at the same time, RE represents the entity relationship (Relationship) extraction model; this model may also include but is not limited to a convolutional neural network model, a recurrent neural network model, a long short-term memory network model, a decision tree model, etc.; in the process of actual application, the corresponding model can be selected according to actual needs, and this example does not impose any special restrictions on this.

[0099] The following will be combined Figure 2-Figure 4 ,right Figure 1 The large model-based retrieval question answering method shown in the figure is further explained and illustrated. Specifically:

[0100] In step S110, the target query question is split into thought chains to obtain a plurality of sub-question splitting results, and model prompt information is determined according to the plurality of sub-question splitting results.

[0101] In this example embodiment, first, the target query question is split into a thought chain to obtain multiple sub-question splitting results; specifically, it can be implemented in the following ways: in response to the user's input operation on the question-answer retrieval display interface, the original search term is determined; the original search term is rewritten based on a preset keyword rewriting model to obtain the target query question; wherein the preset keyword rewriting model includes a large language model with a first preset scale and / or a model generated based on a preset rewriting strategy; based on the target query question, the first task execution model corresponding to the thought chain splitting task is determined to be executed, and the target query question is split into a thought chain based on the first task execution model to obtain multiple sub-question splitting results. wherein, the large language model with a first preset scale recorded here can be a small-scale Bert; the preset rewriting strategy, for example, can include but is not limited to typo correction, word segmentation, adding scenes or adding other qualifiers, etc., and this example does not impose special restrictions on this; the first task execution model recorded here can include but is not limited to a model or an intelligent agent, etc.; at the same time, in the process of determining the first task execution model, it can be implemented based on a corresponding classification model (such as a decision tree model, etc.). Furthermore, the specific search term rewriting process can be implemented based on the following formula (5); the specific thought chain splitting process can be implemented based on the following formula (6).

[0102] Q'=T(Q); Formula (5)

[0103] Among them, Q' represents the target query, Q represents the original search term, and T represents the specific rewriting process; at the same time, for the original search term, rewriting it into a query Q' that is semantically closer to the knowledge base through model T can further improve the accuracy of the target search results; among them, the target query obtained can refer to Figure 5 shown.

[0104]

[0105] Route(Q') represents the first task execution model obtained, and Agent represents the original agent. At the same time, based on the target query problem, it is determined which model or agent to assign to process, thereby improving the accuracy of the obtained sub-problem splitting results. The obtained sub-problem splitting results can be referred to Figure 6 shown.

[0106] Furthermore, the multiple sub-problem splitting results obtained by splitting the target query problem into a thought chain based on the first task execution model can be shown in the following formula (7):

[0107] Decompose(Q) = {Q 1 ,Q 2,...,Q k}; Formula (7)

[0108] Finally, the retrieval and recall processing is performed on each sub-question split result to obtain the corresponding retrieval result.

[0109] Secondly, determine the model prompt information according to the results of splitting multiple sub-problems. Specifically, it can be implemented in the following ways: first, determine the target query scenario corresponding to the target query problem according to the results of splitting multiple sub-problems, and determine the knowledge base name of the preset index knowledge base according to the target query scenario; secondly, determine the model memory parameters required to generate the model prompt information according to the target query scenario and the knowledge base name; finally, embed the model memory parameters into a large model with a second preset scale to obtain a prompt information generation model, and input the multiple sub-problem splitting results into the prompt information generation model to obtain the model prompt information. That is, in the actual application process, for each different sub-problem splitting result, the corresponding prompt information can be determined respectively; wherein, the obtained model prompt information can refer to the following formula (8):

[0110] R memory (Q i )={M i1 ,M i2 ,...,M ij}. Formula (8)

[0111] In step S120, a search is performed in a preset index knowledge base based on the multiple sub-question splitting results to obtain search results of multiple different dimensions.

[0112] Specifically, the retrieval recall process described herein can be implemented in the following manner: searching in the document tree / pseudo-graph knowledge base based on the results of the splitting of the multiple sub-problems to obtain retrieval results of the first dimension; wherein the retrieval results of the first dimension include document summaries or document keywords; searching in the vector knowledge base based on the results of the splitting of the multiple sub-problems to obtain retrieval results of the second dimension; wherein the retrieval results of the second dimension include text blocks; searching in the knowledge graph based on the results of the splitting of the multiple sub-problems to obtain retrieval results of the third dimension; the retrieval results of the third dimension include a triple consisting of a head entity, a tail entity, and an entity relationship between the head entity and the tail entity; generating the retrieval results of the multiple different dimensions based on the retrieval results of the first dimension, the retrieval results of the second dimension, and the retrieval results of the third dimension.

[0113] That is, in the actual application process, for document tree / pseudo-graph retrieval and recall, it can be implemented in the following way: for each subquery, the abstract or keyword set of the relevant document is recalled from the document tree or pseudo-graph knowledge base; wherein the obtained abstract or keyword set can be shown in the following formula (9):

[0114] R tree (Q i )={D i1 ,D i2 ,...,D in}; Formula (9)

[0115] For the vector knowledge base retrieval recall, it can be implemented in the following way: for each subquery, the relevant text block set is recalled in the vector knowledge base; wherein the obtained text block set can be shown in the following formula (10):

[0116] R vector (Q i )={T i1 ,T i2 ,...,T im}; Formula (10)

[0117] For knowledge graph retrieval and recall, it can be achieved in the following way: for each subquery, a set of triples of related entities and relationships between entities is recalled from the knowledge graph. The set of triples obtained can be expressed as the following formula (11):

[0118] R KG (Q i )={(h i1 ,r i1 ,t i1 ),(h i2 ,r i2 ,t i2 ),...,(h ik ,r ik ,t ik )}; Formula (11)

[0119] In step S130, context content generation text is generated according to the retrieval results of the multiple different dimensions and the model prompt information.

[0120] Specifically, the specific generation process of the context content generated text recorded here can be implemented in the following way: based on the preset filtering conditions, the retrieval results of the multiple different dimensions and the model prompt information are filtered to obtain the first filtering result and the second filtering result; based on the preset information rearrangement model, the first filtering result and the second filtering result are rearranged, and the context content generated text is generated according to the information rearrangement result. Among them, the filtering process recorded here can refer to the following formula (12), and the information rearrangement process recorded here can be shown in the following formula (13). Among them:

[0121] R filtered = {r j |r j ∈R,Filter(r j ,C)=True}; Formula (12)

[0122] Among them, C represents the preset filtering conditions; the filtering conditions recorded here may include but are not limited to words that are too long or too short, information that is unclear, does not conform to grammatical norms, or contains expression errors and typos, etc.; in the actual application process, you can choose according to your actual needs, and this example does not make any special restrictions on this.

[0123] R reordered =Sort(R filtered ,Score); formula (13)

[0124] Among them, R reordered Represents the information rearrangement result, and Score represents the similarity score between the first filtering result and the second filtering result; wherein, the specific determination process of the similarity score can be determined based on the chord similarity between the first filtering result and the second filtering result, or the first filtering result and the second filtering result can be directly input into the BERT model to obtain the similarity score, and this example does not impose any special restrictions on this; based on this method, the accuracy of the model prompt information can be further improved, thereby improving the accuracy of the obtained retrieval results.

[0125] In step S140, the context content generation text is input into a preset content generation macro model to obtain a preliminary search result, and the preliminary search result is fact-checked to obtain a target search result.

[0126] In this example embodiment, first, a preliminary search result is determined; specifically, it can be achieved in the following manner: embedding and mapping the text generated by the context content based on the embedding mapping layer to obtain a context marker sequence, and encoding the context marker sequence based on the encoding layer to obtain a context overall representation; predicting the context marker sequence and the context overall representation based on the hybrid expert model layer to obtain the preliminary search result. Among them, predicting the context marker sequence and the context overall representation based on the hybrid expert model layer to obtain the preliminary search result can be achieved in the following manner: determining the model weight of the expert neural network model according to the context marker sequence based on the gated network model, and determining the target neural network model required to perform the preliminary search result generation task from the expert neural network according to the model weight; inputting the context marker sequence and the context overall representation into the target neural network model to obtain the preliminary search result. Furthermore, the context tag sequence and the overall context representation are input into the target neural network model to obtain the preliminary search result, which can be achieved in the following manner: the context tag sequence and the overall context representation are input into the target neural network model to obtain a first output result; and the first output result is weighted summed according to the model weight corresponding to the target neural network model to obtain the preliminary search result. The specific implementation process of the preliminary search result can be referred to. Figure 7 As shown, the scene example diagram of the determination process can be referred to Figure 8 shown.

[0127] Secondly, it is also necessary to perform fact verification on the preliminary search results to obtain the target search results; specifically, this can be achieved in the following ways: one implementation method is: based on a preset fact knowledge graph, the preliminary search results are fact verified to obtain a first fact verification result, and the preliminary search results are filtered according to the first fact verification result to obtain the target search results; another implementation method is: based on a preset expert knowledge resource, the preliminary search results are fact verified to obtain a second fact verification result, and the preliminary search results are filtered according to the second fact verification result to obtain the target search result.

[0128] Specifically, the verification based on the preset fact knowledge graph recorded here can be implemented in the following way: according to the constructed knowledge graph KG, search and generate results (that is, preliminary search results) R initial Related facts; if the entities and relationships corresponding to the preliminary search results are found, the result is judged to be correct; wherein the specific verification process can be shown in the following formula (14):

[0129] ValidKG (R initial )={(h,r,t)(h,r,t)∈KGandMatch(R initial ,(h,r,t))}; Formula (14)

[0130] Among them, Valid KG (R initial ) represents the first fact check result, and the Match function is used to determine whether the generated result matches the triple of the knowledge graph; further, if R initial If the content is not in the knowledge graph, a consistency check needs to be performed. The consistency check process can determine whether the generated result is reasonable by reasoning the consistency check model. The specific verification process can be implemented by the following formula (15):

[0131] Consistency KG (R initial )=Infer(KG,R initial ); Formula (15)

[0132] Among them, Consistency KG (R initial ) represents the consistency check result, Infer represents the consistency check model, and the consistency check model recorded here can be a convolutional neural network, a recurrent neural network, a long short-term memory network, etc.; if the consistency check passes, the preliminary search result can be retained as the target search result; if not, it can be directly filtered out.

[0133] Furthermore, the fact verification of the preliminary search results based on the preset expert knowledge resources described herein can be implemented in the following manner: using external trusted resources to perform retrieval to verify the accuracy of the generated results; wherein the specific sight process can be implemented by the following formula (16):

[0134] R external =SearchExternal(R initial ); Formula (16)

[0135] Among them, R external Represents the second fact verification result, SearchExternal represents the specific verification process; at the same time, the external trusted resources (ie, expert knowledge resources) recorded here may include but are not limited to literature resources, common knowledge or customary means, etc., and this example does not impose any special restrictions on this.

[0136] So far, the large model-based retrieval question answering method recorded in the exemplary embodiment of the present disclosure has been fully implemented. Based on the above content, it can be known that the large model-based retrieval question answering method recorded in the exemplary embodiment of the present disclosure has at least the following advantages:

[0137] On the one hand, by setting up an offline index knowledge base, the original Word document, PDF document or web page data can be processed directly, with very low initial requirements for the text, and a variety of methods are used to achieve the establishment of a multi-level, multi-granular knowledge base; on the other hand, the corresponding model prompt information can be generated based on memory; at the same time, a small-scale large model can be trained to achieve accurate preservation of the implicit and explicit memory of the original document memory, assisting large-model question and answer; on the other hand, based on the query rewriting layer and the thinking chain problem decomposition layer, a clear description of the problem and the decomposition of complex problems can be effectively achieved, and the semantic space alignment of the query and the knowledge base can be achieved; and by setting up a multi-way retrieval recall layer, the document tree, vector knowledge base, and knowledge graph can be The spectrum and memory model are multi-way search and recall, and then filtered and rearranged to obtain the final result and return it to the large model as context, which can effectively improve the effect of search enhancement, thereby improving the final result output of the large model; further, by setting a fact verification layer, the results generated by the large model can also be factually verified, and judged by a reliable knowledge graph and external search to avoid factual errors generated by the large model; finally, the retrieval question-answering method based on the large model recorded in the example embodiment of the present disclosure can also be targeted at existing focused summary queries, accuracy and completeness of knowledge graphs, complex queries and other issues, expand and improve multi-way search and recall, add query rewriting, thinking chain problem decomposition, and reduce factual errors in questions and answers through the final fact verification module. Through our invention, we can take into account both precision and efficiency and successfully improve the accuracy of questions and answers.

[0138] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0139] The exemplary embodiment of the present disclosure also provides a retrieval question-answering device based on a large model. Fig. 9 As shown, the large model-based retrieval question-answering device may include a model prompt information generation module 910, a retrieval recall module 920, a context text generation module 930, and a retrieval result generation module 940. Among them:

[0140] The model prompt information generating module 910 may be used to split the target query question into thought chains, obtain multiple sub-question splitting results, and determine the model prompt information according to the multiple sub-question splitting results;

[0141] The retrieval and recall module 920 may be used to perform retrieval and recall in a preset index knowledge base based on the split results of the multiple sub-questions to obtain retrieval results of multiple different dimensions;

[0142] A context text generation module 930 may be used to generate context content generation text according to the search results of the multiple different dimensions and the model prompt information;

[0143] The search result generation module 940 can be used to input the context content generation text into a preset content generation model to obtain preliminary search results, and perform fact verification on the preliminary search results to obtain target search results.

[0144] In an exemplary embodiment of the present disclosure, a target query question is split into a thought chain to obtain multiple sub-question splitting results, including: in response to an input operation of a user on a question-and-answer retrieval display interface, an original search term is determined; based on a preset keyword rewriting model, the original search term is rewritten to obtain the target query question; wherein the preset keyword rewriting model includes a large language model with a first preset scale and / or a model generated based on a preset rewriting strategy; based on the target query question, a first task execution model corresponding to a thought chain splitting task is determined to be executed, and based on the first task execution model, the target query question is split into a thought chain to obtain multiple sub-question splitting results.

[0145] In an exemplary embodiment of the present disclosure, model prompt information is determined based on the multiple sub-problem splitting results, including: determining a target query scenario corresponding to the target query problem based on the multiple sub-problem splitting results, and determining a knowledge base name of the preset index knowledge base based on the target query scenario; determining model memory parameters required to generate the model prompt information based on the target query scenario and the knowledge base name; embedding the model memory parameters into a large model with a second preset scale to obtain a prompt information generation model, and inputting the multiple sub-problem splitting results into the prompt information generation model to obtain the model prompt information.

[0146] In an exemplary embodiment of the present disclosure, the preset index knowledge base includes at least one of a document tree / pseudo-graph knowledge base, a vector knowledge base and a knowledge graph; wherein, based on the results of the multiple sub-problem splitting, a search and recall is performed in the preset index knowledge base to obtain search results of multiple different dimensions, including: based on the results of the multiple sub-problem splitting, a search is performed in the document tree / pseudo-graph knowledge base to obtain a search result of a first dimension; wherein the search result of the first dimension includes a document summary or a document keyword; based on the results of the multiple sub-problem splitting, a search is performed in the vector knowledge base to obtain a search result of a second dimension; wherein the search result of the second dimension includes a text block; based on the results of the multiple sub-problem splitting, a search is performed in the knowledge graph to obtain a search result of a third dimension; the search result of the third dimension includes a triple consisting of a head entity, a tail entity and an entity relationship between the head entity and the tail entity; according to the search results of the first dimension, the search results of the second dimension and the search results of the third dimension, the search results of the multiple different dimensions are generated.

[0147] In an exemplary embodiment of the present disclosure, context content generation text is generated based on retrieval results of multiple different dimensions and the model prompt information, including: filtering the retrieval results of the multiple different dimensions and the model prompt information based on preset filtering conditions to obtain a first filtering result and a second filtering result; rearranging information on the first filtering result and the second filtering result based on a preset information rearrangement model, obtaining the information rearrangement result, and generating context content generation text based on the information rearrangement result.

[0148] In an exemplary embodiment of the present disclosure, a preset content generation model includes an embedding mapping layer, an encoding layer and a hybrid expert model layer; wherein, the context content generation text is input into the preset content generation model to obtain a preliminary retrieval result, including: embedding mapping processing is performed on the context content generation text based on the embedding mapping layer to obtain a context marker sequence, and encoding processing is performed on the context marker sequence based on the encoding layer to obtain a context overall representation; and the context marker sequence and the context overall representation are predicted based on the hybrid expert model layer to obtain the preliminary retrieval result.

[0149] In an exemplary embodiment of the present disclosure, the hybrid expert model layer includes a gated network model and an expert neural network model; wherein, the context marker sequence and the overall context representation are predicted based on the hybrid expert model layer to obtain the preliminary retrieval result, including: determining the model weight of the expert neural network model according to the context marker sequence based on the gated network model, and determining the target neural network model required to perform the preliminary retrieval result generation task from the expert neural network according to the model weight; inputting the context marker sequence and the overall context representation into the target neural network model to obtain the preliminary retrieval result.

[0150] In an exemplary embodiment of the present disclosure, the context marker sequence and the overall context representation are input into the target neural network model to obtain the preliminary retrieval result, including: inputting the context marker sequence and the overall context representation into the target neural network model to obtain a first output result; performing weighted summation on the first output result according to the model weight corresponding to the target neural network model to obtain the preliminary retrieval result.

[0151] In an exemplary embodiment of the present disclosure, the preliminary search results are fact-checked to obtain target search results, including: fact-checking the preliminary search results based on a preset fact knowledge graph to obtain a first fact-check result, and filtering the preliminary search results according to the first fact-check result to obtain the target search results; and / or fact-checking the preliminary search results based on a preset expert knowledge resource to obtain a second fact-check result, and filtering the preliminary search results according to the second fact-check result to obtain the target search results.

[0152] The specific details of each module in the above-mentioned large model-based retrieval question and answer device have been described in detail in the corresponding large model-based retrieval question and answer method, so they will not be repeated here.

[0153] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0154] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0155] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0156] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0157] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0158] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0159] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 1Step S110 shown in: splitting the thought chain of the target query question to obtain multiple sub-question splitting results, and determining the model prompt information according to the multiple sub-question splitting results; step S120: performing retrieval and recall in a preset index knowledge base based on the multiple sub-question splitting results to obtain multiple retrieval results of different dimensions; step S130: generating a context content generation text according to the multiple retrieval results of different dimensions and the model prompt information; step S140: inputting the context content generation text into the preset content generation model to obtain preliminary retrieval results, and performing fact verification on the preliminary retrieval results to obtain the target retrieval results.

[0160] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .

[0161] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0162] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0163] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0164] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0165] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0166] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0167] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0168] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0169] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0170] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0171] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0172] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A retrieval question answering method based on a large model, characterized in that: include: Splitting the target query question into a thought chain to obtain multiple sub-question splitting results, and determining model prompt information according to the multiple sub-question splitting results; Based on the split results of the multiple sub-questions, a search is performed in a preset index knowledge base to obtain search results of multiple different dimensions; Generate text based on the search results of the multiple different dimensions and the model prompt information; The context content generation text is input into a preset content generation macro model to obtain a preliminary search result, and the preliminary search result is fact-checked to obtain a target search result.

2. The large model-based retrieval question answering method according to claim 1, characterized in that: The target query problem is split into multiple sub-problem splitting results, including: In response to a user input operation on the question-answer search display interface, determining an original search term; Rewriting the original search term based on a preset keyword rewriting model to obtain the target query question; wherein the preset keyword rewriting model includes a large language model with a first preset scale and / or a model generated based on a preset rewriting strategy; Based on the target query problem, determine to execute a first task execution model corresponding to the thought chain splitting task, and split the thought chain of the target query problem based on the first task execution model to obtain multiple sub-problem splitting results.

3. The large model-based retrieval question answering method according to claim 1, characterized in that: Determining model prompt information according to the splitting results of the multiple sub-problems includes: Determine a target query scenario corresponding to the target query problem according to the splitting results of the multiple sub-questions, and determine a knowledge base name of the preset index knowledge base according to the target query scenario; Determine the model memory parameters required to generate the model prompt information according to the target query scenario and the name of the knowledge base; The model memory parameters are embedded into a large model with a second preset scale to obtain a prompt information generation model, and the multiple sub-problem splitting results are input into the prompt information generation model to obtain the model prompt information.

4. The large model-based retrieval question answering method according to claim 1, characterized in that: The preset index knowledge base includes at least one of a document tree / pseudo-graph knowledge base, a vector knowledge base, and a knowledge graph; Among them, based on the split results of the multiple sub-questions, a search is performed in a preset index knowledge base to obtain search results of multiple different dimensions, including: Based on the split results of the multiple sub-questions, a search is performed in the document tree / pseudo-graph knowledge base to obtain a search result of a first dimension; wherein the search result of the first dimension includes a document summary or a document keyword; Searching in the vector knowledge base based on the splitting results of the multiple sub-questions to obtain a search result of the second dimension; wherein the search result of the second dimension includes a text block; Based on the split results of the multiple sub-questions, a search is performed in the knowledge graph to obtain a search result of the third dimension; the search result of the third dimension includes a triple consisting of a head entity, a tail entity, and an entity relationship between the head entity and the tail entity; The retrieval results of the multiple different dimensions are generated according to the retrieval results of the first dimension, the retrieval results of the second dimension, and the retrieval results of the third dimension.

5. The large model-based retrieval question answering method according to claim 1, characterized in that: Generating text based on the search results of the multiple different dimensions and the model prompt information as context content includes: Filtering the search results of the multiple different dimensions and the model prompt information based on a preset filtering condition to obtain a first filtering result and a second filtering result; The first filtering result and the second filtering result are rearranged based on a preset information rearrangement model, and a context content generation text is generated according to the information rearrangement result.

6. The large model-based retrieval question answering method according to claim 1, characterized in that: The preset content generation model includes an embedding mapping layer, an encoding layer, and a hybrid expert model layer; The context content generation text is input into a preset content generation model to obtain preliminary search results, including: Based on the embedding mapping layer, embedding mapping is performed on the text generated by the context content to obtain a context marker sequence, and based on the encoding layer, encoding is performed on the context marker sequence to obtain a context overall representation; The context marker sequence and the overall context representation are predicted based on the hybrid expert model layer to obtain the preliminary retrieval result.

7. The large model-based retrieval question answering method according to claim 6, characterized in that: The hybrid expert model layer includes a gated network model and an expert neural network model; The preliminary search result is obtained by predicting the context marker sequence and the overall context representation based on the hybrid expert model layer, including: Determining a model weight of the expert neural network model based on the gating network model according to the contextual marker sequence, and determining a target neural network model required to perform a preliminary retrieval result generation task from the expert neural network according to the model weight; The context marker sequence and the overall context representation are input into the target neural network model to obtain the preliminary retrieval result.

8. The large model-based retrieval question answering method according to claim 7, characterized in that: Inputting the contextual token sequence and the overall context representation into the target neural network model to obtain the preliminary search results includes: Inputting the context marker sequence and the context overall representation into the target neural network model to obtain a first output result; The first output result is weightedly summed according to the model weight corresponding to the target neural network model to obtain the preliminary search result.

9. The large model-based retrieval question answering method according to claim 1, characterized in that: Perform fact checking on the preliminary search results to obtain target search results, including: Performing fact verification on the preliminary search results based on a preset fact knowledge graph to obtain a first fact verification result, and filtering the preliminary search results according to the first fact verification result to obtain the target search result; and / or The preliminary search results are fact-checked based on preset expert knowledge resources to obtain a second fact-checked result, and the preliminary search results are filtered according to the second fact-checked result to obtain the target search result.

10. A retrieval question-answering device based on a large model, characterized in that: include: A model prompt information generation module is used to split the target query question into a thought chain, obtain multiple sub-question splitting results, and determine the model prompt information according to the multiple sub-question splitting results; A retrieval and recall module, used to perform retrieval and recall in a preset index knowledge base based on the split results of the multiple sub-questions, and obtain retrieval results of multiple different dimensions; A context text generation module, used to generate context content generation text according to the retrieval results of the multiple different dimensions and the model prompt information; The retrieval result generation module is used to input the context content generation text into a preset content generation model to obtain preliminary retrieval results, and to perform fact verification on the preliminary retrieval results to obtain target retrieval results.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the large model-based retrieval question-answering method according to any one of claims 1 to 9 is implemented.

12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the large model-based retrieval question and answer method described in any one of claims 1-9 by executing the executable instructions.

Citation Information

Cited By

  • Multi-modal data processing method and device based on thinking chain, equipment and medium

    CN120372209A

  • Thought chain-based multi-modal data processing method and device, equipment and medium

    CN120372209B

  • Scientific research question and answer reasoning all-in-one machine based on multi-agent cooperation and control method

    CN120429410A

  • Enterprise comprehensive management method, system and equipment based on large model and storage medium

    CN120471166A

  • Multi-agent system initialization method and device oriented to large question and answer model

    CN120492600A