Context aggregation-based user problem optimization method and system, terminal and medium

By constructing aggregation cases and using reinforcement learning-optimized information aggregation large language model, the problem of context information aggregation errors and response time extension in multiple rounds of dialogue systems is solved, and more efficient and accurate context information processing is achieved.

CN119918653APending Publication Date: 2025-05-02SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411754003.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The current large language model faces the problems of context information aggregation errors and extended model response time in multiple rounds of dialogue systems and intelligent question-and-answer systems, especially when the number of historical conversations increases.

Method used

The user problem optimization method based on context aggregation is adopted. By obtaining the current user problem and preprocessing it, it is constructed with historical question and answers, inputting the information aggregation large language model through reinforcement learning is optimized, using the target aggregation strategy for information aggregation, and the model is reinforcement learning based on user feedback.

Benefits of technology

It improves the accuracy of context information aggregation, reduces aggregation errors, simplifies the context information aggregation process, reduces system complexity and processing time, and improves system stability and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918653A_ABST
    Figure CN119918653A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of large language models, and particularly discloses a user problem optimization method and system based on context aggregation, a terminal and a medium. Forming a current aggregation case by the pre-processed current user question and the historical question and answer pair; inputting the current aggregation case into an information aggregation large language model subjected to reinforcement learning, and outputting a user question subjected to information aggregation optimization by adopting a target aggregation strategy through the information aggregation large language model; receiving a satisfaction feedback result of the user on the current optimized user problem; and performing reinforcement learning on the information aggregation large language model by using a satisfaction feedback result. According to the invention, the aggregation strategy is adaptively adjusted and updated, the accuracy of context information aggregation is improved, and aggregation errors are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of large language models, and in particular relates to a user question optimization method, system, terminal and medium based on context aggregation. Background Art

[0002] Currently, with the continuous development of large language model technology, application scenarios are gradually expanding to more complex multi-round dialogue systems and intelligent question-answering systems. In these systems, users' questions are often related to contextual information in historical dialogues. For example, between "What's the weather like tomorrow?" and "Do I need an umbrella?", the "that" in the latter obviously refers to "tomorrow's weather" in the former. However, current context information aggregation methods mainly rely on the prompt engineering of large language models. Although this method can solve the problem to a certain extent, it still faces the problem of aggregation errors, especially when the number of historical dialogues gradually increases, the complexity of the prompt engineering also increases, resulting in longer model response time and reduced system stability. Summary of the invention

[0003] To solve the above problems, the present invention provides a user question optimization method, system, terminal and medium based on context aggregation, which adaptively adjust and update the aggregation strategy, improve the accuracy of context information aggregation, and reduce aggregation errors.

[0004] In a first aspect, the technical solution of the present invention provides a user question optimization method based on context aggregation, comprising the following steps: Get the current user question and pre-process it; The preprocessed current user question and historical question-answer pairs form the current aggregation case; The current aggregation case is input into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Receive user satisfaction feedback on the currently optimized user issues; Use satisfactory feedback results to reinforce learning of information aggregation large language models.

[0005] In an optional implementation, the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy, specifically including: Compare the current aggregation case with the stored aggregation cases that satisfy the user, select the aggregation cases of the same type as the current aggregation case from the stored aggregation cases that satisfy the user, record them as target aggregation cases, and the aggregation strategy adopted by the target aggregation case is the target aggregation strategy; User questions after information aggregation optimization using target aggregation strategy.

[0006] In an optional implementation, the information aggregation large language model is reinforced with satisfactory feedback results, specifically including: The state space of reinforcement learning is the current question and the historical question-answer pairs. The action space is to select the aggregated cases of the same type as the current aggregated cases from the stored aggregated cases that the user is satisfied with. The reward function is the consistency between the optimized user question and the actual intention. If the satisfaction feedback result is satisfactory, a positive reward is given, otherwise a negative reward is given. According to the selected training method, the information aggregation large language model is trained and optimized based on the reward function.

[0007] In an optional implementation, according to the selected training method, the information aggregation large language model is trained and optimized based on the reward of the reward function, specifically including: The Q-learning algorithm is used to train and optimize the information aggregation language model. The Q value is adjusted according to the reward. The Q value update formula is:

[0008] in, is the learning rate, is the discount factor, is the current reward, is the maximum Q value of the next state.

[0009] In an optional implementation, after receiving the user's satisfactory feedback result on the currently optimized user question, the following steps are also included: The current optimized user question with satisfactory feedback result label and its historical question-answer pairs are stored in the memory bank.

[0010] In an optional implementation, obtaining the current user question and preprocessing it specifically includes: Extract entities from the current user question and historical question-answer pairs through the named entity recognition model; Find entities in historical question-answer pairs that have the same entity type as the entity in the current user's question; Based on the search results, the prompt engineering of the large language model is used to resolve the current user's question.

[0011] In an optional implementation, the preprocessed current user question and the historical question-answer pair are combined to form a current aggregation case, specifically including: Use the pre-trained word embedding model to convert the pre-processed current user question and each historical question-answer pair into a vector; Calculate the similarity between the preprocessed current user question and each historical question-answer pair based on the conversion vector; Filter out at least one historical question-answer pair that has the highest similarity to the preprocessed current user question; The preprocessed current user question and the filtered historical question-answer pairs constitute the current aggregation case.

[0012] In a second aspect, the technical solution of the present invention provides a user question optimization system based on context aggregation, comprising: User question preprocessing module: obtain current user questions and perform preprocessing; Constructing the aggregation case module: The pre-processed current user question and historical question-answer pairs form the current aggregation case; User question optimization module: inputs the current aggregation case into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Feedback result receiving module: receiving user satisfaction feedback on the currently optimized user problem; Reinforcement learning module: Use satisfactory feedback results to perform reinforcement learning on the information aggregation large language model.

[0013] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory, used for storing a user question optimization program based on context aggregation; A processor is used to implement the steps of the user question optimization method based on context aggregation as described in any of the above items when executing the user question optimization program based on context aggregation.

[0014] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which a user problem optimization program based on context aggregation is stored. When the user problem optimization program based on context aggregation is executed by a processor, the steps of the user problem optimization method based on context aggregation as described in any of the above items are implemented.

[0015] The user question optimization method, system, terminal and medium based on context aggregation provided by the present invention have the following beneficial effects compared with the prior art: constructing aggregation cases of user questions and historical question-answer pairs, selecting target aggregation strategies for information aggregation by a large language model of information aggregation after reinforcement learning, realizing the optimization of user questions, and reinforcing the training of the large language model of information aggregation according to the feedback of the optimization results. The present invention introduces a large language model of information aggregation after reinforcement learning, which can more accurately understand the context information of user questions and avoid the errors that may occur in the traditional aggregation method that relies on prompt engineering. After reinforcement learning, the large language model can more effectively identify and integrate key information in historical conversations, thereby generating more accurate and optimized questions that are more in line with user intentions. When processing a large number of historical conversations, the traditional prompt engineering method often increases the complexity, resulting in longer model response time and decreased system stability. The method of the present invention simplifies the process of context information aggregation through the automated processing of the large language model of information aggregation, reduces the complexity and processing time of the system, and improves the stability and response speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flowchart of a user question optimization method based on context aggregation provided by an embodiment of the present invention.

[0017] Figure 2 It is a schematic block diagram of the structure of a user question optimization system based on context aggregation provided by an embodiment of the present invention.

[0018] Figure 3 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0021] Figure 1 : is a flow chart of a user question optimization method based on context aggregation provided by an embodiment of the present invention. Figure 1 The execution subject may be a user question optimization system based on context aggregation. The user question optimization method based on context aggregation provided in the embodiment of the present invention is executed by a computer device, and accordingly, the user question optimization system based on context aggregation runs in the computer device. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0022] like Figure 1 As shown, the method includes the following steps.

[0023] S1, obtain the current user question and perform preprocessing.

[0024] The preprocessing of this embodiment refers to the reference resolution of the current user question and the preliminary optimization of the current user question, which can provide more accurate information for subsequent information aggregation, and specifically includes the following steps.

[0025] S1.1, extract entities from the current user question and historical question-answer pairs through the named entity recognition model.

[0026] This embodiment first extracts entities from the current user question and historical question-answer pairs, extracts them through an entity recognition model, and gives entity types. The entity types are predefined in advance and are related to the field. For example, the entity types in the water conservancy field may be rivers, typhoons, reservoirs, etc.

[0027] For example, “How long is this river?” identifies the entity “this river” and the type “river”.

[0028] S1.2, find entities in historical question-answer pairs that have the same entity type as the entity in the current user’s question.

[0029] S1.3, based on the search results, use the large language model’s prompt engineering to resolve the current user’s question.

[0030] This embodiment uses the prompting project of the large language model to perform coreference resolution on user questions. The prompting project is to integrate the user question and entities of the same type into a coreference resolution prompt word, which is input into the large language model, and the model returns the user question after coreference resolution.

[0031] S2, the preprocessed current user question and historical question-answer pairs constitute the current aggregation case.

[0032] The purpose of this step is to construct aggregation cases so that the information aggregation model can aggregate user questions according to the aggregation cases to obtain optimized questions, which specifically includes the following steps.

[0033] S2.1, use the pre-trained word embedding model to convert the pre-processed current user question and each historical question-answer pair into vectors.

[0034] In a specific embodiment, the historical conversation includes multiple rounds of questions asked by the user and the system's answers. The system first needs to convert the historical conversation into a vector representation using a pre-trained word embedding model (such as BERT), and convert the user's question into a vector representation using the same pre-trained word embedding model.

[0035] S2.2, calculate the similarity between the preprocessed current user question and each historical question-answer pair based on the conversion vector.

[0036] Similarity (S in the formula) is calculated using cosine similarity. The formula for calculating cosine similarity is as follows:

[0037] Represents the inner product of vector A and vector B, that is, the result of multiplying and adding corresponding elements.

[0038] The modulus (length) of vector A can be obtained by summing the squares of each element in vector A and then taking the square root.

[0039] Represents the magnitude (length) of vector B, calculated in the same way as vector A.

[0040] S2.3, filter out at least one historical question-answer pair that has the highest similarity to the preprocessed current user question.

[0041] S2.4, the preprocessed current user question and the screened historical question-answer pairs constitute the current aggregation case.

[0042] There may be multiple question-answer pairs in the historical question-answer pairs, among which there may be questions that have low relevance to the current user's question. To simplify the computational complexity, this embodiment selects historical question-answer pairs that have greater relevance to the current question from the historical question-answer pairs for aggregation, thereby improving the aggregation effect.

[0043] S3, inputs the current aggregation case into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy.

[0044] In this embodiment, multiple aggregation cases are pre-stored in the memory library, including the aggregation cases stored by the maintenance personnel, and the aggregation cases composed of the current optimized user questions and their historical question-answer pairs with the satisfaction feedback result label. The information aggregation large language model compares the current aggregation case with the stored aggregation cases that the user is satisfied with, and selects the aggregation cases of the same type as the current aggregation case from the stored aggregation cases that the user is satisfied with, and records them as target aggregation cases. The aggregation strategy adopted by the target aggregation case is the target aggregation strategy; then the target aggregation strategy is used to perform information aggregation optimization on the user questions.

[0045] S4, receiving user satisfaction feedback on the currently optimized user problem.

[0046] In this embodiment, after receiving the optimized question, the user gives satisfactory feedback. Figure 1 If the aggregation strategy is consistent with the actual intention, satisfactory feedback will be given. If it is inconsistent with the actual intention, unsatisfactory feedback will be given. The satisfactory feedback result is the label of the aggregation strategy of the aggregation case, which is used to indicate whether the current aggregation is accurate.

[0047] S5, uses satisfactory feedback results to reinforce the learning of the information aggregation large language model.

[0048] This embodiment uses reinforcement learning (RL) to optimize the context information aggregation strategy. The system is set as an intelligent agent, the environment is the user input questions and historical dialogues, and the reward function is the correctness of the aggregation strategy. The basic framework of the strategy is as follows.

[0049] State space S: It consists of the semantic representation of the current question and the historical dialogue, that is, .

[0050] Action space A: One or more relevant aggregation cases are selected from the aggregation case library as the material for generating prompts. Each aggregation case contains different aggregation strategies or context information integration methods. The agent selects the most appropriate aggregation case from the case library according to the current state (i.e., the user's input question and historical dialogue), and then generates prompts to optimize the aggregation of context information. In an optional embodiment, the action space is to filter aggregation cases of the same type as the current aggregation case from the stored aggregation cases that the user is satisfied with.

[0051] Exemplarily, assuming that the system's aggregated case library contains processing templates for different domains or different types of problems, the agent's goal is to generate adaptable aggregated prompts by selecting cases from the case library that are most relevant to the current dialogue.

[0052] Example 1: User question involves multiple entities User input: "Can you tell me the main points of their discussion?" Historical Q&A pairs: (Q: What did Wang Hua say at the meeting? A: Wang Hua said that the enthusiasm of employees needs to be improved, ...) (Q: What opinions did Li Ming express? A: Li Ming said that the need for project progress is the first priority, ...) State space: =[(Q: What did Wang Hua say at the meeting, A: Wang Hua said that it is necessary to improve the work enthusiasm of employees, ...), (Q: What opinions did Li Ming express, A: Li Ming said that the progress of the project is the first priority, ...)] = "Can you tell me the main points they discussed?" Action selection: Select the "Multi-entity information aggregation" case from the aggregation case library, which describes how to integrate the conversation information of multiple characters or entities and generate a comprehensive aggregation result covering all important entities. Generated prompt: "Please give me Wang Hua's opinions on employee motivation and Li Ming's views on project progress." Example 2: User question requires reasoning User input: "What should be done next?" Historical question-answer pairs: (Q: What did Wang Hua say at the meeting? A: Wang Hua said that the enthusiasm of employees needs to be improved, ...) (Q: What opinions did Li Ming express? A: Li Ming said that the need for project progress is the first priority, ...) State space: = [(Q: What did Wang Hua say at the meeting, A: Wang Hua said that it is necessary to improve the work enthusiasm of employees, ...), (Q: What opinions did Li Ming express, A: Li Ming said that the progress of the project is the first priority, ...)] = “What should I do next?” Action selection: Select the “Reasoning and Decision-making” case from the aggregated case library, which describes how to reason and provide action suggestions based on historical feedback. Generated prompt: “If we consider the suggestions mentioned by Li Ming and combine them with Wang Hua’s feedback, what should we do next?” Reward function R: When the system correctly aggregates context information, a positive reward is given; otherwise, a negative reward is given. The reward function can be set to determine whether the aggregated response is consistent with the actual meaning. Figure 1 To, recorded as: in, The quality of the aggregation result is evaluated through user feedback. If the user is satisfied, the reward is positive, otherwise it is negative.

[0053] According to the reinforcement learning architecture, the information aggregation large language model is trained and optimized based on the reward function according to the selected training method.

[0054] An optional implementation method uses the Q-learning algorithm to train and optimize the information aggregation language model, and adjusts the Q value according to the reward. The Q value update formula is:

[0055] in, is the learning rate, is the discount factor, is the current reward, is the maximum Q value of the next state.

[0056] In an optional implementation, the training optimization timing of the information aggregation model is adjusted according to user needs, for example, by analyzing newly generated aggregation cases and feedback to determine whether the current strategy is effective. If the number of aggregation errors exceeds a preset threshold, the system will automatically adjust the aggregation strategy. Alternatively, the model can be retrained regularly based on the accumulated aggregation cases and feedback data to optimize the aggregation strategy.

[0057] An embodiment of a user question optimization method based on context aggregation is described in detail above. Based on the user question optimization method based on context aggregation described in the above embodiment, an embodiment of the present invention also provides a user question optimization system based on context aggregation corresponding to the method.

[0058] Figure 2 It is a schematic block diagram of the structure of a user question optimization system based on context aggregation provided by an embodiment of the present invention. In this embodiment, the user question optimization system 200 based on context aggregation can be divided into multiple functional modules according to the functions performed by it. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.

[0059] User question preprocessing module 210: obtains the current user question and performs preprocessing.

[0060] Constructing aggregated case module 220: Constructing the current aggregated case by combining the pre-processed current user question and historical question-answer pairs.

[0061] User question optimization module 230: inputs the current aggregation case into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy.

[0062] Feedback result receiving module 240: receiving user satisfaction feedback results on the currently optimized user problem.

[0063] Reinforcement learning module 250: Use the satisfactory feedback results to perform reinforcement learning on the information aggregation large language model.

[0064] The user question optimization system based on context aggregation of this embodiment is used to implement the aforementioned user question optimization method based on context aggregation. Therefore, the specific implementation method of this system can be seen in the implementation example part of the user question optimization method based on context aggregation in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be elaborated here.

[0065] In addition, since the user question optimization system based on context aggregation in this embodiment is used to implement the aforementioned user question optimization method based on context aggregation, its function corresponds to that of the aforementioned method and will not be described in detail here.

[0066] Figure 3 A schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention includes: a processor 310, a memory 320 and a communication unit 330. The processor 310 is used to implement the following steps when implementing the user question optimization program based on context aggregation stored in the memory 320: Get the current user question and pre-process it; The preprocessed current user question and historical question-answer pairs form the current aggregation case; The current aggregation case is input into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Receive user satisfaction feedback on the currently optimized user issues; Use satisfactory feedback results to reinforce learning of information aggregation large language models. The terminal 300 includes a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the server shown in the figure does not constitute a limitation of the present invention, and it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0067] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.

[0068] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 310 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0069] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0070] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0071] The computer storage medium stores a user question optimization program based on context aggregation, and when the user question optimization program based on context aggregation is executed by a processor, the following steps are implemented: Get the current user question and pre-process it; The preprocessed current user question and historical question-answer pairs form the current aggregation case; The current aggregation case is input into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Receive user satisfaction feedback on the currently optimized user issues; Use satisfactory feedback results to reinforce learning of information aggregation large language models. Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

[0072] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0073] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0074] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0075] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A user question optimization method based on context aggregation, characterized in that: The following steps are involved: Get the current user question and pre-process it; The preprocessed current user question and historical question-answer pairs form the current aggregation case; The current aggregation case is input into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Receive user satisfaction feedback on the currently optimized user issues; Use satisfactory feedback results to reinforce learning of information aggregation large language models.

2. The user question optimization method based on context aggregation according to claim 1 is characterized in that: The information aggregation large language model outputs the user questions after information aggregation optimization using the target aggregation strategy, including: Compare the current aggregation case with the stored aggregation cases that satisfy the user, select the aggregation cases of the same type as the current aggregation case from the stored aggregation cases that satisfy the user, record them as target aggregation cases, and the aggregation strategy adopted by the target aggregation case is the target aggregation strategy; User questions after information aggregation optimization using target aggregation strategy.

3. The user question optimization method based on context aggregation according to claim 2 is characterized in that: Use the satisfactory feedback results to reinforce the learning of the information aggregation large language model, including: The state space of reinforcement learning is the current question and the historical question-answer pairs. The action space is to select the aggregated cases of the same type as the current aggregated cases from the stored aggregated cases that the user is satisfied with. The reward function is the consistency between the optimized user question and the actual intention. If the satisfaction feedback result is satisfactory, a positive reward is given, otherwise a negative reward is given. According to the selected training method, the information aggregation large language model is trained and optimized based on the reward function.

4. The user question optimization method based on context aggregation according to claim 3 is characterized in that: According to the selected training method, the information aggregation large language model is trained and optimized based on the reward function, including: The Q-learning algorithm is used to train and optimize the information aggregation language model. The Q value is adjusted according to the reward. The Q value update formula is: in, is the learning rate, is the discount factor, is the current reward, is the maximum Q value of the next state.

5. The user question optimization method based on context aggregation according to claim 4 is characterized in that: After receiving the user's satisfactory feedback on the currently optimized user problem, the following steps are also included: The current optimized user question with satisfactory feedback result label and its historical question-answer pairs are stored in the memory bank.

6. The user question optimization method based on context aggregation according to any one of claims 1 to 5, characterized in that: Get the current user question and perform preprocessing, including: Extract entities from the current user question and historical question-answer pairs through the named entity recognition model; Find entities in historical question-answer pairs that have the same entity type as the entity in the current user's question; Based on the search results, the prompt engineering of the large language model is used to resolve the reference of the current user question.

7. The user question optimization method based on context aggregation according to claim 6 is characterized in that: The preprocessed current user question and historical question-answer pairs form the current aggregation case, which includes: Use the pre-trained word embedding model to convert the pre-processed current user question and each historical question-answer pair into a vector; Calculate the similarity between the preprocessed current user question and each historical question-answer pair based on the conversion vector; Filter out at least one historical question-answer pair that has the highest similarity to the preprocessed current user question; The preprocessed current user question and the filtered historical question-answer pairs constitute the current aggregation case.

8. A user question optimization system based on context aggregation, characterized in that: include: User question preprocessing module: obtain current user questions and perform preprocessing; Constructing the aggregation case module: The pre-processed current user question and historical question-answer pairs form the current aggregation case; User question optimization module: inputs the current aggregation case into the information aggregation large language model after reinforcement learning, and the information aggregation large language model outputs the user question after information aggregation optimization using the target aggregation strategy; Feedback result receiving module: receiving user satisfaction feedback on the currently optimized user problem; Reinforcement learning module: Use satisfactory feedback results to perform reinforcement learning on the information aggregation large language model.

9. A terminal, characterized in that: include: A memory, used for storing a user question optimization program based on context aggregation; A processor, used to implement the steps of the user question optimization method based on context aggregation as described in any one of claims 1 to 7 when executing the user question optimization program based on context aggregation.

10. A computer-readable storage medium, characterized in that: The readable storage medium stores a user question optimization program based on context aggregation, and when the user question optimization program based on context aggregation is executed by a processor, the steps of the user question optimization method based on context aggregation as described in any one of claims 1-7 are implemented.

Citation Information

Cited By

  • Method and device for calling function by large model and medium

    CN120541352A

  • Method and system for generating open source component repair opinions and storage medium

    CN120611388A

  • LLM large model-based operation and maintenance knowledge intelligent question and answer interaction method, apparatus and device

    CN120632017A