Result generation method and apparatus, generative model training method and apparatus, electronic device, and storage medium

The method enhances RAG search systems by integrating modified queries and reference results to train generative models, addressing the inefficiencies in utilizing human feedback and improving the accuracy and relevance of generated results.

JP2026000828AActive Publication Date: 2026-01-06BAIDU COM TIMES TECH (BEIJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024193718
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-18
Filing Date
2024-11-05
Publication Date
2026-01-06
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Conventional search systems using Retrieval-Augmented Generation (RAG) struggle to effectively utilize behavioral feedback signals, particularly human feedback, due to challenges such as feedback quality and consistency, scale and cost, timing, and ethical considerations, which affect the training and performance of generative large-scale language models.

Method used

A method and apparatus that integrates a modified query and reference results to generate output results, utilizing a generative model trained with prompts including original and modified queries, search results, and target commands, to enhance relevance and accuracy.

Benefits of technology

Improves the relevance and accuracy of generated results by efficiently incorporating human feedback and understanding search intent, reducing noise and improving model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026000828000001_ABST
    Figure 2026000828000001_ABST
Patent Text Reader

Abstract

The present disclosure provides a result generation method and apparatus, a generative model training method and apparatus, an electronic device, and a storage medium, which relate to the field of computer technologies, and in particular, to the field of search technologies and the field of generative model technologies.SOLUTION: The specific solution includes: obtaining a modified query corresponding to an input query; searching for a reference result according to the input query and the corresponding modified query; and generating an output result corresponding to the input query according to the input query, the corresponding modified query and the reference result. According to the present disclosure, it is possible to generate an output result based on an input query, a changed query corresponding to the input query, and a reference result obtained by a search, increase the relevance between the generated result and the input query, and increase the accuracy of the generated result.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to the field of computer technology, and in particular to the fields of search technology and generative model technology. [Background technology]

[0002] Generative large-scale language models have made significant improvements in natural language understanding and generation capabilities. This progress has not only promoted the development of artificial intelligence technology, but also facilitated the restructuring and upgrading of search systems. Traditional search systems provide multiple results to meet the requirements of a target object through processes such as recall, coarse ranking, fine ranking, and fine-tuning. Current search systems employ Retrieval-Augmented Generation (RAG), which can generate accurate, effective, clearly structured, and rich answers. Summary of the Invention [Means for solving the problem]

[0003] The present disclosure provides a result generation method and apparatus, a generative model training method and apparatus, an electronic device, a storage medium, and a program.

[0004] According to one aspect of the present disclosure, there is provided a result generation method, the method comprising: Obtaining a modification query corresponding to the input query; retrieving a lookup result based on the input query and the corresponding modified query; generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result.

[0005] According to another aspect of the present disclosure, there is provided a method for training a generative model, the method comprising: Input the training sample prompts into the generative model that needs to be tuned to get a predicted answer; adjusting the generative model based on the desired answers and the predicted answers of the training samples; The training sample prompts include the original query, the modified query, the search results, and the target command.

[0006] According to one aspect of the present disclosure, there is provided a result generation device, the device comprising: an acquisition module for acquiring a modification query corresponding to the input query; a search module for searching and obtaining reference results based on the input query and the corresponding modified query; and a generation module for generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result.

[0007] According to one aspect of the present disclosure, there is provided an apparatus for training a generative model, the apparatus comprising: an input module for inputting training sample prompts into the generative model that needs to be adjusted to obtain predicted answers; an adjustment module for adjusting the generative model based on the desired answers and the predicted answers of the training samples; The training sample prompts include the original query, the modified query, the search results, and the target command.

[0008] According to another aspect of the present disclosure, there is provided an electronic device, the device comprising: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the implementation of any one of the methods in the embodiments of the present disclosure.

[0009] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to perform any one of the methods in the embodiments of the present disclosure.

[0010] According to another aspect of the present disclosure, a program for implementing any one of the methods in the embodiments of the present disclosure when executed by a processor is included.

[0011] According to the present disclosure, output results are generated based on an input query, a corresponding modified query, and reference results obtained by a search, thereby increasing the relevance of the generated results to the input query and improving the accuracy of the generated results.

[0012] It should be understood that the contents described herein are not intended to describe key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will be better understood through the following specification.

[0013] The accompanying drawings are for a better understanding of the solutions of the present disclosure, but are not intended to limit the present disclosure. [Brief explanation of the drawings]

[0014] [Figure 1] 1 is a comparative schematic diagram of explicit and implicit feedback signals according to the present disclosure; [Figure 2] 1 is a flowchart illustrating the combination of RAG and LLM according to the present disclosure. [Figure 3] 1 is a flowchart of a result generation method according to one embodiment of the present disclosure. [Figure 4] 10 is a flowchart of a result generation method according to another embodiment of the present disclosure. [Figure 5] 10 is a flowchart of a result generation method according to another embodiment of the present disclosure. [Figure 6] 10 is a flowchart of a result generation method according to another embodiment of the present disclosure. [Figure 7]10 is a flowchart of a result generation method according to another embodiment of the present disclosure. [Figure 8] 10 is a flowchart of a result generation method according to another embodiment of the present disclosure. [Figure 9] 1 is a flowchart of a method for training a generative model according to one embodiment of the present disclosure. [Figure 10] FIG. 1 is a schematic diagram illustrating session-based change query cleaning according to one embodiment of the present disclosure. [Figure 11] FIG. 1 is a schematic diagram illustrating aggregation of change queries based on time windows according to one embodiment of the present disclosure. [Figure 12] FIG. 1 is a schematic diagram illustrating a production system according to one embodiment of the present disclosure. [Figure 13] 1 is a schematic diagram illustrating a configuration of a result generation device according to one embodiment of the present disclosure. [Figure 14] FIG. 10 is a schematic diagram illustrating a configuration of a result generation device according to another embodiment of the present disclosure. [Figure 15] FIG. 1 is a schematic diagram illustrating the configuration of a training device for a generative model according to one embodiment of the present disclosure. [Figure 16] FIG. 1 is a block diagram of an electronic device for implementing a method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0015] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. Various details of the embodiments of the present disclosure are included herein for ease of understanding and should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, in the following description, descriptions of known functions and structures will be omitted for clarity and conciseness.

[0016] The generative large-scale language model used in Retrieval-Augmented Generation (RAG) has undergone extensive pre-training and internalized world knowledge into its parameters, allowing it to deeply understand the key needs of the target object and collectively induct relevant content from search results, significantly improving the satisfaction of the target object while also reducing dependency on the accuracy of steps such as ranking and extraction.

[0017] However, the reconstruction of the search system lacks the ability to sense and utilize target object behavior feedback signals. Conventional search systems rank correlations based on target object search, click, and other behaviors, and use behavior feedback signals to improve the correlation of search results and target object satisfaction.

[0018] Behavioral feedback signals can mainly include two types: implicit feedback signals and explicit feedback signals, and a specific introduction is given below.

[0019] 1. Classification of feedback signals 1. Implicit Feedback Signals It is defined as follows: for a given search query and answer, the target object does not actively provide feedback or report its satisfaction with the answer, but the current answer influences subsequent search behavior, which can indirectly express the target object's satisfaction with the current answer, and these subsequent behaviors are implicit feedback signals. Typically, these are historical behavior signals (e.g., search history, click data, etc.) commonly found in the target object's active search process.

[0020] The advantages of implicit feedback signals are mainly high signal density, many signal varieties, low data ubiquity, low noise rate, etc., while the disadvantage is mainly that the signal salience is not obvious.

[0021] 2. Explicit Feedback Signals It is defined as follows: for a given search query and answer, the system request or target object actively feedbacks its satisfaction with the answer, directly representing the target object's satisfaction with the current answer. This satisfaction is an explicit feedback signal. It is usually feedback or survey information actively collected by the system for the search target object.

[0022] The advantages of explicit feedback signals are mainly that the salience of high-value signals is obvious, and the disadvantages are mainly that the signals are sparse, and due to the influence of the collection method, there is a serious deviation between the satisfaction distribution and the truth distribution, the noise rate is high, the signal types are very limited, and it depends heavily on the product design.

[0023] See Figure 1 for a comparison of explicit and implicit feedback signals in terms of data density, distribution uniformity, value salience, low noise, and type diversity.

[0024] 2. Feedback signal examples 1. Examples of implicit feedback signals (1) The current answer has a link that takes you to a landing page. i. Implicit Signals These include the answer jump click rate, the answer jump click stay time, the click share of all answers on this page, and the click stay time share of all answers on this page. ii. Expressions of Satisfaction After clicking the target object to jump, they stay on the landing page for a long time and do not click on any of the other answers, or they stay for a very short time after jumping. iii. Expressions of dissatisfaction Instead of the target object clicking and jumping, you click on other answers and stay there for a very long time. iv. Expressions of dissatisfaction The target object was clicked and jumped, but other answers were also clicked and the page was turned to view other answers.

[0025] (2) After the target object has finished looking at the current answer, it changes its query to search for more answers. i. Implicit Signals These include the changed query, the changed query frequency, the click frequency after the changed query, and whether there was a change in intent after the changed query. ii. Expressions of Satisfaction The target object does not continue to search by changing the query, or change its intent after changing the query. iii. Expressions of dissatisfaction The target object frequently changes the query and searches. iv. Expressions of dissatisfaction The target object changes the query search and then clicks on the new results returned.

[0026] (3) There is a video in the current answer. i. Implicit Signals These include whether playback has finished, the length of time spent, etc. ii. Expressions of Satisfaction The target object watched the video to the end. iii. Expressions of dissatisfaction The target object skips the video, goes to other answers, and stays for a long time. iv. Expressions of dissatisfaction The target object has been clicked, but other answers have also been clicked and the page has been turned to look at other answers.

[0027] 2. Examples of Explicit Feedback Signals (1) Below the current answer is a survey offering satisfaction rating options on a scale of 1 to 5. i. Explicit signals There is a 1-5 scale ii. Expressions of satisfaction and dissatisfaction It is expressed directly by a score of 1 to 5.

[0028] (2) You can give a thumbs up, thumbs down, or share under the current answer. i. Explicit Signals There's good, bad and share. ii. Expressions of Satisfaction and Dissatisfaction Good and Share are considered to be satisfactory, and Bad is considered to be unsatisfactory.

[0029] 3. Method using two types of feedback signals 1. Using implicit feedback signals In search systems, implicit behavioral signals are widely used to optimize multiple search results, primarily for learning to rank candidate results. The goal of Learning to Rank (LTR) is to create a ranking model by learning the behavior and historical data of a target object so that it ranks a set of candidates and ensures that the ranking of the results is as close as possible to the ranking expressed by the target object behavior. Learning to Rank methods generally cover a range of machine learning techniques, including but not limited to pointwise, pairwise, and listwise methods. These methods can train ranking models based on various types of target object feedback, including clicks, purchases, ratings, dwell time, etc.

[0030] Examples related to learning to rank include:

[0031] (1) Click-through rate prediction (CTR prediction). This is a ranking learning model that is widely and directly applied to search engines and aims to dynamically adjust and optimize search results based on the click behavior of a target object. The basic idea is that the click behavior of a target object relative to a search result can reflect the relevance and attractiveness of the search result. If a search result has a relatively high click-through rate, this usually means that the result is more relevant to the search for the target object or attracts more attention from the target object. Therefore, by analyzing the click data of the target object, the search engine can re-rank the initial search results to better meet the information needs of the target object.

[0032] The main problems of re-ranking by CTR estimation are cold start, data sparsity, lack of content understanding, bias in average CTR, noise and fraudulent clicks, high training complexity, large feature workload, rational selection of evaluation metrics, etc.

[0033] (2) Semantic Vector Retrieval (Embedding-Based Retrieval): By mapping target object searches and content items into the same vector space and calculating their similarity, results can be retrieved efficiently and accurately. By training a complex model, semantic information can be encoded into vectors, bringing similar searches and content items closer together in the vector space, improving search accuracy and simultaneously handling fuzzy searches and deep intent.

[0034] The main problems of semantic vector search are high computational complexity, semantic drift problem, accuracy problem, etc.

[0035] (3) Hyperlink Analysis (HA). This technology evaluates and analyzes the importance of a web page by using the link relationships between web pages, such as the number and quality of other web pages linked to it. Although hyperlink analysis does not directly utilize target object feedback, many of the links within the web page it refers to come from the content generated by the target object. Hyperlink analysis is widely applied not only in search engine optimization (SEO), but also in fields such as social network analysis and academic citation analysis.

[0036] The main problems of hyperlink analysis technology are deceptive links, ignoring content quality, stagnant updates, ignoring target object behavior, computational complexity, etc.

[0037] As mentioned above, the implicit signaling approach can effectively utilize the target object's behavioral feedback signal, but it also has some drawbacks. Most of these drawbacks can be resolved by RAG search and expansion generation technology. However, RAG also has its own drawbacks in utilizing behavioral feedback signals.

[0038] 2. Using explicit feedback signals Although the number of implicit feedback signals is enormous, when introducing generative large-scale language models in RAG search and expansion generation, these traditional implicit signals cannot be directly utilized. This is because generative models (also called generative models) require understanding and generation, rather than simple ranking and selection. Here is a brief explanation of how RAG works.

[0039] RAG is a new search and natural language processing technology that combines search and generation to produce richer, more natural language outputs. The operating principle of RAG is to first use a search system to search for relevant documents from a large document library, and then use these searched documents to generate model output. Specifically, RAG encodes the input problem using a pre-trained language model, such as Bidirectional Encoder Representations from Transformers (BERT), and then uses a search system to search for documents relevant to the problem from the document library. The searched documents, along with the question, are then sent to a pre-trained sequence model, such as BERT, to generate the final answer. The advantage of this approach is that it can utilize large amounts of unstructured text data, not just the training data, and generate richer, more natural-sounding answers. Furthermore, because RAG considers all searched documents when generating answers, the answers typically have global consistency. Overall, RAG technology combines the benefits of search and generation, enabling natural language processing systems to produce higher-quality language outputs.

[0040] Figure 2 is a flowchart of the combination of RAG and a large language model (LLM). As shown in Figure 2, the device side receives a prompt and a query, searches knowledge sources such as web pages and databases based on the query search relevant information, and then obtains relevant information for enhanced context. The prompt, query, and enhanced context are input to the large language model side to receive a text response generated by the large language model side.

[0041] For large-scale generative language models, explicit feedback signals can be introduced into the reinforcement learning training targets to indirectly optimize the base generative model. For example:

[0042] a. Reinforcement Learning from Human Feedback (RLHF). This technology combines reinforcement learning and human feedback, aiming to optimize model behavior through human feedback. First, basic capabilities are obtained through pre-training using big data. Then, by collecting positive and negative human feedback on the model, this feedback is used as an incentive signal to further train the model using reinforcement learning methods, gradually improving its performance. This method is suitable for natural language processing fields such as text generation and dialogue systems, and can help models produce outputs more in line with human expectations. The advantages of RLHF are that it reduces the reliance on artificially labeled answers and improves the adaptability and generalization capabilities of models. However, it also faces the challenge of efficiently obtaining and utilizing human feedback.

[0043] b. Direct Preference Optimization (DPO). This is a technique that combines reinforcement learning and human feedback. The main difference between DPO and RLHF is the way they learn and optimize policies. DPO can perform optimization entirely through single-stage policy training, while RLHF can learn and make decisions by combining past experience and future predictions. Therefore, DPO is characterized by higher performance and lighter computational resources. It does not require adapting an incentive model, does not require sampling from a language model (LM) during fine-tuning, and does not require extensive hyperparameter tuning.

[0044] When combining large-scale generative language models in RAG with human feedback such as RLHF technology, the main challenge we face is how to efficiently obtain and utilize human feedback. Specifically, these include the following:

[0045] 1. Feedback quality and consistency: Human feedback is inherently subjective, and different people may have different evaluations of the same model output. This subjectivity and inconsistency in evaluation criteria introduces noise into the training process, affecting the learning efficiency and final performance of the model. Ensuring high-quality and consistent human feedback is a challenge.

[0046] 2. Feedback scale and cost: Generative language models typically require large amounts of training data. The challenge of training with human feedback is efficiently collecting sufficient amounts of human feedback. Furthermore, the cost of manual evaluation and feedback provision is high, making cost and feasibility limiting factors, especially for tasks that require expert knowledge and judgment.

[0047] 3. Feedback timing issue: Reinforcement learning is a dynamic, iterative process, and ideally, feedback needs to be obtained in real time or near real time to adjust the model. However, in reality, there is usually a delay in the collection and processing of human feedback, which affects the continuity and efficiency of training.

[0048] 4. Regarding the issue of imbalanced data, human feedback can have personal biases that, if not properly handled, can be learned by models and reproduced in their output. Also, ensure that the process of collecting and using human feedback meets ethical standards and protects privacy.

[0049] 3 is a flowchart of a result generation method according to one embodiment of the present disclosure, the method comprising: In S301, a modified query corresponding to an input query is obtained; In S302, retrieving and obtaining a reference result based on the input query and the corresponding modified query; S303 may include generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result.

[0050] In an embodiment of the present disclosure, the input query may include a query entered into a search engine, and the input query may be referred to as a search query, an input search query, an initial search query, etc. For example, the input query may include a search statement and / or search keywords entered into a search engine, or a question entered into a large-scale language model question-and-answer page. A correspondence relationship between several queries may be pre-saved. After an input query is acquired, one or more change queries corresponding to the input query may be searched for within the correspondence relationship. The change query may be referred to as a change query, a modified query, a modified search query, a modified inquiry query, etc. The intents of the initially acquired input query and the change query may be the same, similar, or different. The change query retained after cleaning may be similar or identical to the intent or semantics of the input query. For example, a change query dictionary can be constructed to store multiple queries according to search intent, and correspondence relationships can be found between multiple queries with the same or similar intent. Then, matching can be performed in the change query dictionary based on the input query to obtain one or more corresponding change queries. Matching in the dictionary may be performed according to the keywords of the input query, or according to the intent of the input query.

[0051] In an embodiment of the present disclosure, a search system and / or a search engine may integrate an input query and a corresponding modified query to perform a search and obtain search results (or inquiry results, reference results, etc.). For example, an intention induction process may be performed on the input query and one or more corresponding modified queries to obtain an induced intention. The induced intention may then be input to a search engine to perform a search and obtain search results. In an embodiment of the present disclosure, a search may be referred to as a query, a search, etc.

[0052] In an embodiment of the present disclosure, an input query and its corresponding modified query can be used to first search and obtain reference results, and then the input query, modified query, and reference results can be strung together according to a prompt template of the model, and the strung together prompts can be input into a generative large-scale language model to obtain answers to the input query and modified query.

[0053] According to an embodiment of the present disclosure, output results are generated based on a modified query corresponding to an input query and reference results obtained by a search, thereby increasing the relevance of the generated results to the input query and improving the accuracy of the generated results.

[0054] 4 is a flowchart of a result generation method according to another embodiment of the present disclosure. The method may include one or more features of the result generation method described above. In one embodiment, in S301, obtaining a modified query corresponding to the input query includes: In S401, the method may include searching a modified query dictionary for a modified query corresponding to the input query.

[0055] In an embodiment of the present disclosure, an input search system or search engine may build an altered query dictionary based on, for example, a history of original queries, altered queries, etc. For example, the altered query dictionary may store correspondences between multiple queries with the same or similar intent. The altered query dictionary may search for one or more altered queries corresponding to an input query based on keywords, intent, etc. of the input query.

[0056] According to an embodiment of the present disclosure, by searching and matching based on an input query in the modified query dictionary, a modified query corresponding to the input query can be obtained, and a wide range of search statements to be used based on the modified query corresponding to the input query can be searched for, thereby clarifying the search intent, improving the accuracy and richness of the reference results obtained by the search, and further improving the accuracy and richness of the results generated.

[0057] 5 is a flowchart of a result generation method according to another embodiment of the present disclosure. The method may include one or more features of the result generation method described above. In one embodiment, in S302, retrieving and obtaining reference results based on the input query and the corresponding modified query includes: In S501, a multi-intention query is obtained based on the input query and the corresponding modified query; In S502, the method may include inputting the multi-intent query into a search engine and obtaining reference results.

[0058] In an embodiment of the present disclosure, an input query and one or more corresponding modified queries can be subjected to induction (or classification) processing using a model to obtain a multi-intent query. For example, an input query is "How high is Mount Tai?", and the corresponding modified queries are "How high is Mount Tai?", "How high is the main peak of Mount Tai?", and "How high is Mount Tai?". Here, the intent of the input query and the corresponding modified queries recognized by the model is "Inquiry about the height of Mount Tai," and the intent of the modified queries are "Inquiry about the height of Mount Tai." The input query and the corresponding modified queries can be combined to generate an inductive multi-intent query, "Inquiry about the height of Mount Tai."

[0059] In an embodiment of the present disclosure, after a multi-intent query is obtained, the multi-intent query can be input to a search engine as a query statement, and the search engine can search for one or more search results corresponding to the multi-intent query in a web library. For example, when the multi-intent query "Query about the height of Mount Tai" is input to a search engine, corresponding search results can be obtained. If there are multiple multi-intent queries obtained by induction, multiple query statements can be generated and input to a search engine to obtain search results. Some or all of these search results can be used as reference results for generating output results.

[0060] According to an embodiment of the present disclosure, based on a multi-intention query obtained from an input query and its corresponding modified query, a search engine searches for reference results that satisfy the multi-intention query, and provides reference results that are the same as or similar to the intent of the input query and the modified query, thereby increasing the richness and accuracy of the reference results.

[0061] In one embodiment, in S501, obtaining a multi-intention query based on the input query and the corresponding modified query includes performing an induction process on the input query and the corresponding modified query using a large-scale language model to obtain the multi-intention query.

[0062] In an embodiment of the present disclosure, an intention analysis and / or semantic analysis is performed on an input query and one or more corresponding modified queries using a large-scale language model, and induction is performed on the intentions of the input query and the corresponding modified queries based on the analysis results to obtain a multi-intention query. The large-scale language model can be replaced with a natural language processing model, a semantic understanding model, an intention understanding model in a generative large-scale language model, etc.

[0063] According to an embodiment of the present disclosure, a large-scale language model can be used to perform induction and generalization on an input query and one or more corresponding modified queries to obtain a multi-intent query, enable the model to understand and induce the intent orientation of the input query and / or the modified query, generate an answer for a subsequent model, and indicate the idea and direction of the answer.

[0064] In one embodiment, in S303, generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result includes inputting the multi-intention query and the reference result into a generative model to obtain an output result corresponding to the input query.

[0065] In an embodiment of the present disclosure, the generative model may include a generative large-scale language model. In a situation where a multi-intent query and corresponding reference results are obtained, a prompt may be obtained by combining the query and the results. The prompt is input to the generative model. The generative model may generate an output result corresponding to the input query based on the input prompt. For example, if the input query includes a question, the output result of the generative model may include an answer corresponding to the question.

[0066] According to an embodiment of the present disclosure, by inputting a multi-intention query and its corresponding reference results into a generative model, output results that match the multi-intention query can be obtained, making the output results more consistent with intent needs and improving the accuracy and richness of the output results.

[0067] In one embodiment, the training samples for the generative model include prompts and answers, where the prompts include the original query, the modified query, the search results, and the target command.

[0068] In an embodiment of the present disclosure, the original query and modified query in the prompt of the training sample can be obtained from historical records. The answer of the training sample can be obtained by labeling. The original query used in the model training stage can be the input query in the model prediction stage. Search results can be obtained from a search engine based on the original query and one or more corresponding modified queries, and the target command can include an answer request to be used in the generative model. For example, the target command can include combining the original query, modified query, and search results to provide a comprehensive answer, using formats such as paragraph breaks, lists, and bolding as much as possible. The output results must be highly accurate and logical. Based on the original query, modified query, search results, and target command, the prompt's task description area, dialogue information area, search result area, instruction area, etc. can be constructed. For example, the task description area can describe the task that needs to be performed by generating a model and can be constructed based on the original query or a multi-intention query, etc. The dialogue information area can describe potential requirements that the generative model needs to refer to when generating an answer and can be constructed based on one or more modified queries, etc. The search result area can be constructed based on search results corresponding to multi-intent queries derived based on the original query and the modified query. The command area can be constructed based on target commands.

[0069] According to an embodiment of the present disclosure, prompts for generating a model can be obtained based on the original query, the modified query, the search results, and the goal instructions, and the generated model can generate output results that are highly related to the original query and the modified query and match the search intent, thereby improving the accuracy of the output results.

[0070] In one embodiment, the original query and the modified query are obtained by sampling in a modified query dictionary.

[0071] In an embodiment of the present disclosure, original queries and modified queries for several target objects can be associated based on intent and stored in a modified query dictionary. During the training phase, original queries and corresponding modified queries can be obtained by sampling in the modified query dictionary to construct some content of prompts in training samples. The modified query dictionary can be updated in real time or periodically.

[0072] According to the embodiments of the present disclosure, the original query and the modified query for constructing the prompt can be obtained from the modified query dictionary, the correspondence between the original query and the modified query in the dictionary is more accurate, the accuracy and richness of the training samples can be improved, and the accuracy and richness of the model output results can be further improved.

[0073] 6 is a flowchart of a result generation method according to another embodiment of the present disclosure. The method may include one or more features of the result generation methods described above. In one embodiment, the method includes: In S601, the method further includes cleaning a plurality of modified queries related to the original query in the session based on the search intent of the original query.

[0074] In the embodiments of the present disclosure, a single session or access process on a search engine is generally referred to as a single session. When a target object inputs a keyword into a search engine and performs a search, it indicates that the target object has started a session. Subsequently, activities such as continuous searches, link clicks, and page browsing for a while are considered to be actions under this session. When the target object becomes inactive for a while, the session is considered to have ended. If a single session includes multiple rounds of original queries and multiple modified queries, the multiple modified queries can be considered multiple modified queries related to the original query. Based on the search intent of the original query, multiple modified queries related to the original query in the session can be cleaned, and modified queries that are different from or less similar to the search intent of the original query can be cleaned. Furthermore, the retained modified queries and their corresponding original queries after cleaning can be stored in a modified query dictionary.

[0075] In an embodiment of the present disclosure, the search intent of the original query and the modified query can be determined using methods such as keyword matching and semantic understanding models.

[0076] According to an embodiment of the present disclosure, modified queries in a session can be cleaned based on the search intent of the original query in the same session, thereby obtaining modified queries that are similar to or identical to the intent of the original query, thereby increasing the correlation between the modified queries and the original query, and further increasing the correlation between search results, generated results, and the original query.

[0077] In one embodiment, cleaning a plurality of modified queries related to the original query in a session based on the search intent of the original query includes: Obtaining a first similarity between the original query and the modified query in the session through a keyword matching method, determining whether the original query and the modified query have similar search intents based on the first similarity, and reserving the modified query that has similar search intent to the original query; The method includes at least one of: obtaining a second similarity between the original query and the modified query in the session using a semantic understanding intent determination method; determining whether the original query and the modified query have similar search intents based on the second similarity; and reserving the modified query that is similar to the search intent of the original query.

[0078] In an embodiment of the present disclosure, the keyword matching method may include a text matching algorithm such as term frequency-inverse document frequency (TF-IDF) or Best Matching 25 (BM 25). Using the text matching algorithm, a similarity score (i.e., first similarity) between the modified query and the original query is calculated, and it is possible to determine whether the modified query and the original query are similar in intent. If the similarity score between the two queries reaches a set threshold, it is determined that the intents of the two queries are similar. If the similarity score between the two queries does not reach the set threshold, it is determined that the intents of the two queries are not similar. Modified queries that are close to the search intent of the original query (original intent) are retained, and modified queries that are not close to the original intent are deleted. For example, if the threshold is 7 and the similarity score between original query Q1 and modified query Q2 is 5, Q2 is removed by cleaning. If the similarity score between original query Q1 and modified query Q3 is 8, Q3 is retained.

[0079] In an embodiment of the present disclosure, the semantic similarity between the original query and the modified query can be scored using a model capable of semantic understanding, such as a large-scale language model, a natural language processing model, a semantic understanding model, or an intent understanding model in a generative large-scale language model, and a modified query that is close to the original intent of the original query can be selected. For example, by combining the original query and the modified query and inputting them into a model, a semantic similarity (i.e., second similarity) score for both can be obtained, and a modified query that is close to the search intent of the original query (original intent) can be selected based on the similarity scores for both. For example, if the similarity scores for both queries reach a set threshold, it can be determined that the intents of both queries are close, and if the similarity scores for both queries do not reach the set threshold, it can be determined that the intents of both queries are not close.

[0080] In some examples, some of the modified queries related to the original query may be first cleaned based on the first similarity, and the remaining modified queries may be cleaned based on the second similarity. In another example, the first similarity and the second similarity may be combined to clean the modified queries. For example, if the first similarity and the second similarity between the original query and one modified query do not reach the corresponding threshold, the modified query is deleted. Alternatively, if either the first similarity or the second similarity between the original query and one modified query reaches the corresponding threshold, the modified query is retained. Alternatively, if both the first similarity and the second similarity between the original query and one modified query reach the corresponding threshold, the modified query is retained.

[0081] According to an embodiment of the present disclosure, modified queries that are not similar to the original query in a session can be cleaned using multiple methods, modified queries that are similar to the search intent of the original query can be retained for subsequent operations, modified queries that are highly relevant to the search intent of the original query can be retained, and the accuracy of search results and generated results can be further improved.

[0082] 7 is a flowchart of a result generation method according to another embodiment of the present disclosure. The method may include one or more features of the result generation methods described above. In one embodiment, the method includes: In S701, ranking a plurality of modified queries related to an original query based on key features including at least one of a modified query rate, a modified query source, and feedback information after the modified query; At S702, the method further includes selecting a modified query to be reserved from the plurality of modified queries related to the original query based on the ranking result.

[0083] In an embodiment of the present disclosure, if the result generation method includes the cleaning process of S601, the ranking process may be performed after the cleaning process. If the result generation method does not include the cleaning process of S601, the ranking process may be performed after obtaining the original query and the modified query. After obtaining the original query and multiple modified queries related to the original query, the multiple modified queries may be ranked according to at least one of the modified query rate, the modified query source, and feedback information after the modified query. Here, the modified query rate may represent the probability that after searching for a certain query, e.g., Problem A, the user will change to another query, e.g., Problem B, and continue searching. The modified query rate may be estimated or statistically obtained based on historical sessions. The modified query source may include multiple types, such as a new search actively started in the search box, a new search started based on the next suggested input word in the search box, a new search started by clicking on the search history, or a new search started by clicking on a suggested search question on the search result page. The feedback information after the modified query may represent behavioral feedback on the search results after the modified query, and may include implicit feedback and explicit feedback, such as the length of time spent on the search, clicking on links, etc.

[0084] In some examples, modified queries can be ranked based on a single key feature, such as ranking from highest to lowest based on modified query rate, ranking based on modified query source, ranking searches actively initiated in the search box first and searches initiated in the search box based on suggested input words later, ranking based on feedback information after the modified query, and ranking according to the time spent on a search result page.

[0085] In another example, the modified query rate, the modified query source, and the feedback information after the modified query can be comprehensively considered based on their respective weights, and comprehensively ranked based on the score of the weighted calculation to obtain a ranking result.

[0086] In an embodiment of the present disclosure, the top K modified queries can be selected from the ranking results for further processing. For example, the original query and its corresponding top K ranked modified queries are added to a modified query dictionary. Furthermore, prompts are generated using the original query and its corresponding K ranked modified queries, and training samples are constructed using the prompts and labeled answers. Furthermore, after ranking, the top K modified queries that are retained after ranking are cleaned.

[0087] According to an embodiment of the present disclosure, modified queries are ranked according to at least one of query rate, modified query source, feedback information after modified query, etc., and ranked modified queries are selected, thereby reducing the number of modified queries that are less relevant to the search intent of the original query, and further reducing the amount of data to be processed by search engines, generative models, etc., thereby not only increasing the speed of operations such as search and generation, but also increasing the relevance and accuracy of the generated results to the original query.

[0088] 8 is a flowchart of a result generation method according to another embodiment of the present disclosure. The method may include one or more features of the result generation methods described above. In one embodiment, the method includes: S801 further includes aggregating the original query and the pending modified queries according to search intent based on a dynamic time window.

[0089] In an embodiment of the present disclosure, the dynamic time window may include a data collection window determined based on a certain time range, such as a time window of one hour or less, a time window of 24 hours or less, a time window of three days or less, and a time window of one month or less. Original queries and multiple modified queries related to several target objects (e.g., associations between the original query and the modified queries in the same session) may be collected from multiple sources according to the time range specified by the dynamic time window. After the above cleaning and / or ranking steps, some modified queries may be retained from the multiple modified queries related to the original query. The original query and the retained modified queries may be aggregated according to search intent, and the aggregated result may include a modified query sequence. The modified query sequence may include multiple modified queries or may include the original query. The aggregated modified query sequence may be added to a modified query dictionary.

[0090] In the embodiments of the present disclosure, the order of cleaning, ranking, and clustering of modified queries is not limited and can be flexibly changed according to specific needs. In one example, cleaning can be performed on modified queries first, the retained modified queries after cleaning can be ranked, and finally the ranked modified queries can be clustered. In another example, cleaning can be performed on modified queries first, the retained modified queries after cleaning can be clustered, and finally the clustered modified queries can be ranked.

[0091] According to the embodiments of the present disclosure, original queries and modified queries can be aggregated according to search intent within a dynamic time window, and short-term search intent can be obtained, and long-term search preferences can be modeled, which not only improves the search system's understanding of search intent, but also enables the formation of appropriate modified query sequences.

[0092] 9 is a flowchart of a method for training a generative model according to one embodiment of the present disclosure. In S901, inputting the training sample prompts into a generative model that needs to be adjusted to obtain a predicted answer; At S902, adjusting the generative model based on the desired answers and the predicted answers of the training samples. The training sample prompts may include the original query, the modified query, the search results, and the target command.

[0093] In an embodiment of the present disclosure, the generative model may include a generative large-scale language model. The training samples of the generative model may include a prompt and a desired response. The desired response may represent a desired response to the prompt. When a prompt in the training samples is input to a generative model that requires adjustment, the generative model can output a predicted response corresponding to the prompt. The generative model may be fine-tuned based on the desired response and predicted response in the training samples. For example, some parameters of the generative model may be fine-tuned so that the predicted response output by the generative model approaches the desired response. After one or more rounds of fine-tuning, a trained generative model can be obtained. There are no specific limitations on how to select values ​​for training-related parameters, such as the training round (epoch), learning rate, warm-up rate, and regularization coefficient, used in the fine-tuning process, and these can be flexibly adjusted according to needs.

[0094] According to an embodiment of the present disclosure, training samples for a generative model can be constructed based on modified queries, and this type of training sample can be used to fine-tune the generative model to generate results that are more relevant to the original search intent, thereby improving the accuracy of the results generated by the generative model.

[0095] In one embodiment, the method of assembling the prompt comprises: Sampling original queries and corresponding modified queries in a modified query dictionary; Obtaining a multi-intent query based on the original query and the modified query; inputting the multi-intent query into a search engine to obtain search results; Assembling a task description area, a dialogue information area, a search result area, and a command area of ​​the prompt based on the original query, the modified query, the reference results, and a target command.

[0096] In an embodiment of the present disclosure, the prompt assembly template may include a task description area, a dialogue information area, a search result area, and a command area, etc. For example, the task description area may describe a task that needs to be performed by generating a model and may be constructed based on an original query, a multi-intent query, etc. The dialogue information area may describe potential demands that the generative model needs to refer to when generating an answer and may be constructed based on one or more modified queries, etc. The search result area may be constructed based on search results corresponding to a multi-intent query induced based on the original query and the modified query. The command area may be constructed based on a goal command.

[0097] In an embodiment of the present disclosure, after sampling or extracting the original query and its corresponding modified query from the modified query dictionary, a large-scale language model or the like is used to analyze the original query and the modified query to obtain a multi-intent query, and the multi-intent query can be input into a search engine to obtain multiple reference results. The task description area is filled in based on the intent of the original query or the multi-intent query, and the dialogue information area is filled in based on the original query and / or multiple modified queries. The search result area is filled in based on multiple reference results obtained by the search. A target command is filled in the command area to represent the answer request of the generative model.

[0098] According to an embodiment of the present disclosure, the original query, the modified query, the reference result, and the target command can be combined to obtain a prompt, which can be input into a generative model to obtain an output result (predicted answer) corresponding to the original query. Using the prompt strengthens the relevance of the predicted result to the original query and the search intent, thereby improving the accuracy of the predicted result.

[0099] In some application scenarios, this disclosure proposes a generative search data flywheel system, which forms a forward-reinforcing cycle through continuous data collection and model iterative optimization.

[0100] Specifically, the present disclosure employs various policies, such as using semantic information (modified queries) in explicit feedback signals, designing more effective feedback aggregation and processing mechanisms, reducing feedback signal noise using auxiliary signal filtering policies, and improving feedback signal quality. Additionally, the large-scale language model itself may be fine-tuned to improve the efficiency and robustness of feedback signal utilization. Specifically, the following are included:

[0101] The generative search data flywheel system of the present disclosure can be used to solve at least one of the following problems:

[0102] 1. Result optimization problems that cannot be solved in a single search 2. Problems that require long-term iteration, constant updating to achieve the final target, e.g. ·Upstream data content is constantly changing. ·The flywheel starting state is far from the final ideal state. 3. Problems that require constant adjustment of online results based on online real-time target object feedback and rapid improvement of target object satisfaction.

[0103] The system introduces target object behavior signals, such as the target object changing a new search query, as key inputs for model training and optimization, allowing the system to more accurately capture the target object's true needs and preferences, thereby significantly improving the accuracy, richness and readability of generated answers to meet the target object's needs.

[0104] The generative search data flywheel system of the present disclosure can be used in the generative question and answer field, including a wide range of application scenarios such as online search engines, question and answer systems, and virtual assistants.

[0105] This disclosure not only significantly improves target object satisfaction in generative questions and answers, but also promotes technological progress and development in related application fields. Generative search systems and intelligent question-and-answer systems based on the RAG framework often present answers they believe will satisfy the target object from a priori perspective, ignoring whether the target object is truly satisfied with the answer. The target object's subsequent behavior provides a very strong feedback signal, helping to infer the target object's satisfaction, guide the optimization of the large-scale language model, and directly connect to the target object's preferences. Therefore, this disclosure proposes a self-expanding data flywheel system driven by implicit behavioral feedback. By mining the target object's implicit feedback signals, the system guides the generative large-scale language model to understand the target object's true needs, thereby producing answers that truly satisfy the target object and are aligned with its needs.

[0106] The target object's change query is an important implicit feedback signal. If the target object is not satisfied after one search, it will change the query until it is satisfied and then start the next search. The target object's change query data is not only sufficiently dense, but also indicates the direction in which the answer should be optimized. Our system integrates this implicit feedback signal into the generative model, driving the model to generate answers that better meet the target object's needs, thereby improving the target object's satisfaction.

[0107] The present disclosure mainly includes the optimization of the following modules: behavioral feedback signal mining and refinement, behavioral feedback signal understanding, signal-based search extension, etc. Specific optimization methods are described in detail below.

[0108] 1. Mining and refining behavioral feedback signals In search engines, a single session or access process of a target object on a search engine is commonly referred to as a session. When a target object enters keywords into a search engine and performs a search, the target object initiates a session, and subsequent activities such as continuous searches, link clicks, and page browsing are considered the target object's behavior under this session. The session is considered to have ended until the target object has been inactive for a while. The session records the interaction process and information flow between the target object and the search engine, which helps understand the target object's search habits, search intent, etc., and provides more personalized and accurate search results. In embodiments of the present disclosure, the acquisition, storage, and application of behavioral feedback signals such as the original query and modified query are all performed with the permission of the target object, e.g., the user, in accordance with relevant laws and regulations, and not violating public order and morals.

[0109] (1) Query cleaning and aggregation method based on the intent of the target object 10 is a schematic diagram illustrating a modified query aggregation method according to one embodiment of the present disclosure. The behavior of a target object in a session is complex and contains relatively large noise, which requires mining and cleaning to understand the true intention of the target object. In a single session, the target object may search for multiple different problems (examples of modified queries). Some of these problems are consistent with the original intention, and these problems may be clarifications or supplements of the original problems. Such problems have very strong information gains to meet the original requirements of the target object. However, some problems are inconsistent with the original intention, and such problems are prone to noise.

[0110] The system proposes a two-stage intent aggregation policy to clean the modification queries of the target object and obtain a modification query that matches the intent of the original problem.

[0111] The first stage is a rough cleanup based on keyword matching. Based on text matching algorithms such as TF-IDF and BM 25, a similarity score is calculated between the modified query and the original query to determine whether the modified query is close to the intent of the original query. Queries that are close in intent are retained and proceed to the second stage.

[0112] The second stage is intent determination based on semantic understanding. Because keyword matching-based methods can have difficulty capturing similarities between meanings, intent determination can be performed based on models, such as the Ernie model. The original query and modified query are concatenated and input into the model, and a semantic similarity score is calculated, which can then be used to filter modified queries that are closer to the original intent of the target object.

[0113] (2) Dynamic time window based query aggregation method FIG. 11 is a schematic diagram illustrating a modified query aggregation method according to one embodiment of the present disclosure. The target object's intent changes over time, and the target object's search habits also change according to search results. Therefore, a data flywheel system driven by target object behavior feedback should be a dynamically updated system. Recent behavior represents the target object's recent search intent and attention, while long-term behavior represents the target object's long-term interests and preferences. Therefore, the present system proposes a method for modeling target object interests and preferences based on dynamic time windows. Multiple time-span aggregation windows, such as 1 day, 3 days, 7 days, and 30 days, are set to aggregate the target object's modified query data, capturing the target object's short-term search intent and modeling the target object's long-term preferences. Finally, a combination of multiple aggregation windows is selected based on the optimal effect to form the final modified query sequence.

[0114] (3) Ranking method for modified queries based on key features For the same search query, different target objects will have different behavioral feedback, and the subsequent modified queries will also be different. Because search engines have a large number of target objects and the modified query data of target objects is dense, it is necessary to select valuable modified query data from them. The main key features are as follows:

[0115] a. Change query rate The change query rate indicates the probability that after a target object searches for problem A, it will replace it with problem B and continue searching. In this system, the change query rate is approximated using the change query frequency of historical target objects. Assume that 100 target objects search for problem A, of which 30 search for problem A and then search for problem B, and 5 search for problem C. Then, the change query rate for problem B is 30%, and the change query rate for problem C is 5%. Therefore, it can be assumed that the target objects are more interested in problem B than problem A.

[0116] b. Change query source After searching for a problem, the target object searches for a new problem. Search sources are diverse. For example, the target object actively starts a new search in the search box, the target object starts a new search based on subsequent suggested input words in the search box, the target object clicks on its past search history and starts a new search, or the target object clicks on a suggested search problem on the search results page and starts a new search. Different search sources represent different search intents, such as clarification of intent, browsing intent, curiosity intent, and retrospective intent, so modified queries need to be ranked and filtered in combination with the search source.

[0117] c. Target object behavior after a change query When the target object changes the problem, it triggers new interactions and feedback, such as increased dwell time and link clicks. Increased dwell time indicates that the current search results, which may correspond to the changed query, are of interest to the target object, and clicking on a link may satisfy the target object's needs. Therefore, the target object's post-query behavior is a strong feedback signal that measures the importance and value of the current changed query.

[0118] Based on the above features, the target object change query is fitted and sorted in descending order, and the top K most valuable target object change query information is selected and optimized as the feedback signal guidance model.

[0119] 2. Understanding Target-Object Behavioral Feedback Signals The target object's behavioral feedback signal is sufficiently dense. For example, taking the target object's query signal as an example, there can be hundreds of query changes, but the target object's intent can be summarized into several types. For example, a query understanding large language model (LLM) can be used to summarize the query intent. For example, the target object's original search problem is "What does the ABC game mean?", and other search problems are "What does ABC mean?", "What does ABC mean?", "What is in the ABC game?", and "What does the ABC game mean?", which can be classified into three types of intent, specifically as follows:

[0120] (1) Definition of the ABC game [Specific questions include, "What does the ABC game mean?", "What does the ABC game mean?"] (2) The meaning of ABC [Specific questions include, "What does ABC mean?", "What does ABC mean?"] (3) Example of the ABC game [The specific question is, "What is in the ABC game?"]

[0121] As can be seen from the above, the target object change query contains rich semantic information, indicating the direction in which the model answer should be optimized. Specifically, the target object change query information can be divided into two types. One is a refinement of the request, such as the definition of ABC, which indicates that the answer desired by the target object can be a more detailed explanation of what "ABC" in the ABC game specifically means. The other is an extension need, such as "What is in the ABC game?", which indicates that the target object wants a richer answer, explaining the meaning of the ABC game and providing specific examples of the ABC game.

[0122] Based on the powerful understanding and inductive capabilities of the generative model, this system constructs training data, allows the model to understand and induct the intention direction in the query data of the target object change, generates answers for the subsequent model, and indicates the thinking and direction of the answers.

[0123] The original and modified queries, after undergoing one or more of the above steps of cleaning, ranking, and aggregating, may be stored in a modified query dictionary.

[0124] 3. Extending search based on target object behavior feedback signals 12 is a schematic diagram illustrating a generation system according to one embodiment of the present disclosure. The general process of the Retrieval-Augmented Generation (RAG) search expansion generation framework is as follows.

[0125] (1) In the search phase, a question or text is first input and processed by a search model. The search model can search for relevant information in a large knowledge base or corpus, which can include one or more of entities, relations, facts, text segments, etc. This searched information is then passed as input to a generative model. The purpose of the search phase is to provide additional background knowledge and information for generating the model, helping to generate more accurate and richer text.

[0126] (2) In the generation phase, the generative model receives information from the search phase and uses it to generate answers, summaries, or other text content. The generative model may be a language model such as a Generative Pre-trained Transformer (GPT). The generative model combines the input information with its own language model to generate output text that is relevant and reasonable to the searched information.

[0127] In an embodiment of the present disclosure, based on the search expansion (or search reinforcement) system of target object behavior feedback, modified query information is introduced to infer more accurate and rich search intent. The search information obtained in the first round of search is insufficient to fully satisfy the new search intent inferred by behavior feedback. Therefore, it is necessary to search and reinforce the new search intent, supplement related information, and support the model in further inference and generate answers.

[0128] 4. Model extension based on target object behavior feedback signals In the traditional search generation framework, the generation stage receives information from the search stage, and then uses specific prompt instructions to have the model combine the search results to generate an answer to the search question. The specific training and prediction process of the search expansion model based on behavioral feedback is as follows:

[0129] (1) Sample structure a. Mining behavioral feedback signals: Clean and mine target object modification query information according to the above procedure to form a target object modification query dictionary. For example, after cleaning the modification queries in the historical session, aggregate the user's search query (original query) and the modification queries in a time window, and rank the aggregated queries. Select the top K queries from the ranking result and store them in the modification query dictionary. b. Extract some original queries and their corresponding modified queries, search for related information from search engines, and use them as reference information to generate answers. c. Construct a prompt, which mainly includes four parts: original query, modified query, search result, and command. d. Answers: Label the answers generated by the AI. Each training sample is configured to include a prompt and an answer. There is no limit to the amount of training sample data, and it can be flexibly selected as needed. For example, a total of 5,000 training samples can be used.

[0130] (2) Prompt design The prompt is mainly divided into four areas: a task description area, a target object interaction information area, a search result area, and a detailed command area.

[0131] (3) SFT Training Fine-tuning of large-scale language models is performed based on a large-scale language model base, and the training round (epoch), learning rate, warm-up rate, normalization coefficient, etc. can be flexibly set.

[0132] (4) Prediction Based on the search query entered in the current session, the target object's modified query dictionary is read to obtain the modified query. The query understanding LLM is used to inductively understand the input query and the original query to obtain a multi-intent query. The multi-intent query is input into a search engine, and the search engine is queried to obtain search results, i.e., reference results. After constructing a prompt based on the multi-intent query, reference results, etc., the prompt is input into a trained generative model, such as an organizational generation LLM, to obtain a predicted answer and other prediction parameters, such as temperature = 0.95, top_p = 0.8, and a penalty coefficient of 1.0.

[0133] 13 is a schematic diagram illustrating the configuration of a result generation device according to one embodiment of the present disclosure. In one embodiment, the device comprises: an acquisition module 1301 for acquiring a modification query corresponding to an input query; a search module 1302 for searching and obtaining reference results based on the input query and the corresponding modified query; and a generating module 1302 for generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result.

[0134] In one embodiment, the retrieval module 1301 is further used to search a modified query corresponding to the input query in a modified query dictionary.

[0135] 14 is a schematic diagram illustrating the configuration of a result generation device according to another embodiment of the present disclosure. The device may include one or more features of the result generation device described above. In one embodiment, the search module 1302: a multi-intention query acquisition submodule 1401 for obtaining a multi-intention query based on the input query and the corresponding modified query; and a search sub-module 1402 for inputting the multi-intention query into a search engine to obtain search results.

[0136] In one embodiment, the multi-intent query acquisition submodule 1401 is further used for performing an induction process on the input query and the corresponding modified query using a large-scale language model to obtain the multi-intent query.

[0137] In one embodiment, the generation module 1303 is further used for inputting the multi-intent query and the reference result into a generation model to obtain an output result corresponding to the input query.

[0138] In one embodiment, the training samples for the generative model include prompts and answers, where the prompts include the original query, the modified query, the search results, and the target command.

[0139] In one embodiment, the original query and the modified query are obtained by sampling in a modified query dictionary.

[0140] In one embodiment, as shown in FIG. 14, the apparatus further comprises a cleaning module 1403 for cleaning a plurality of modified queries related to an original query in a session based on the search intent of the original query.

[0141] In one embodiment, the cleaning module 1403 comprises: Obtaining a first similarity between the original query and the modified query in the session through a keyword matching method, determining whether the original query and the modified query have similar search intents based on the first similarity, and reserving the modified query that has similar search intent to the original query; The second similarity between the original query and the modified query in the session is obtained using a semantic understanding intent determination method, and the second similarity is used to determine whether the original query and the modified query have similar search intents based on the second similarity; and to reserve the modified query that is similar to the search intent of the original query.

[0142] In one embodiment, as shown in FIG. 14, the device comprises: a ranking module 1404 for ranking a plurality of modified queries related to the original query based on key characteristics including at least one of a modified query rate, a modified query source, and post-modified query feedback information; The query processing system further comprises a reservation module 1405 for selecting a modified query to be reserved from the plurality of modified queries related to the original query based on the ranking result.

[0143] In one embodiment, as shown in FIG. 14, the apparatus further comprises an aggregation module 1406 for aggregating the original query and its pending modified queries according to search intent based on a dynamic time window.

[0144] 15 is a schematic diagram illustrating the configuration of a training device for a generative model according to one embodiment of the present disclosure. In one embodiment, the device includes: an input module 1501 for inputting training sample prompts into the generative model that needs to be adjusted to obtain predicted answers; an adjustment module 1502 for adjusting the generative model based on the desired answers and the predicted answers of the training samples; The training sample prompts include the original query, the modified query, the search results, and the target command.

[0145] In one embodiment, the method of assembling the prompt comprises: Sampling original queries and corresponding modified queries in a modified query dictionary; Obtaining a multi-intent query based on the original query and the modified query; inputting the multi-intent query into a search engine to obtain search results; Assembling a task description area, a dialogue information area, a search result area, and a command area of ​​the prompt based on the original query, the modified query, the reference results, and a target command.

[0146] For specific functions and exemplary descriptions of each module and sub-module of the apparatus according to the embodiments of the present disclosure, please refer to the relevant descriptions of the corresponding steps in the above-mentioned method embodiments, and they will not be repeated here.

[0147] In the technical solution of the present disclosure, the acquisition, storage, and application of users' personal information comply with the provisions of relevant laws and regulations and do not violate public order and morals.

[0148] According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a non-transitory computer-readable storage medium, and a program product.

[0149] 16 is a block diagram of an electronic device 1600 for implementing an embodiment of the present disclosure. The electronic device refers to various types of digital computers, including, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device also refers to various types of mobile devices, including, for example, personal digital assistants, cellular phones, intelligent phones, wearable devices, and other similar computing devices. The components, their connections, and functions described in this disclosure are merely exemplary and do not limit the implementation of what is described and specified in this disclosure.

[0150] 16, device 1600 includes a computing unit 1601 that can perform various appropriate operations and processes based on computer program instructions stored in a read-only memory (ROM) 1602 or loaded from a storage unit 1608 into a random access memory (RAM) 1603. The RAM 1603 can further store various programs and data required for the operation of device 1600. The computing unit 1601, ROM 1602, and RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.

[0151] The components of device 1600 are connected to an I / O interface 1605, which includes input units 1606 such as a keyboard and a mouse, output units 1607 such as various displays and speakers, storage units 1608 such as a magnetic disk and an optical disk, and communication units 1609 such as a network card, a modem, a wireless communication transceiver, etc. The communication units 1609 allow device 1600 to exchange information / data with other devices via a computer network such as the Internet and / or various carrier networks.

[0152] The computing unit 1601 may be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 1601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, computing units that execute various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1601 performs each of the methods and processes described above, such as the thread stripping method. For example, in some embodiments, the thread stripping method may be implemented as a computer software program tangibly embodied in a machine-readable medium such as the storage unit 1608. In some embodiments, some or all of the computer program may be loaded and / or installed into the device 1600 via the ROM 1602 and / or the communication unit 1609. When the computer program is loaded into the RAM 1603 and executed by the computing unit 1601, it may perform one or more steps of the thread stripping method described above. Additionally, in other embodiments, the computing unit 1601 may be configured to perform the thread stripping method in any other suitable manner (eg, firmware).

[0153] Various embodiments of the systems or techniques described in this disclosure may be implemented using digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. Each of these embodiments may involve execution by one or more computer programs executed and / or interpreted by a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor, capable of receiving data and instructions from, and transferring data and instructions to, a storage system, at least one input device, and at least one output device.

[0154] Program code for carrying out the methods of the present disclosure can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programming data processing apparatus, such that when the program code is executed by the processor or controller, it can perform the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on-site, partially on-site, as a separate software package partially on-site and partially on a remote site, or entirely on a remote site or server.

[0155] In the context of this disclosure, a machine-readable medium may be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Further examples of machine-readable storage media include one or more hard-wired electrical connections, a portable computer disk cartridge, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any combination of the foregoing.

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

[0157] The systems and techniques described herein can be implemented in a computing system that includes background components (e.g., as a data server), middleware components (e.g., an application server), front-end components (e.g., a user computer having a graphical user interface or network browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, middleware, or front-end components. Components of the system can be connected to each other via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0158] The computer system may include a client and a server. Typically, the client and server are remote from each other and generally interact via a communication network. The client-server relationship is created by a computer program running on a corresponding computer. The server may be a cloud server, a server in a distributed system, or a server incorporating a blockchain.

[0159] It should be understood that steps can be newly ranked, added, or deleted using the various aspects of the flow shown above. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order. This disclosure is not limited thereto, as long as the technical solutions disclosed in this disclosure can achieve the desired results.

[0160] The above specific examples do not constitute limitations on the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions are possible depending on design considerations and other factors. Any modifications, equivalent replacements, improvements, etc. within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. 1. A result generation method comprising: Obtaining a modification query corresponding to the input query; retrieving a lookup result based on the input query and the corresponding modified query; generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result; How results are generated.

2. To get the change query that corresponds to the input query, searching a modified query dictionary for a modified query corresponding to the input query; The method of claim 1 .

3. Retrieving and obtaining a reference result based on the input query and the corresponding modified query includes: obtaining a multi-intent query based on the input query and the corresponding modified query; inputting the multi-intent query into a search engine and obtaining reference results; The method of claim 1 .

4. Obtaining a multi-intent query based on the input query and the corresponding modified query includes: performing an induction process on the input query and the corresponding modified query using a large-scale language model to obtain the multi-intent query; The result generation method of claim 3 .

5. generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result, inputting the multi-intention query and the reference result into a generative model to obtain an output result corresponding to the input query. The result generation method of claim 3 .

6. The training samples for the generative model include prompts and answers, the prompts including the original query, the modified query, the search results, and the target command. The method of claim 1 .

7. The original query and the modified query are obtained by sampling in a modified query dictionary. The method of claim 1 .

8. The result generation method includes: and cleaning a plurality of modified queries related to the original query in the session based on the search intent of the original query. The method of claim 1 .

9. Cleaning a plurality of modified queries related to an original query in a session based on a search intent of the original query includes: Obtaining a first similarity between the original query and the modified query in a session through a keyword matching method, determining whether the original query and the modified query have similar search intents based on the first similarity, and reserving the modified query that has similar search intent to the original query; obtaining a second similarity between the original query and the modified query in the session using a semantic understanding intent determination method; determining whether the original query and the modified query have similar search intents based on the second similarity; and reserving the modified query that is similar to the search intent of the original query; The method of claim 8 .

10. The result generation method includes: ranking a plurality of modified queries related to the original query based on key features including at least one of a modified query rate, a modified query source, and post-modified query feedback information; selecting a modified query to be retained from the plurality of modified queries related to the original query based on the ranking result; The method of claim 1 .

11. The result generation method includes: aggregating the original query and the pending modified queries according to search intent based on a dynamic time window; The method of claim 1 .

12. A method for training a generative model, comprising: Inputting the training sample prompts into the generative model that needs to be tuned to get predicted answers; and adjusting the generative model based on the desired answers and the predicted answers of the training samples; The training sample prompts include an original query, a modified query, a search result, and a target command. How to train a generative model.

13. The method for assembling the prompt comprises: Sampling original queries and corresponding modified queries in a modified query dictionary; obtaining a multi-intent query based on the original query and the modified query; inputting the multi-intent query into a search engine and obtaining reference results; and assembling a task description area, a dialogue information area, a search result area, and a command area of ​​the prompt based on the original query, the modified query, the reference results, and a target command. The method for training a generative model according to claim 12.

14. 1. A result generating device, comprising: an acquisition module for acquiring a modification query corresponding to the input query; a search module for searching and obtaining reference results based on the input query and the corresponding modified query; a generation module for generating an output result corresponding to the input query based on the input query, the corresponding modified query, and the reference result; Result generator.

15. The acquisition module: and searching a modified query dictionary for a modified query corresponding to the input query. The result generating device of claim 14.

16. The search module: a multi-intent query acquisition submodule for acquiring a multi-intent query based on the input query and the corresponding modified query; a search submodule for inputting the multi-intention query into a search engine and obtaining search results; The result generating device of claim 14.

17. The multi-intention query acquisition submodule: and performing an induction process on the input query and the corresponding modified query using a large-scale language model to obtain the multi-intent query.

17. The result generating device of claim 16.

18. The generation module: The multi-intention query and the reference result are input into a generative model, which is further used to obtain an output result corresponding to the input query.

17. The result generating device of claim 16.

19. The training samples for the generative model include prompts and answers, the prompts including the original query, the modified query, the search results, and the target command.

15. The result generating device of claim 14.

20. The original query and the modified query are obtained by sampling in a modified query dictionary.

15. The result generating device of claim 14.

21. the result generating device, a cleaning module for cleaning a plurality of modified queries related to the original query in a session based on a search intent of the original query; The result generating device of claim 14.

22. The cleaning module comprises: Obtaining a first similarity between the original query and the modified query in a session through a keyword matching method, determining whether the original query and the modified query have similar search intents based on the first similarity, and reserving the modified query that has similar search intent to the original query; and further using the second similarity between the original query and the modified query in the session through an intent determination method of semantic understanding; determining whether the original query and the modified query have similar search intents based on the second similarity; and reserving the modified query that has similar search intent to the original query.

22. The result generating device of claim 21.

23. the result generating device, a ranking module for ranking a plurality of modified queries related to the original query based on key features including at least one of a modified query rate, a modified query source, and post-modified query feedback information; a retention module for selecting a modified query to be retained from the plurality of modified queries related to the original query based on the ranking result; 23. A result generating device according to any one of claims 14 to 22.

24. the result generating device, an aggregation module for aggregating the original query and the pending modified queries according to a search intent based on a dynamic time window; 23. A result generating device according to any one of claims 14 to 22.

25. 1. An apparatus for training a generative model, comprising: an input module for inputting training sample prompts into the generative model that needs to be tuned to obtain predicted answers; an adjustment module for adjusting the generative model based on the desired answers and the predicted answers of the training samples; The training sample prompts include an original query, a modified query, a search result, and a target command. A training device for generative models.

26. The method for assembling the prompt comprises: Sampling original queries and corresponding modified queries in a modified query dictionary; obtaining a multi-intent query based on the original query and the modified query; inputting the multi-intent query into a search engine and obtaining reference results; and assembling a task description area, a dialogue information area, a search result area, and a command area of ​​the prompt based on the original query, the modified query, the reference results, and a target command.

26. An apparatus for training a generative model according to claim 25.

27. at least one processor; a memory communicatively coupled to the at least one processor; An electronic device, wherein the memory stores instructions executable by the at least one processor, the instructions, when executed by the at least one processor, causing the at least one processor to perform a result generation method according to any one of claims 1 to 11 or a method for training a generative model according to claim 12 or claim 13.

28. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the result generation method of any one of claims 1 to 11 or the method for training a generative model of claim 12 or claim 13.

29. A program for implementing the result generation method according to any one of claims 1 to 11 or the method for training a generative model according to claim 12 or claim 13 when executed by a processor in a computer.

Citation Information

Patent Citations

  • Intelligent document retrieval generation method and system based on RAG technology

    CN118332072A

  • Information search system

    JP2019121392A

  • Information processing device, information processing method, and program

    JP2023055916A