Search

CN-121614511-B - Model-based data retrieval method and electronic equipment

CN121614511BCN 121614511 BCN121614511 BCN 121614511BCN-121614511-B

Abstract

The application discloses a data retrieval method and electronic equipment based on a model, which relate to the technical field of large model data retrieval, and are used for receiving a retrieval request of a user, wherein the retrieval request carries request data, determining a target retrieval strategy and initial retrieval parameters corresponding to the target retrieval strategy according to reward estimated values respectively corresponding to a plurality of strategies prestored in a target language model, wherein the reward estimated values are used for representing the effectiveness of the strategy, retrieving the request data according to the target retrieval strategy and the initial retrieval parameters through the target language model to obtain an initial retrieval result, outputting the initial retrieval result, responding to feedback operation of the user on the initial retrieval result, determining feedback reward data of the initial retrieval result, determining target retrieval parameters according to the feedback reward data and the initial retrieval parameters, and retrieving the request data according to the target retrieval strategy and the target retrieval parameters through the target language model to obtain the target retrieval result.

Inventors

  • WANG QUANHUI

Assignees

  • 苏州元脑智能科技有限公司

Dates

Publication Date
20260512
Application Date
20260202

Claims (8)

  1. 1. A model-based data retrieval method, the method comprising: receiving a search request of a user, wherein the search request carries request data; Determining a target retrieval strategy and initial retrieval parameters corresponding to the target retrieval strategy according to reward estimation values respectively corresponding to a plurality of retrieval strategies prestored in a target language model, wherein the reward estimation values are used for representing the efficiency of the retrieval strategy, and the initial retrieval parameters are determined according to the number of historical retrieval documents of the target retrieval strategy and the dynamic mixed retrieval proportion; According to the target retrieval strategy and the initial retrieval parameters, retrieving the request data through the target language model to obtain an initial retrieval result; outputting the initial search result; Responding to the feedback operation of the user on the initial search result, and collecting multi-dimensional feedback data of the user, wherein the multi-dimensional feedback data comprises at least one of explicit feedback data, implicit feedback data, index feedback data and context characteristic feedback data; calculating to obtain a reward score of at least one dimension according to the multi-dimensional feedback data; determining feedback rewarding data of the initial search result according to the rewarding weight and rewarding score of each dimension; performing disturbance processing on the initial retrieval parameters to obtain candidate retrieval parameters; determining target retrieval parameters according to the reward data corresponding to the candidate retrieval parameters and the feedback reward data; And searching the request data through the target language model according to the target search strategy and the target search parameters to obtain a target search result.
  2. 2. The method according to claim 1, wherein determining the target search strategy and the initial search parameters corresponding to the target search strategy according to the prize estimation values respectively corresponding to the plurality of search strategies pre-stored in the target language model comprises: acquiring a historical average rewarding value and strategy selection times corresponding to each retrieval strategy, wherein the historical average rewarding value is determined according to feedback of the user in a historical model retrieval process; determining a reward estimation value corresponding to each search strategy according to the historical average reward value and the strategy selection times; Selecting the search strategy corresponding to the largest reward estimation value as the target search strategy; And determining the initial retrieval parameters corresponding to the target retrieval strategy according to the historical retrieval document quantity and the dynamic mixed retrieval proportion of the target retrieval strategy.
  3. 3. The method of claim 1, wherein said retrieving said request data via said target language model according to said target retrieval policy and said initial retrieval parameters to obtain an initial retrieval result comprises: Configuring the target language model through the target retrieval strategy and the initial retrieval parameters; and searching the request data through the configured target language model to obtain the initial search result.
  4. 4. The method of claim 1, wherein calculating a reward score for at least one dimension from the multi-dimensional feedback data comprises: when the multidimensional feedback data comprise index feedback data, acquiring accuracy data and correlation data of the initial search result; And carrying out weighted summation on the accuracy data and the correlation data to obtain the reward score of the index feedback dimension.
  5. 5. The method of claim 1, wherein prior to determining feedback reward data for the initial search result based on the reward weights and the reward scores for each dimension, the method further comprises: calculating the weight score of each dimension according to the reward score of each dimension and a preset parameter vector; And determining the rewarding weight of each dimension according to the ratio of the weight score of each dimension to the total sum of the weight scores.
  6. 6. The method of claim 5, wherein determining the bonus weight for each dimension based on the ratio of the weight score to the sum of the weight scores for each dimension comprises: and determining the rewarding weight of each dimension according to the ratio of the weight score of each dimension to the total sum of the weight scores and a preset temperature coefficient.
  7. 7. The method of claim 1, wherein determining the target search parameter based on the reward data corresponding to the candidate search parameter and the feedback reward data comprises: When the reward data corresponding to the candidate retrieval parameters is greater than or equal to the feedback reward data, determining the candidate retrieval parameters as the target retrieval parameters; And when the reward data corresponding to the candidate retrieval parameters is smaller than the feedback reward data, calculating to obtain parameter updating probability according to a difference value between the reward data corresponding to the candidate retrieval parameters and the feedback reward data and a temperature decay function, and determining the target retrieval parameters from the candidate retrieval parameters and the initial retrieval parameters based on the parameter updating probability.
  8. 8. An electronic device, comprising: A memory for storing a computer program; Processor for implementing the steps of the model-based data retrieval method according to any one of claims 1 to 7 when executing said computer program.

Description

Model-based data retrieval method and electronic equipment Technical Field The application relates to the technical field of large model data retrieval, in particular to a data retrieval method based on a model and electronic equipment. Background The retrieval enhancement generation (RETRIEVAL-Augmented Generation, RAG) is an artificial intelligent architecture combining document retrieval and text generation, is widely applied to scenes such as open domain question-answering, long document abstract, knowledge reasoning, enterprise knowledge base search and the like, and is generally used for retrieval at present by adopting a predefined and fixed retrieval strategy and parameters, and cannot adapt to diversified requirements of different users and different queries, so that the problem of how to realize dynamic update of the retrieval strategy and model parameters of a model is a problem to be solved urgently at present. Disclosure of Invention The application provides a data retrieval method based on a model and electronic equipment, which at least solve the problem of how to realize the retrieval strategy of the model and the dynamic update of model parameters. The application provides a data retrieval method based on a model, which comprises the following steps: receiving a search request of a user, wherein the search request carries request data; Determining a target retrieval strategy and initial retrieval parameters corresponding to the target retrieval strategy according to reward estimation values respectively corresponding to a plurality of retrieval strategies prestored in a target language model, wherein the reward estimation values are used for representing the efficacy of the retrieval strategy; According to the target retrieval strategy and the initial retrieval parameters, retrieving the request data through the target language model to obtain an initial retrieval result; Outputting the initial search result, and determining feedback rewarding data of the initial search result in response to feedback operation of the user on the initial search result; determining target retrieval parameters according to the feedback reward data and the initial retrieval parameters; And searching the request data through the target language model according to the target search strategy and the target search parameters to obtain a target search result. The application also provides a data retrieval device based on the model, which comprises: the receiving and transmitting module is used for receiving a search request of a user, wherein the search request carries request data; The processing module is used for determining a target retrieval strategy and initial retrieval parameters corresponding to the target retrieval strategy according to reward estimation values respectively corresponding to a plurality of retrieval strategies prestored in the target language model, wherein the reward estimation values are used for representing the efficacy of the retrieval strategy; The processing module is also used for searching the request data through the target language model according to the target search strategy and the initial search parameter to obtain an initial search result; the receiving and transmitting module is also used for outputting the initial search result; The processing module is also used for responding to the feedback operation of the user on the initial search result and determining feedback rewarding data of the initial search result; the processing module is also used for determining target retrieval parameters according to the feedback reward data and the initial retrieval parameters; And the processing module is also used for searching the request data through the target language model according to the target search strategy and the target search parameter to obtain a target search result. The application also provides electronic equipment, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor is used for realizing the steps of any model-based data retrieval method when executing the computer program. The application also provides a computer readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor implements the steps of any of the model-based data retrieval methods described above. The application also provides a computer program product comprising a computer program which when executed by a processor implements the steps of any of the model-based data retrieval methods described above. The method comprises the steps of receiving a search request of a user, carrying request data in the search request, determining a target search strategy and initial search parameters corresponding to the target search strategy according to reward estimation values respectively corresponding to a plurality of search strategies prestored in a target language model, searching the r