Retrieval method and device based on large model and intelligent agent

Through the large language model, the source documents and knowledge base are processed, and positive and negative samples used for training and retrieval generation of large models are generated, which solves the problems of insufficient training samples and low accuracy, and improves the accuracy of the search answers and the reliability of the model.

CN119202192APending Publication Date: 2024-12-27BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411366793.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing training sample data is difficult to meet the training needs of retrieving and generating large models, resulting in insufficient accuracy and accuracy, and hallucination interference problems.

Method used

The large language model processed the source document to obtain a question-and-answer information group, determine the knowledge fragments matching the question information from the preset knowledge base, and determine the positive and negative sample knowledge fragments based on the similarity between the answer information and the knowledge fragments, and generate positive and negative example knowledge fragments for training Negative training samples to enable training retrieval to generate large models.

Benefits of technology

It improves the search answer accuracy of the search and generation of large models, reduces the output of semantic irrelevant information, reduces hallucinatory interference, and improves the reliability and user experience of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202192A_ABST
    Figure CN119202192A_ABST
Patent Text Reader

Abstract

The invention provides a retrieval method and device based on a large model and an intelligent agent, and relates to the technical field of artificial intelligence, in particular to the technical field of deep learning, large language models and retrieval enhancement generative models. The large model-based training sample generation method comprises the following steps of: processing a source document by utilizing a large language model to obtain a question and answer information group; determining a plurality of knowledge fragments matched with the question information of the question and answer information group from a preset knowledge base; determining positive and negative sample knowledge fragments from the plurality of knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments; and generating positive and negative training samples for training, retrieving and generating a large model based on the question and answer information group and the positive and negative sample knowledge fragments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of artificial intelligence technology, and in particular to the technical field of deep learning, large language models, and retrieval-enhanced generative models, and can be applied to scenarios such as intelligent retrieval and intelligent question-answering. Background Art

[0002] With the development of artificial intelligence technology, large models are gradually widely used in various fields such as natural language processing, computer vision, speech recognition, etc. The large model can be trained with training sample data to improve the performance of the large model or make the large model suitable for specific scenarios. Summary of the invention

[0003] The present disclosure provides a training sample generation method based on a large model, a training method for retrieving and generating a large model, a retrieval method based on a large model, an apparatus, a device, a medium, a program product and an intelligent agent.

[0004] According to one aspect of the present disclosure, a method for generating training samples based on a large model is provided, comprising: processing a source document using a large language model to obtain a question and answer information group; determining, from a preset knowledge base, a plurality of knowledge fragments that match the question information of the question and answer information group; determining positive and negative sample knowledge fragments from a plurality of knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments; and generating positive and negative training samples for training retrieval to generate a large model based on the question and answer information group and the positive and negative sample knowledge fragments.

[0005] According to another aspect of the present disclosure, a training method for retrieval generation of a large model is provided, comprising: obtaining positive and negative training samples, where the positive and negative training samples are generated by the above-mentioned large model-based training sample generation method; and training the retrieval generation of the large model according to the positive and negative training samples to obtain the trained retrieval generation of the large model.

[0006] According to another aspect of the present disclosure, a retrieval method based on a big model is provided, including: obtaining a retrieval request; in response to the retrieval request, using a trained retrieval generation big model to process retrieval question information and target knowledge fragments related to the retrieval request to obtain retrieval answer information, wherein the trained retrieval generation big model is determined according to the above-mentioned training method of the retrieval generation big model; and displaying the retrieval answer information on an interactive interface.

[0007] According to another aspect of the present disclosure, a training sample generation device based on a large model is provided, including: a processing module for processing a source document using a large language model to obtain a question and answer information group; a first determination module for determining, from a preset knowledge base, a plurality of knowledge fragments that match the question information of the question and answer information group; a second determination module for determining positive and negative sample knowledge fragments from a plurality of knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments; and a generation module for generating positive and negative training samples for training retrieval to generate a large model based on the question and answer information group and the positive and negative sample knowledge fragments.

[0008] According to another aspect of the present disclosure, a training device for retrieval generation of a large model is provided, including: an acquisition module for acquiring positive and negative training samples, where the positive and negative training samples are generated according to the above-mentioned large model-based training sample generation method; and a training module for training the retrieval generation of the large model according to the positive and negative training samples to obtain the trained retrieval generation of the large model.

[0009] According to another aspect of the present disclosure, a retrieval device based on a big model is provided, including: a retrieval request acquisition module, used to obtain a retrieval request; a retrieval module, used to respond to the retrieval request, use the trained retrieval generation big model to process the retrieval question information and target knowledge fragments related to the retrieval request, and obtain retrieval answer information, wherein the trained retrieval generation big model is determined according to the above-mentioned training method of the retrieval generation big model; and a display module, used to display the retrieval answer information on an interactive interface.

[0010] According to another aspect of the present disclosure, there is provided an artificial intelligence agent, comprising: an input module for receiving input information; a processing module for determining a target task based on the input information received by the input module, determining a retrieval and generation large model based on the target task, and executing the above-mentioned large model-based retrieval method by calling the retrieval and generation large model to obtain output information; and an output module for outputting the output information obtained by the processing module.

[0011] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided by an embodiment of the present disclosure.

[0012] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method provided by an embodiment of the present disclosure.

[0013] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the method provided by the embodiment of the present disclosure when executed by a processor.

[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0016] Figure 1 Schematically illustrates an exemplary system architecture to which a method and apparatus for generating training samples based on a large model, a training method and apparatus for retrieving and generating a large model, and a retrieval method and apparatus based on a large model can be applied according to an embodiment of the present disclosure;

[0017] Figure 2 The flowchart of the method for generating training samples based on a large model according to an embodiment of the present disclosure is schematically shown;

[0018] Figure 3 The schematic diagram of the training sample generation process based on the large model according to the embodiment of the present disclosure is schematically shown;

[0019] Figure 4 A flowchart of a training method for retrieving and generating a large model according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 5 A schematic diagram of a training process of a large retrieval generation model according to an embodiment of the present disclosure is exemplarily shown;

[0021] Figure 6 The flowchart of the retrieval method based on the large model according to the embodiment of the present disclosure is schematically shown;

[0022] Figure 7 The schematic diagram shows a principle diagram of a retrieval method based on a large model according to an embodiment of the present disclosure;

[0023] Figure 8 A block diagram of a large model-based training sample generation device according to an embodiment of the present disclosure is schematically shown;

[0024] Fig. 9 A block diagram of a training device for retrieving and generating a large model according to an embodiment of the present disclosure is schematically shown;

[0025] Fig.10 A block diagram of a large model-based retrieval device according to an embodiment of the present disclosure is schematically shown;

[0026] Fig.11 A block diagram schematically shows a structure of an artificial intelligence agent according to an embodiment of the present disclosure; and

[0027] Fig.12 The block diagram schematically shows an electronic device suitable for implementing a training sample generation method based on a large model, a training method for retrieving and generating a large model, and a retrieval method based on a large model according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0029] In the technical solution disclosed in the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.

[0030] With the development of artificial intelligence technology, training sample data can be used to train the retrieval generation model. However, the inventors found that the training sample data used to train the retrieval generation model is difficult to meet the training requirements of the retrieval generation model, and the accuracy and precision of the retrieval generation model still need to be improved.

[0031] The disclosed embodiments provide a method for generating training samples based on a large model, a training method for retrieval generation of a large model, a retrieval method based on a large model, an apparatus, a device, a medium, a program product, and an intelligent agent. The method for generating training samples based on a large model includes: using a large language model to process a source document to obtain a question-answer information group; determining multiple knowledge fragments matching the question information of the question-answer information group from a preset knowledge base; determining positive and negative sample knowledge fragments from multiple knowledge fragments based on the similarity between the answer information of the question-answer information group and the knowledge fragments; and generating positive and negative training samples for training the retrieval generation of a large model based on the question-answer information group and the positive and negative sample knowledge fragments.

[0032] According to the embodiments of the present disclosure, by processing the source document based on the large language model to obtain the question and answer information group, the automatic construction of the question and answer information group can be realized, and the time for generating training data can be saved. By determining multiple knowledge fragments matching the question information from the preset knowledge base, and determining the positive and negative sample knowledge fragments from the multiple knowledge fragments according to the similarity with the answer information, it is possible to determine the negative sample knowledge fragments with low relevance to the answer information from the multiple knowledge fragments with high similarity to the question, thereby realizing fine-grained distinction of the relevance between the sample knowledge fragments and the question information and the answer information. By generating positive and negative training samples for training the retrieval generation large model based on the positive and negative sample knowledge fragments, the retrieval generation large model can learn the negative sample knowledge fragments with high similarity to the question information but not helpful for the answer information in a relatively fine-grained manner, so that the retrieval generation large model can reduce the interference of knowledge fragments irrelevant to the answer information, reduce the probability and amount of information contained in the retrieval answer output by the retrieval generation large model, reduce the hallucination interference of the retrieval generation large model in the reply process, and improve the retrieval answer accuracy of the retrieval generation large model.

[0033] Figure 1 The exemplary system architecture of the method and device for generating training samples based on a large model, the training method and device for retrieving and generating a large model, and the retrieval method and device based on a large model according to the embodiments of the present disclosure is schematically shown.

[0034] It should be noted that Figure 1 What is shown is only an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios. For example, in another embodiment, the exemplary system architecture to which the method and apparatus for generating training samples based on a large model, the training method and apparatus for retrieving and generating a large model, and the retrieval method and apparatus based on a large model can be applied may include a terminal device, but the terminal device may implement the method and apparatus for generating training samples based on a large model, the training method and apparatus for retrieving and generating a large model, and the retrieval method and apparatus based on a large model provided in the embodiments of the present disclosure without interacting with the server.

[0035] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0036] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0037] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0038] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for the content browsed by the user using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device.

[0039] The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server can also be a server of a distributed system, or a server combined with blockchain.

[0040] It should be noted that the training sample generation method based on the large model, the training method for retrieving and generating the large model, and the retrieval method based on the large model provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the training sample generation device based on the large model, the training device for retrieving and generating the large model, and the retrieval device based on the large model provided in the embodiments of the present disclosure can generally be set in the server 105. The training sample generation method based on the large model, the training method for retrieving and generating the large model, and the retrieval method based on the large model provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the training sample generation device based on the large model, the training device for retrieving and generating the large model, and the retrieval device based on the large model provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0041] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0042] Figure 2 The flowchart of the method for generating training samples based on a large model according to an embodiment of the present disclosure is schematically shown.

[0043] like Figure 2 As shown, the method 200 includes operations S210 to S240.

[0044] In operation S210, the source document is processed using a large language model to obtain a question and answer information group.

[0045] In operation S220, a plurality of knowledge segments matching the question information of the question and answer information group are determined from a preset knowledge base.

[0046] In operation S230, based on the similarity between the answer information of the question and answer information group and the knowledge fragments, positive and negative sample knowledge fragments are determined from the plurality of knowledge fragments.

[0047] In operation S240, positive and negative training samples for training a large retrieval generation model are generated based on the question and answer information group and the positive and negative sample knowledge fragments.

[0048] According to the embodiments of the present disclosure, a large model may be a model having a large-scale parameter structure, and the parameter magnitude is generally above 10 million or 100 million, and may reach 10 billion or 10 billion. In terms of the network structure of the large model, for example, a network structure such as UFO (Unified Feature Optimization) may be adopted.

[0049] According to an embodiment of the present disclosure, a large language model (LLM) may be a natural language processing model with large-scale parameters and computing power. Large language models can be widely used in fields such as natural language processing, text generation, and intelligent dialogue. A large language model may be a model with a large-scale parameter structure, and the parameter magnitude is generally in the tens of millions or hundreds of millions, and may reach the billions or tens of billions. In terms of the network structure of the large model, for example, a network structure such as UFO (Unified Feature Optimization) may be adopted.

[0050] According to an embodiment of the present disclosure, the retrieval generation model, which may also be referred to as the retrieval-augmented generation (RAG) model, may be a large model that combines information retrieval technology with a generative model. The retrieval generation model may enhance the model's ability to handle knowledge-intensive tasks, such as question information response, text summarization, content generation, etc., by retrieving relevant information from an external knowledge base and inputting it as prompt information to the retrieval generation model. The retrieval generation model may effectively alleviate the problems of the large model in terms of lack of domain knowledge, insufficient information accuracy, and generation of false content by introducing additional information sources such as external knowledge bases.

[0051] According to the embodiments of the present disclosure, the prompt word can be understood as a tag sequence composed of text, symbols and other tags input to the retrieval generation model, and the prompt word can guide the model to generate a specific output or perform a specific task. As an example, in natural language processing (NLP), the prompt word can be a question, the beginning of a sentence, an instruction, or any text that can stimulate the model to produce an expected response.

[0052] According to an embodiment of the present disclosure, the question-answer information group may include question information and answer information corresponding to the question information. Exemplarily, the question information and the answer information may be in vector form. For example, the question-answer information group may include at least one question-answer pair (QA pair).

[0053] According to an embodiment of the present disclosure, a large language model can be used to process a source document to obtain a question-answer information group. For example, the large language model can mine at least one question-answer pair from the source document through semantic analysis, and the at least one question-answer pair can be used to generate training sample data for retrieving and generating the large model.

[0054] According to an embodiment of the present disclosure, a source document may be obtained from at least one data source, and the at least one data source may include, for example, a web page, a book, a database, a document, an API, etc. The source document may involve multiple fields such as finance, technology, education, medical treatment, and law, and the source document may include multiple formats such as text, pictures, charts, links, and codes.

[0055] According to the embodiments of the present disclosure, those skilled in the art can select appropriate data sources and source documents based on the actual application scenarios of the retrieval-generated large model to improve the matching degree between the training samples and the actual application scenarios of the model, thereby facilitating improving the accuracy of the model retrieval answers.

[0056] For example, in actual application scenarios, the retrieval and generation of large models mainly involves long-text questions and answers, and the question and answer content can include multiple formats such as text and pictures. By selecting corresponding data sources and source documents, the training sample data used to train the retrieval and generation of large models can include long-text training samples and multimodal training samples.

[0057] According to the embodiments of the present disclosure, by utilizing the source documents related to the actual application scenarios of the model processed by the large language model, question and answer information groups can be automatically mined, thereby supporting the construction of rich and diverse training sample data based on the question and answer information groups to meet the training needs of the retrieval generation of the large model, which is beneficial to improving the accuracy and precision of the retrieval generation of the large model.

[0058] According to an embodiment of the present disclosure, a preset knowledge base may include multiple knowledge fragments. As an example, the preset knowledge base may include a vector database, and multiple knowledge fragments matching the question information of the question information group may be determined from the preset knowledge base through vector matching. Exemplarily, raw knowledge data from multiple sources may be collected, and the raw knowledge data may be cleaned to remove noise, duplicates, and irrelevant information to obtain intermediate knowledge data. The intermediate knowledge data may be segmented into smaller fragments (chunks), and these fragments may be converted into vectors using a text embedding model, and these vectors may be stored in the preset knowledge base.

[0059] According to an embodiment of the present disclosure, the answer information of the question and answer information group and the multiple knowledge fragments can be respectively calculated for vector similarity to obtain the similarity between the answer information and the multiple knowledge fragments. The calculation method of vector similarity may include, for example, cosine similarity, Euclidean distance, Manhattan distance, etc., which are not specifically limited here.

[0060] According to an embodiment of the present disclosure, positive and negative sample knowledge fragments may include positive sample knowledge fragments and negative sample knowledge fragments. Positive sample knowledge fragments and negative sample knowledge fragments may be determined from multiple knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments. Exemplarily, the positive sample knowledge fragments may include knowledge fragments with a high similarity to the answer information, and the negative sample knowledge fragments may include knowledge fragments with a low similarity to the answer information. For example, positive sample knowledge fragments and negative sample knowledge fragments may be determined from multiple knowledge fragments based on a preset similarity threshold. For another example, multiple knowledge fragments may also be sorted based on the size of the similarity, and the top k knowledge fragments with the highest similarity ranking are determined as positive sample knowledge fragments, and the top n knowledge fragments with the lowest similarity ranking are determined as negative sample knowledge fragments.

[0061] According to an embodiment of the present disclosure, the positive and negative training samples may include positive training samples and negative training samples. Positive training samples for training the retrieval generation model may be generated based on the question-answer information group and the positive sample knowledge fragment. Negative training samples for training the retrieval generation model may be generated based on the question-answer information group and the negative sample knowledge fragment. The retrieval generation model may be trained based on the positive training samples and the negative training samples to obtain the trained retrieval generation model.

[0062] According to the embodiments of the present disclosure, in the field of artificial intelligence, the phenomenon of "hallucination" generally refers to the generation of untrue or inaccurate content by the model. For example, when generating text, a large model may introduce elements that cannot be verified, are inconsistent with the facts, or are irrelevant to the input information, such as fictitious facts, wrong details, or answers that are irrelevant to the input.

[0063] According to an embodiment of the present disclosure, positive training samples can be used to help the retrieval generation model learn key features and complex relationships, improve the model's understanding ability and generalization ability, etc., so as to ensure the accuracy of the content generated by the model. Negative training samples can be used to help the retrieval generation model learn to generate preset reply information when it is difficult to generate content, rather than generating fabricated or irrelevant information, so as to reduce the generation of erroneous information by the retrieval generation model, thereby reducing the illusion phenomenon of the model.

[0064] According to the embodiments of the present disclosure, by processing the source document based on the large language model to obtain the question and answer information group, the automatic construction of the question and answer information group can be realized, and the time for generating training data can be saved. By determining multiple knowledge fragments matching the question information from the preset knowledge base, and determining the positive and negative sample knowledge fragments from the multiple knowledge fragments according to the similarity with the answer information, it is possible to determine the negative sample knowledge fragments with low relevance to the answer information from the multiple knowledge fragments with high similarity to the question, thereby realizing fine-grained distinction of the relevance between the sample knowledge fragments and the question information and the answer information. By generating positive and negative training samples for training the retrieval generation large model based on the positive and negative sample knowledge fragments, the retrieval generation large model can learn the negative sample knowledge fragments with high similarity to the question information but not helpful for the answer information in a relatively fine-grained manner, so that the retrieval generation large model can reduce the interference of knowledge fragments irrelevant to the answer information, reduce the probability and amount of information contained in the retrieval answer output by the retrieval generation large model, reduce the hallucination interference of the retrieval generation large model in the reply process, and improve the retrieval answer accuracy of the retrieval generation large model.

[0065] According to an embodiment of the present disclosure, the above-mentioned similarity between the answer information of the question and answer information group and the knowledge fragments, determining the positive and negative sample knowledge fragments from multiple knowledge fragments includes: determining the positive sample knowledge fragments from multiple knowledge fragments whose similarity with the answer information is greater than or equal to a preset similarity threshold; and determining the negative sample knowledge fragments from multiple knowledge fragments whose similarity with the answer information is less than a preset similarity threshold.

[0066] As an example, the similarity between the answer information and each knowledge fragment can be calculated, and based on a preset similarity threshold, the knowledge fragment whose similarity with the answer information is greater than or equal to the preset similarity threshold can be determined as a positive sample knowledge fragment, and the knowledge fragment whose similarity with the answer information is less than the preset similarity threshold can be determined as a negative sample knowledge fragment. Exemplarily, those skilled in the art can set a reasonable preset similarity threshold according to actual needs or application scenarios, etc., and no specific limitation is made here.

[0067] According to the embodiments of the present disclosure, a positive sample knowledge fragment can be understood as a knowledge fragment that has a high correlation with the question information of the question and answer information group and a high correlation with the answer information of the question and answer information group. A negative sample knowledge fragment can be understood as a knowledge fragment that has a high correlation with the question information of the question and answer information group, but a low correlation with the answer information of the question and answer information group. Although the negative sample knowledge fragment has a high correlation with the question information, it is difficult for the retrieval generation model to generate true and accurate answer information based on the negative sample knowledge fragment.

[0068] According to the embodiments of the present disclosure, by determining positive and negative sample knowledge fragments from multiple knowledge fragments based on their similarity to the answer information, it is possible to determine negative sample knowledge fragments with low correlation with the answer information from multiple knowledge fragments with high similarity to the question, thereby achieving fine-grained distinction of the correlation between the sample knowledge fragments and the question information and the answer information, and then generating negative training samples based on the question and answer information group and the negative sample knowledge fragments, which can avoid the retrieval generation model from identifying all knowledge fragments similar to the question information as reference knowledge to perform the answer generation task, which is beneficial to reducing the illusion of the retrieval generation model and improving the accuracy of the content generated by the retrieval generation model.

[0069] According to an embodiment of the present disclosure, the above-mentioned generation of positive and negative training samples for training the retrieval generation large model based on the question and answer information group and the positive and negative sample knowledge fragments includes: taking the answer information as the positive label, and determining the positive training sample based on the positive sample knowledge fragment of at least one question and answer information group and the positive and negative sample knowledge fragments; and taking the preset reply information as the negative label, and determining the negative training sample based on at least one question information, preset reply information and the negative sample knowledge fragment of the positive and negative sample knowledge fragments, wherein the preset reply information characterizes that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation large model to process the question information.

[0070] According to an embodiment of the present disclosure, answer information may be used as a positive label, and a positive training sample may be determined based on at least one question and answer information group and a positive sample knowledge fragment of the positive and negative sample knowledge fragments.

[0071] According to an embodiment of the present disclosure, preset reply information may be used as a negative label, and a negative training sample may be determined based on at least one question information, preset reply information, and a negative sample knowledge fragment of the positive and negative sample knowledge fragments.

[0072] According to an embodiment of the present disclosure, the preset reply information can characterize that the negative sample knowledge fragment cannot be used as reference knowledge for retrieving and generating the large model to process the question information, and the preset reply information can be used to inform the user of the limitations of the large retrieval generation model in generating accurate answer information. Exemplarily, the preset reply information may include information characterizing a request for clarification, information characterizing an inability to generate, and the like. For example, the preset reply information may be set to "Not quite sure about your question. Can you provide more details?". For example, the preset reply information may be set to "Sorry, an accurate answer cannot be provided", "Sorry, no relevant answers were found", and the like.

[0073] According to the embodiments of the present disclosure, negative training samples can be used to reduce the interference of negative sample knowledge fragments on the retrieval generation model, so that the retrieval generation model can generate preset reply information when it is difficult to generate content, rather than generating fabricated or irrelevant information, thereby reducing the generation of erroneous information by the retrieval generation model, thereby reducing the illusion phenomenon of the model. Training the retrieval generation model with negative training samples can ensure that the answer content generated by the retrieval generation model is controllable, avoid generating erroneous information, thereby improving the reliability and accuracy of the retrieval generation model, and helping to improve the user experience.

[0074] According to the embodiments of the present disclosure, by generating positive and negative training samples for training the retrieval generation big model based on the positive and negative sample knowledge fragments, the retrieval generation big model can learn the negative sample knowledge fragments that have high similarity with the question information but are not helpful for the answer information in a relatively fine-grained manner, so that the retrieval generation big model can reduce the interference of knowledge fragments that are not related to the answer information, reduce the probability and amount of information contained in the retrieval answers output by the retrieval generation big model, reduce the hallucination interference of the retrieval generation big model in the reply process, and improve the retrieval answer accuracy of the retrieval generation big model.

[0075] According to an embodiment of the present disclosure, the above-mentioned use of a large language model to process a source document to obtain a question and answer information group includes: using a large language model to process a source document and question and answer attribute prompt words to obtain a question and answer information group.

[0076] According to an embodiment of the present disclosure, the question and answer attribute prompt word represents the question and answer requirement attribute of the question and answer information group.

[0077] According to an embodiment of the present disclosure, the question-and-answer requirement attributes may characterize the requirement intention for the format, scenario, and other attributes of the question-and-answer information group. As an example, the question-and-answer requirement attributes may include the complexity of the question information of the question-and-answer information group, the detail of the answer information of the question-and-answer information group, the format type of the question-and-answer information group, the knowledge domain of the question-and-answer information group, the question-and-answer scenario of the question-and-answer information group, the level of the question-and-answer information group, and the like. As another example, the question-and-answer requirement attributes may also include the information source of the source document, and the like.

[0078] According to an embodiment of the present disclosure, question and answer requirement attributes can be used to control a large language model to perform semantic processing tasks corresponding to the question and answer requirement attributes, so that the large language model can perform semantic processing tasks on source documents according to the question and answer requirement attributes to obtain a question and answer information group that meets the question and answer requirement attributes, thereby realizing the automatic construction of high-quality question and answer information groups and saving the time for generating training data.

[0079] According to the embodiments of the present disclosure, the question-answer attribute prompt words can represent the question-answer requirement attributes of the question-answer information group. The question-answer attribute prompt words can be used to control the large language model to automatically mine the question-answer information group that meets the question-answer requirement from the source document, so that a high-quality question-answer information group can be automatically constructed, and then it can support the construction of rich and diverse positive and negative training samples based on the question-answer information group to meet the training requirements of the retrieval generation large model, which is conducive to improving the accuracy and precision of the retrieval generation large model.

[0080] According to an embodiment of the present disclosure, the question and answer requirement attributes include at least one of the following: the question and answer scenario attribute of the question and answer information group; the knowledge domain type of the question and answer information group; the information format attribute of the answer information; the information detail level of the answer information; and the semantic complexity of the question information.

[0081] As an example, the information format attributes of the answer information may include any attribute information representing the information format, such as text, pictures, charts, links, codes, etc.

[0082] As an example, the information detail level of the answer information may include multiple detail levels, and the detail levels may indicate the number of data types, information volume, etc. contained in the corresponding answer information. For example, the first detail level may indicate concise answer information, and the concise answer information may only include the answer content. For another example, the second detail level may indicate complex answer information, and the complex answer information may include the answer, related examples, answer thinking path, knowledge reference path, etc.

[0083] As an example, the semantic complexity of question information may include simple, medium and complex. For example, a simple question may include what is the definition of XX, a medium question may include what are the main features of XX, and a complex question may include please analyze the role of XX in XXX.

[0084] As another example, the semantic complexity of the question information may include low complexity and high complexity. For example, low-complexity question information may only involve processing of one source document, and high-complexity question information may involve comprehensive processing of multiple source documents.

[0085] According to an embodiment of the present disclosure, the question-answer attribute prompt words may include a question-answer prompt template, which may be adjusted according to the specific document content and question-answer requirements to ensure that the large language model can accurately understand the mining task and generate question-answer pairs that meet the question-answer requirements. The following are some feasible examples of question-answer prompt templates:

[0086] As an example: Please extract question-answer pairs from the following document content and satisfy the following question-answer requirement attributes:

[0087] Document content: {document content}

[0088] Source: {Source of information, such as "academic paper", "news report", etc.}

[0089] Problem complexity: {easy / medium / complex}

[0090] Answer detail level: {concise / detailed}

[0091] Format type: {e.g. "text + picture", "list", "table", etc.}

[0092] Knowledge domain: {specify the domain, e.g. "history", "technology", "medicine", etc.}

[0093] Question and answer scenario: {Describe the application scenario, such as "classroom teaching", "scientific research discussion", etc.}

[0094] Question: {Please ask questions related to the document}

[0095] Answer: {Please provide answer based on the document}.

[0096] As another example: please generate multi-level question-answer pairs based on the following text content and satisfy the following question-answering requirement properties:

[0097] Text content: {document content}

[0098] Information source: {Information source}

[0099] Problem complexity: {low / high}

[0100] Answer detail level: {answer only / answer + thinking path + knowledge reference path}

[0101] Format type: {such as "short sentence", "long paragraph", "chart", etc.}

[0102] Knowledge area: {such as "economics", "artificial intelligence", etc.}

[0103] Question and answer scenarios: {such as "customer consultation", "product description", etc.}

[0104] Context description: {Describe the context or target audience}

[0105] Initial question: {Please ask a related question}

[0106] Initial Answer: {Please provide an initial answer}

[0107] Follow-up questions: {predict the user's possible follow-up questions}

[0108] Follow-up answer: {provide corresponding detailed answer}.

[0109] According to an embodiment of the present disclosure, the large model-based training sample generation method further includes: responding to a target request and determining a question and answer attribute prompt word according to demand information carried in the target request.

[0110] According to one embodiment of the present disclosure, the target request can be determined based on the user's interactive operation. For example, the user can perform option filtering interactive operations or command input operations in the interactive interface to obtain demand information. The demand information is sent to the sample data construction platform to facilitate parsing of the demand information carried by the target request. As an example, the sample data construction platform can display question and answer demand attribute filtering items and / or command input boxes through the interactive interface. For example, question and answer demand attributes such as the complexity of question information and the level of detail of answer information can be determined on the sample data construction platform through a drop-down menu, radio button or check box, so as to automatically construct the demand information. For example, attribute parameters representing the question and answer demand attributes can be input through the command input box on the sample data construction platform, so as to automatically construct the demand information.

[0111] According to an embodiment of the present disclosure, demand information can be extracted based on natural language descriptions through natural language understanding algorithms such as keyword extraction. As an example, demand information can include natural language information, such as a query input by a user into a large language model. The large language model can be used to process the query to perform question-and-answer demand intent recognition, and obtain information related to question-and-answer demand attributes, so that question-and-answer attribute prompt words can be constructed based on the information related to the question-and-answer demand attributes.

[0112] According to an embodiment of the present disclosure, the above-mentioned determining the question and answer attribute prompt words according to the demand information carried in the target request includes: using a large language model to process the demand information to obtain the question and answer attribute prompt words.

[0113] According to an embodiment of the present disclosure, the demand information may be natural language description information. For example, the demand information may be "Please generate criteria based on the complexity of the question, the detail of the answer, and the field of the question and answer pair, and generate a prompt word template for mining question and answer pairs from the source document." The demand information may be input into a large language model to obtain question and answer attribute prompt words output by the large language model.

[0114] According to the embodiments of the present disclosure, by processing demand information through a large language model, the relatively powerful feature understanding and expression capabilities of the large language model can be brought into play, and efficient processing of large-scale demand information can be achieved, thereby improving the accuracy of question and answer attribute prompt words and the generation efficiency of question and answer attribute prompt words.

[0115] According to an embodiment of the present disclosure, the above-mentioned use of a large language model to process source documents and question and answer attribute prompt words to obtain a question and answer information group includes: using a large language model to process source documents and question and answer attribute prompt words to obtain an initial question and answer information group; updating the question and answer attribute prompt words based on an attribute evaluation result to obtain an updated question and answer attribute prompt word, wherein the attribute evaluation result is obtained by evaluating the initial question and answer information group according to question and answer requirement attributes; and using a large language model to process source documents and updated question and answer attribute prompt words to obtain a question and answer information group.

[0116] According to an embodiment of the present disclosure, a large language model can be used to process source documents and question-answer attribute prompt words to obtain an initial question-answer information group, which may include initial question information and initial answer information.

[0117] According to an embodiment of the present disclosure, a large language model can be used to evaluate the initial question and answer information group to obtain an attribute evaluation result. The attribute evaluation result can characterize the quality of the initial question and answer information group, for example, characterize whether the initial question and answer information group meets the question and answer requirement attribute.

[0118] As an example, when the attribute evaluation result indicates that the initial question and answer information group meets the question and answer requirement attribute, the initial question and answer information group is determined as the question and answer information group.

[0119] As another example, when the attribute evaluation result indicates that the initial question-answer information group does not meet the question-answer requirement attributes, the question-answer attribute prompt words can be updated based on the attribute evaluation result to obtain updated question-answer attribute prompt words. The updated question-answer attribute prompt words can guide the large language model to generate question-answer attribute prompt words that better meet the question-answer requirement attributes, and the large language model can be used to process the source document and the updated question-answer attribute prompt words to obtain the question-answer information group.

[0120] According to an embodiment of the present disclosure, data cleaning may also be performed on the question and answer information group to remove noise, duplicate items, and irrelevant information in the question and answer information group to ensure the quality and accuracy of the question and answer information group.

[0121] According to an embodiment of the present disclosure, the above-mentioned updating of question and answer attribute prompt words based on attribute evaluation results includes: updating question and answer attribute prompt words based on attribute defect assessment information of the attribute evaluation results to obtain updated question and answer attribute prompt words, wherein the attribute defect assessment information characterizes the defect of the initial question and answer requirement attributes of the initial question and answer information group relative to the question and answer requirement attributes.

[0122] According to an embodiment of the present disclosure, the attribute evaluation result may include attribute defect evaluation information, and the attribute evaluation information may characterize the defects of the initial question and answer requirement attributes of the initial question and answer information group relative to the question and answer requirement attributes. For example, the attribute evaluation information may include that the initial answer information of the initial question and answer information group does not meet the detail level requirement, the initial question and answer information group lacks information of the image type, and the initial question information and initial answer information of the initial question and answer information group are semantically inconsistent.

[0123] According to an embodiment of the present disclosure, question and answer attribute prompt words can be updated based on the attribute defect assessment information of the attribute assessment result to obtain updated question and answer attribute prompt words, so that the updated question and answer attribute prompt words can guide the large language model to generate question and answer attribute prompt words that better meet the question and answer requirement attributes, thereby ensuring the quality of the question and answer information group.

[0124] According to an embodiment of the present disclosure, the attribute defect assessment information includes question and answer semantic defect information, and the question and answer semantic defect information characterizes that the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group does not meet the preset semantic similarity condition; wherein, the question and answer semantic defect information is determined by processing the initial question and answer information group and at least one question and answer requirement attribute using a large language model.

[0125] According to an embodiment of the present disclosure, the attribute defect assessment information may include question-answer semantic defect information, and the question-answer semantic defect information may characterize the logical inconsistency between the initial question information and the initial answer information in the initial question-answer information group. As an example, the initial question-answer information group and at least one question-answer requirement attribute may be processed using a large language model to determine the question-answer semantic defect information.

[0126] According to an embodiment of the present disclosure, question and answer semantic defect information can characterize that the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group does not satisfy a preset semantic similarity condition. Exemplarily, the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group can be calculated, and the aforementioned failure to satisfy the preset semantic similarity condition can include that the semantic similarity between the initial question information and the initial answer information is less than a preset semantic similarity threshold. It should be noted that those skilled in the art can set a reasonable preset semantic similarity threshold according to actual needs or application scenarios, etc., and no specific limitation is made here.

[0127] Figure 3 The figure schematically shows a process diagram of generating training samples based on a large model according to an embodiment of the present disclosure.

[0128] like Figure 3 As shown, data can be obtained from at least one data source 301 , and data preprocessing operations such as parsing, segmentation, and format processing can be performed on the obtained data to obtain a source document 302 .

[0129] Exemplarily, the large language model 303 can be used to process the demand information to obtain the question and answer attribute prompt words 304. The question and answer attribute prompt words 304 can represent the question and answer demand attributes 305, and the question and answer demand attributes 305 can include question and answer scenario attributes, knowledge domain types, ... information format attributes. The source document 302 and the question and answer attribute prompt words 304 can be used to guide the large language model 303 to generate an initial question and answer information group. For example, the large language model 303 can be used to process the source document 302 and the question and answer attribute prompt words 304 to obtain the initial question and answer information group.

[0130] Exemplarily, the large language model 303 may be used to evaluate the initial question and answer information group to obtain an attribute evaluation result 306. The attribute evaluation result 306 may characterize the format of the initial question and answer information group, the semantic consistency between the initial question information and the initial answer information, the accuracy of the initial answer information, etc. Based on the attribute evaluation result 306 and the question and answer attribute prompt words 304, the large language model 303 may be used to iteratively update the question and answer attribute prompt words 304 to obtain updated question attribute prompt words 304. The large language model 303 may be used to process the source document 302 and the updated question and answer attribute prompt words 304 to obtain a question and answer information group 307.

[0131] Exemplarily, the question and answer information group 307 may include question information 307_1 and answer information 307_2, and multiple knowledge fragments 309 matching the question information 307_1 of the question and answer information group 307 may be determined from the preset knowledge base 308. Based on the similarity between the answer information 307_2 of the question and answer information group and the knowledge fragment 309, positive and negative sample knowledge fragments 310 may be determined from the multiple knowledge fragments 309. Based on the question and answer information group 307 and the positive and negative sample knowledge fragments 310, positive and negative training samples 311 for training the retrieval generation large model may be generated.

[0132] Figure 4 The flowchart of the training method of the retrieval generation large model according to the embodiment of the present disclosure is schematically shown.

[0133] like Figure 4 As shown, the method 400 includes operations S410-S420.

[0134] In operation S410, positive and negative training samples are obtained, where the positive and negative training samples are generated according to the above-mentioned large model-based training sample generation method.

[0135] In operation S420, the retrieval generation large model is trained according to the positive and negative training samples to obtain a trained retrieval generation large model.

[0136] According to an embodiment of the present disclosure, positive and negative training samples generated according to the above-mentioned large model-based training sample generation method can be obtained, and the positive and negative training samples can include positive training samples and negative training samples. The large model for retrieval generation can be trained based on the positive training samples and the negative training samples to obtain the trained large model for retrieval generation.

[0137] According to the embodiments of the present disclosure, positive and negative training samples are generated based on positive and negative sample knowledge fragments. The positive and negative training samples can enable the retrieval generation model to learn negative sample knowledge fragments that are highly similar to the question information but are not helpful for the answer information in a relatively fine-grained manner, so that the retrieval generation model can reduce the interference of knowledge fragments that are irrelevant to the answer information, reduce the probability and amount of information contained in the retrieval answers output by the retrieval generation model, reduce the hallucination interference of the retrieval generation model in the reply process, and improve the retrieval answer accuracy of the retrieval generation model.

[0138] According to an embodiment of the present disclosure, the positive and negative training samples include positive training samples and negative training samples. The above-mentioned training and retrieving a large model based on the positive and negative training samples includes: taking the answer information of the positive training sample as a positive label, and training and retrieving a large model based on at least one question and answer information group and at least one positive sample knowledge fragment of the positive training sample; and taking the preset reply information of the negative training sample as a negative label, and training and retrieving a large model based on at least one question information, at least one negative sample knowledge fragment and preset reply information of the negative training sample, wherein the preset reply information represents that the negative sample knowledge fragment cannot be used as reference knowledge for retrieving and generating a large model to process question information.

[0139] In one example, at least one question-answer information group and at least one positive sample knowledge fragment of a positive training sample can be input as training data into a retrieval generation model to be trained, and first sample answer information is output. The first sample answer information and the answer information of the positive training sample are processed based on a loss function to obtain a positive sample loss value. The parameters of the retrieval generation model are fine-tuned based on the positive sample loss value to train the retrieval generation model.

[0140] In one example, at least one question-answer information group and at least one negative sample knowledge fragment of a negative training sample can be input as training data into a large retrieval generation model to be trained, and second sample answer information is output. The second sample answer information and the preset reply information are processed based on a loss function to obtain a negative sample loss value. The parameters of the large retrieval generation model are fine-tuned based on the negative sample loss value to train the large retrieval generation model.

[0141] Figure 5 A schematic diagram of the training process of a large retrieval generation model according to an embodiment of the present disclosure is exemplified.

[0142] like Figure 5 As shown, in the first training stage, at least one question-answer information group 501 and at least one positive sample knowledge fragment 502 of the positive training sample can be input into the first candidate retrieval generation large model M510 to obtain a first sample answer 503. A first loss function value 505 can be determined based on the first sample answer 503 and the answer information 504 of the positive training sample. The model parameters of the first candidate retrieval generation large model M510 can be adjusted according to the first loss function value 505 until a predetermined end condition is met, thereby obtaining a second candidate retrieval generation large model M520.

[0143] like Figure 5 As shown, in the second training stage, at least one question information 506 and at least one negative sample knowledge fragment 507 of the negative training sample can be input into the second candidate retrieval generation model M520 to obtain a second sample answer 508. The second loss function value 510 can be determined based on the second sample answer 508 and the preset reply information 509. The model parameters of the second candidate retrieval generation model M520 can be adjusted according to the second loss function value 510 until the predetermined end condition is met, and the retrieval generation model M530 is obtained.

[0144] It should be noted that the above is only an exemplary embodiment, and the embodiments of the present disclosure do not specifically limit the training order and training method of positive training samples and negative training samples. For example, a large model can be generated based on negative training sample training retrieval in the first training stage, and a large model can be generated based on positive training sample training retrieval in the second training stage. For example, a large model can also be generated based on positive training sample and negative training sample training retrieval according to a preset training order, and the preset training order can include positive training samples and negative training samples performing model training tasks in a cross order.

[0145] Figure 6 The flowchart of the large model-based retrieval method according to an embodiment of the present disclosure is schematically shown.

[0146] like Figure 6 As shown, the method 600 includes operations S610 to S630.

[0147] In operation S610, a retrieval request is obtained.

[0148] In operation S620, in response to a retrieval request, the trained retrieval generation model is used to process retrieval question information and target knowledge fragments related to the retrieval request to obtain retrieval answer information, wherein the trained retrieval generation model is determined according to the above-mentioned training method of the retrieval generation model.

[0149] In operation S630, the search answer information is displayed on the interactive interface.

[0150] According to an embodiment of the present disclosure, a search request may come from a user, for example, a user may initiate a search request through an interactive interface. In response to the search request from the user, the trained search generation model may be used to process the search question information and target knowledge fragments related to the search request to obtain search answer information. The search answer information may be displayed on the interactive interface to feed back the search answer information to the user.

[0151] According to an embodiment of the present disclosure, the search question information may represent the search intent of the search request. The target knowledge fragment is related to the search question information, and the target knowledge fragment may be retrieved from an external knowledge base and / or a preset question and answer information group set, for example.

[0152] Figure 7 The schematic diagram shows a principle diagram of a large model-based retrieval method according to an embodiment of the present disclosure.

[0153] like Figure 7 As shown, the retrieval generation model 701 may include a retrieval module 701_1 and a generation module 701_2. Exemplarily, a retrieval request from a user may be obtained, and in response to the retrieval request, retrieval question information 702 related to the retrieval request may be input into the retrieval module 701_1 of the retrieval generation model 701, so that a target knowledge fragment 705 may be retrieved from an external knowledge base 703 and / or a preset question and answer information group set 704. It should be noted that the retrieval module 701_1 may be constructed based on a semantic vector retrieval algorithm, and the generation module 701_2 may be constructed based on a large model with a larger model parameter scale.

[0154] like Figure 7 As shown, prompt information 706 can be determined according to the retrieval question information 702 and the target knowledge fragment 705, and the prompt information 706 can be input into the generation module 701_2 of the retrieval generation large model 701 to obtain retrieval answer information 707. The retrieval answer information 707 can be displayed on the interactive interface, so that the retrieval answer information 707 can be fed back to the user. Exemplarily, the generation module 701_2 of the retrieval generation large model 701 can include a large language model.

[0155] Figure 8 A block diagram of a large model-based training sample generation device according to an embodiment of the present disclosure is schematically shown.

[0156] like Figure 8 As shown, the large model-based training sample generation device 800 may include a processing module 810 , a first determination module 820 and a generation module 830 .

[0157] A processing module 810 is used to process the source document using the large language model to obtain a question-answer information group;

[0158] The first determination module is used to determine a plurality of knowledge fragments matching the question information of the question and answer information group from a preset knowledge base.

[0159] The second determination module 820 is used to determine positive and negative sample knowledge fragments from multiple knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments.

[0160] The generation module 830 is used to generate positive and negative training samples for training the retrieval generation large model based on the question and answer information group and the positive and negative sample knowledge fragments.

[0161] According to an embodiment of the present disclosure, the second determination module may include a positive sample knowledge segment determination submodule and a negative sample knowledge segment determination submodule.

[0162] The positive sample knowledge fragment determination submodule is used to determine, from multiple knowledge fragments, positive sample knowledge fragments whose similarity with the answer information is greater than or equal to a preset similarity threshold.

[0163] The negative sample knowledge fragment determination submodule is used to determine, from multiple knowledge fragments, negative sample knowledge fragments whose similarity with the answer information is less than a preset similarity threshold.

[0164] According to an embodiment of the present disclosure, the second determination module may include a positive training sample determination submodule and a negative training sample determination submodule.

[0165] The positive training sample determination submodule is used to use the answer information as a positive label and determine the positive training sample according to at least one question and answer information group and the positive sample knowledge fragment of the positive and negative sample knowledge fragments.

[0166] The negative training sample determination submodule is used to use preset response information as a negative label and determine negative training samples based on at least one question information, preset response information and a negative sample knowledge fragment of the positive and negative sample knowledge fragments, wherein the preset response information represents that the negative sample knowledge fragment cannot be used as reference knowledge for retrieving and generating a large model to process question information.

[0167] According to an embodiment of the present disclosure, the processing module may include a question and answer information group determination submodule.

[0168] The question and answer information group determination submodule is used to use a large language model to process the source document and question and answer attribute prompt words to obtain a question and answer information group, wherein the question and answer attribute prompt words represent the question and answer requirement attributes of the question and answer information group.

[0169] According to an embodiment of the present disclosure, the question-answering requirement attribute includes at least one of the following: a question-answering scenario attribute of the question-answering information group; a knowledge domain type of the question-answering information group; an information format attribute of the answer information;

[0170] The level of detail of the answer information; the semantic complexity of the question information.

[0171] According to an embodiment of the present disclosure, the large model-based training sample generation device 800 may further include a third determination module.

[0172] The third determination module is used to respond to the target request and determine the question and answer attribute prompt word according to the demand information carried in the target request.

[0173] According to an embodiment of the present disclosure, the third determination module may include a demand information processing submodule.

[0174] The demand information processing submodule is used to process the demand information using a large language model to obtain question and answer attribute prompt words.

[0175] According to an embodiment of the present disclosure, the question and answer information group determination submodule may include an initial question and answer information group determination unit, a prompt word updating unit and a question and answer information group determination unit.

[0176] The initial question and answer information group determination unit is used to use the large language model to process the source document and the question and answer attribute prompt words to obtain the initial question and answer information group.

[0177] The prompt word updating unit is used to update the question and answer attribute prompt words based on the attribute evaluation result to obtain updated question and answer attribute prompt words, wherein the attribute evaluation result is obtained by evaluating the initial question and answer information group according to the question and answer requirement attributes.

[0178] The question and answer information group determination unit is used to use the large language model to process the source document and the updated question and answer attribute prompt words to obtain the question and answer information group.

[0179] According to an embodiment of the present disclosure, the prompt word updating unit may include an updating subunit.

[0180] The updating subunit is used to update the question and answer attribute prompt words based on the attribute defect evaluation information of the attribute evaluation result to obtain updated question and answer attribute prompt words, wherein the attribute defect evaluation information represents the defect of the initial question and answer requirement attribute of the initial question and answer information group relative to the question and answer requirement attribute.

[0181] According to an embodiment of the present disclosure, the attribute defect assessment information includes question and answer semantic defect information, and the question and answer semantic defect information characterizes that the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group does not meet the preset semantic similarity condition; wherein, the question and answer semantic defect information is determined by processing the initial question and answer information group and at least one question and answer requirement attribute using a large language model.

[0182] It should be noted that the part of the training sample generation device based on the large model in the embodiment of the present disclosure corresponds to the part of the training sample generation method based on the large model in the embodiment of the present disclosure. The description of the part of the training sample generation device based on the large model specifically refers to the part of the training sample generation method based on the large model, which will not be repeated here.

[0183] Fig. 9 A block diagram of a training device for retrieving and generating a large model according to an embodiment of the present disclosure is schematically shown.

[0184] like Fig. 9 As shown, the training device 900 for retrieving and generating a large model may include an acquisition module 910 and a training module 920.

[0185] The acquisition module 910 is used to acquire positive and negative training samples, where the positive and negative training samples are generated according to the above-mentioned large model-based training sample generation method.

[0186] The training module 920 is used to train the retrieval generation large model according to the positive and negative training samples to obtain the trained retrieval generation large model.

[0187] According to an embodiment of the present disclosure, the training module 920 may include a first training submodule and a second training submodule.

[0188] The first training submodule is used to use the answer information of the positive training sample as a positive label, and train the retrieval generation large model according to at least one question and answer information group and at least one positive sample knowledge fragment of the positive training sample.

[0189] The second training submodule is used to use the preset response information of the negative training sample as a negative label, and train the retrieval generation model according to at least one question information of the negative training sample, at least one negative sample knowledge fragment and the preset response information, wherein the preset response information represents that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation model to process the question information.

[0190] It should be noted that the training device for retrieving and generating a large model in the embodiments of the present disclosure corresponds to the training method for retrieving and generating a large model in the embodiments of the present disclosure. The description of the training device for retrieving and generating a large model specifically refers to the training method for retrieving and generating a large model, which will not be repeated here.

[0191] Fig.10 A block diagram of a large model-based retrieval device according to an embodiment of the present disclosure is schematically shown.

[0192] like Fig.10As shown, the large model-based retrieval device 1000 may include a retrieval request acquisition module 1010 , a retrieval module 1020 and a display module 1030 .

[0193] The search request acquisition module 1010 is used to acquire a search request.

[0194] The retrieval module 1020 is used to respond to the retrieval request and use the trained retrieval generation model to process the retrieval question information and target knowledge fragments related to the retrieval request to obtain the retrieval answer information, wherein the trained retrieval generation model is determined according to the above-mentioned training method of the retrieval generation model.

[0195] The display module 1030 is used to display the search answer information on the interactive interface.

[0196] It should be noted that the retrieval device part based on the big model in the embodiment of the present disclosure corresponds to the retrieval method part based on the big model in the embodiment of the present disclosure. The description of the retrieval device part based on the big model specifically refers to the retrieval method part based on the big model, which will not be repeated here.

[0197] An embodiment of the present disclosure also provides an AI (Artificial Intelligence) agent configured to execute the large model-based text processing method as described above.

[0198] Fig.11 The structural block diagram of an artificial intelligence agent according to an embodiment of the present disclosure is schematically shown.

[0199] In the embodiments of the present disclosure, Fig.11 As shown, the AI ​​agent 1100 may include an input module 1110 , a processing module 1120 , and an output module 1130 .

[0200] The input module 1110 is used to receive input information.

[0201] The processing module 1120 is used to determine the target task based on the input information received by the input module, determine the large language model or retrieve and generate the large model based on the target task, and execute the above-mentioned large model-based retrieval method by calling the retrieved large model to obtain output information.

[0202] The output module 1130 is used to output the output information obtained by the processing module.

[0203] According to an embodiment of the present disclosure, the input module 1110 is responsible for receiving or sensing information such as queries, requests, instructions, signals or data from the outside world (e.g., users or external environment), and converting them into a format that can be understood and processed by the AI ​​agent 1100. The input module 1110 is the primary link for the AI ​​agent 1100 to interact with the outside world, which enables the AI ​​agent 1100 to efficiently and accurately obtain the necessary "sensory" information from the outside world and respond to this information.

[0204] In an example, the input module 1110 may input the source document or the search request described above.

[0205] In the example, the processing module 1120 is the core support for the AI ​​agent 1100 to process complex tasks. The processing module 1120 can execute the training sample generation method based on the large model, the training method for retrieving and generating the large model, and the retrieval method based on the large model described above.

[0206] In the example, the performance of the processing module 1120 may be closely related to the large model on which the AI ​​agent 1100 is based. In order to give full play to the capabilities of the large model, the internal structure of the processing module 1120 may be designed to be highly configurable and scalable to cope with various types of tasks and requirements in real scenarios.

[0207] In the example, after the AI ​​agent 1100 obtains the source document, the processing module 1120 can process the source document to obtain the question and answer information group. The processing module 1120 can retrieve multiple knowledge fragments that match the question information of the question and answer information group from the preset knowledge base. Then, the processing module 1120 can use the similarity between the multiple knowledge fragments and the answer information of the question and answer information group to determine the positive and negative sample knowledge fragments, and then determine the positive and negative training samples, and pass the positive and negative training samples to the output module 1130.

[0208] In the example, after the AI ​​agent 1100 obtains a retrieval request, the processing module 1120 can use the trained retrieval generation model to process the retrieval question information and target knowledge fragments related to the retrieval request, obtain retrieval answer information, and pass the retrieval answer information to the output module 1130.

[0209] It is understandable that although the large language model has excellent language understanding and generation capabilities, it is just like a human being and can only solve very limited tasks without any tools. When the AI ​​agent 1100 is endowed with the ability to call tools, it can perform tasks such as using a calculator to perform mathematical operations, using Python to perform data analysis, and using a search engine to perform weather forecasts.

[0210] In an example, the output module 1130 may output the positive and negative training samples or the retrieved answer information described above.

[0211] The AI ​​agent 1100 according to the embodiment of the present disclosure can simply and effectively improve the level of intelligence, and improve flexibility and versatility.

[0212] It should be noted that the large model involved in the embodiments of the present disclosure can be a large language model or a large model generated by retrieval, which will not be described in detail here.

[0213] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0214] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.

[0215] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method as described above.

[0216] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the method as described above.

[0217] Fig.12 A schematic block diagram of an example electronic device 1200 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0218] like Fig.12As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0219] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0220] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as a training sample generation method based on a large model, a training method for retrieving and generating a large model, and a retrieval method based on a large model. For example, in some embodiments, a training sample generation method based on a large model, a training method for retrieving and generating a large model, and a retrieval method based on a large model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the training sample generation method based on the large model, the training method for retrieving and generating the large model, and the retrieval method based on the large model described above may be executed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute the training sample generation method based on the large model, the training method for retrieving and generating the large model, and the retrieval method based on the large model in any other appropriate manner (for example, by means of firmware).

[0221] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0222] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0223] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.

[0224] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0225] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0226] A computer system may include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises through computer programs running on respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server combined with a blockchain.

[0227] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0228] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating training samples based on a large model, comprising: Use a large language model to process the source document to obtain a question-answer information group; Determining, from a preset knowledge base, a plurality of knowledge fragments matching the question information of the question-answer information group; Based on the similarity between the answer information of the question and answer information group and the knowledge fragments, determining positive and negative sample knowledge fragments from the plurality of knowledge fragments; as well as Based on the question-answer information group and the positive and negative sample knowledge fragments, positive and negative training samples are generated for training the retrieval generation large model.

2. The method according to claim 1, wherein: The determining of positive and negative sample knowledge fragments from a plurality of the knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments comprises: Determine, from the plurality of the knowledge fragments, a positive sample knowledge fragment whose similarity to the answer information is greater than or equal to a preset similarity threshold; and A negative sample knowledge fragment whose similarity with the answer information is less than a preset similarity threshold is determined from the multiple knowledge fragments.

3. The method according to claim 1 or 2, wherein: The step of generating positive and negative training samples for training the retrieval generation model based on the question and answer information group and the positive and negative sample knowledge fragments includes: Taking the answer information as a positive label, determining a positive training sample according to at least one of the question and answer information groups and a positive sample knowledge fragment of the positive and negative sample knowledge fragments; and The preset reply information is used as a negative label, and a negative training sample is determined based on at least one of the question information, the preset reply information, and a negative sample knowledge fragment of the positive and negative sample knowledge fragments, wherein the preset reply information characterizes that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation large model to process the question information.

4. The method according to claim 1, wherein: The method of using the large language model to process the source document to obtain the question-answer information group includes: The source document and question-answer attribute prompt words are processed by using a large language model to obtain the question-answer information group, wherein the question-answer attribute prompt words represent question-answer requirement attributes for the question-answer information group.

5. The method according to claim 4, wherein: The question-and-answer requirement attributes include at least one of the following: Question and answer scenario attributes of the question and answer information group; The knowledge domain type of the question and answer information group; Information format attributes of the answer information; the level of detail of the answer information; The semantic complexity of the question information.

6. The method according to claim 4, further comprising: In response to the target request, the question and answer attribute prompt word is determined according to the demand information carried in the target request.

7. The method according to claim 6, wherein: The determining, according to the requirement information carried by the target request, the question-answer attribute prompt word comprises: The demand information is processed using the large language model to obtain the question and answer attribute prompt words.

8. The method according to any one of claims 4 to 7, wherein: The method of using a large language model to process the source document and the question-answer attribute prompt words to obtain the question-answer information group includes: Processing the source document and the question-answer attribute prompt words using the large language model to obtain an initial question-answer information group; updating the question and answer attribute prompt words based on the attribute evaluation result to obtain updated question and answer attribute prompt words, wherein the attribute evaluation result is obtained by evaluating the initial question and answer information group according to the question and answer requirement attribute; and The source document and the updated question and answer attribute prompt words are processed using the large language model to obtain the question and answer information group.

9. The method according to claim 8, wherein: The updating of the question and answer attribute prompt words based on the attribute evaluation result includes: The question and answer attribute prompt word is updated based on the attribute defect assessment information of the attribute assessment result to obtain an updated question and answer attribute prompt word, wherein the attribute defect assessment information represents the defect of the initial question and answer requirement attribute of the initial question and answer information group relative to the question and answer requirement attribute.

10. The method according to claim 9, wherein: The attribute defect evaluation information includes question and answer semantic defect information, wherein the question and answer semantic defect information indicates that the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group does not meet a preset semantic similarity condition; The question and answer semantic defect information is determined by processing the initial question and answer information group and at least one of the question and answer requirement attributes using the large language model.

11. A training method for retrieving and generating a large model, comprising: Obtaining positive and negative training samples, wherein the positive and negative training samples are generated by the method according to any one of claims 1 to 10; as well as The large retrieval generation model is trained according to the positive and negative training samples to obtain a trained large retrieval generation model.

12. The method according to claim 11, wherein: The positive and negative training samples include positive training samples and negative training samples. Wherein, the training and retrieving and generating a large model according to the positive and negative training samples comprises: Using the answer information of the positive training sample as a positive label, training the retrieval generation model according to at least one question-answer information group and at least one positive sample knowledge fragment of the positive training sample; and The preset response information of the negative training sample is used as a negative label, and the retrieval generation model is trained according to at least one question information of the negative training sample, at least one negative sample knowledge fragment and the preset response information, wherein the preset response information represents that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation model to process the question information.

13. A retrieval method based on a large model, comprising: Get the retrieval request; In response to the retrieval request, using the trained retrieval generation macromodel to process the retrieval question information and the target knowledge fragment related to the retrieval request to obtain retrieval answer information, wherein the trained retrieval generation macromodel is determined according to the training method according to claim 11 or 12; and The search answer information is displayed on an interactive interface.

14. A training sample generation device based on a large model, comprising: A processing module, used for processing the source document using a large language model to obtain a question-answer information group; A first determination module is used to determine a plurality of knowledge fragments matching the question information of the question and answer information group from a preset knowledge base; A second determination module is used to determine positive and negative sample knowledge fragments from a plurality of the knowledge fragments based on the similarity between the answer information of the question and answer information group and the knowledge fragments; as well as A generation module is used to generate positive and negative training samples for training the retrieval generation large model based on the question and answer information group and the positive and negative sample knowledge fragments.

15. The device according to claim 14, wherein: The second determining module comprises: a positive sample knowledge fragment determination submodule, configured to determine, from the plurality of the knowledge fragments, a positive sample knowledge fragment whose similarity to the answer information is greater than or equal to a preset similarity threshold; and The negative sample knowledge fragment determination submodule is used to determine, from the multiple knowledge fragments, negative sample knowledge fragments whose similarity with the answer information is less than a preset similarity threshold.

16. The device according to claim 14 or 15, wherein: The second determining module comprises: a positive training sample determination submodule, configured to use the answer information as a positive label and determine a positive training sample according to at least one of the question and answer information groups and a positive sample knowledge fragment of the positive and negative sample knowledge fragments; and The negative training sample determination submodule is used to use preset response information as a negative label, and determine negative training samples based on at least one of the question information, the preset response information, and a negative sample knowledge fragment of the positive and negative sample knowledge fragments, wherein the preset response information characterizes that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation large model to process the question information.

17. The device according to claim 14, wherein: The processing module comprises: The question and answer information group determination submodule is used to use a large language model to process the source document and question and answer attribute prompt words to obtain the question and answer information group, wherein the question and answer attribute prompt words represent the question and answer requirement attributes of the question and answer information group.

18. The device according to claim 17, wherein: The question-and-answer requirement attributes include at least one of the following: Question and answer scenario attributes of the question and answer information group; The knowledge domain type of the question and answer information group; Information format attributes of the answer information; the level of detail of the answer information; The semantic complexity of the question information.

19. The device according to claim 17, wherein the large model-based training sample generating device further comprises: The third determination module is used to respond to the target request and determine the question and answer attribute prompt word according to the demand information carried in the target request.

20. The device according to claim 19, wherein The third determination module comprises: The demand information processing submodule is used to process the demand information using the large language model to obtain the question and answer attribute prompt words.

21. The device according to any one of claims 17 to 20, wherein: The question and answer information group determination submodule includes: an initial question and answer information group determination unit, configured to process the source document and the question and answer attribute prompt words using the large language model to obtain an initial question and answer information group; a prompt word updating unit, configured to update the question and answer attribute prompt words based on an attribute evaluation result to obtain updated question and answer attribute prompt words, wherein the attribute evaluation result is obtained by evaluating the initial question and answer information group according to the question and answer requirement attribute; and The question and answer information group determination unit is used to process the source document and the updated question and answer attribute prompt words using the large language model to obtain the question and answer information group.

22. The device according to claim 21, wherein The prompt word updating unit comprises: An updating subunit is used to update the question and answer attribute prompt words based on the attribute defect assessment information of the attribute assessment result to obtain updated question and answer attribute prompt words, wherein the attribute defect assessment information represents the defect of the initial question and answer requirement attribute of the initial question and answer information group relative to the question and answer requirement attribute.

23. The device according to claim 22, wherein: The attribute defect evaluation information includes question and answer semantic defect information, wherein the question and answer semantic defect information indicates that the semantic similarity between the initial question information and the initial answer information in the initial question and answer information group does not meet a preset semantic similarity condition; The question and answer semantic defect information is determined by processing the initial question and answer information group and at least one of the question and answer requirement attributes using the large language model.

24. A training device for retrieving and generating a large model, comprising: An acquisition module, used for acquiring positive and negative training samples, wherein the positive and negative training samples are generated by the method according to any one of claims 1 to 10; as well as The training module is used to train the retrieval generation large model according to the positive and negative training samples to obtain the trained retrieval generation large model.

25. The device according to claim 24, wherein: The positive and negative training samples include positive training samples and negative training samples. Wherein, the training module includes: A first training submodule is configured to use the answer information of the positive training sample as a positive label, and train the retrieval generation large model according to at least one question and answer information group and at least one positive sample knowledge fragment of the positive training sample; and The second training submodule is used to use the preset response information of the negative training sample as a negative label, and train the retrieval generation model according to at least one question information of the negative training sample, at least one negative sample knowledge fragment and the preset response information, wherein the preset response information represents that the negative sample knowledge fragment cannot be used as reference knowledge for the retrieval generation model to process the question information.

26. A retrieval device based on a large model, comprising: A retrieval request acquisition module, used to acquire a retrieval request; A retrieval module, configured to respond to a retrieval request and use a trained retrieval generation macromodel to process retrieval question information and target knowledge fragments related to the retrieval request to obtain retrieval answer information, wherein the trained retrieval generation macromodel is determined according to the training method according to claim 11 or 12; as well as A display module is used to display the search answer information on an interactive interface.

27. An artificial intelligence agent, comprising: An input module, used for receiving input information; A processing module, configured to determine a target task based on the input information received by the input module, determine a retrieval generation model based on the target task, and execute the method of claim 13 by calling the retrieval generation model to obtain output information; An output module is used to output the output information obtained by the processing module.

28. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.

29. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-13.

30. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Text coding model training method and device, equipment and storage medium

    CN117272937A

  • Data construction method, model training method, answer determination method and related devices

    CN117688144A

  • Automatic generation of presentation slides from documents

    US20220269713A1

Cited By

  • Large model training data generation method and device, medium and electronic equipment

    CN120913010A

  • Fine adjustment method of retrieval reply large model and retrieval reply method and device

    CN121166898A

  • Multi-modal large model-based cue word automatic generation model training method and system

    CN121600511A

  • A prompt word automatic generation model training method and system based on a multi-modal large model

    CN121600511B