Searching method and device and arbitration problem searching method

Through dynamic iterative search technology, the first language model is used to update search conditions and problems, and the problem of poor generalization ability of search results in the legal field is solved, achieving more accurate search results and better user experience.

CN119719313AInactive Publication Date: 2025-03-28GONGDAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510199292.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing search technology lacks a deep understanding of the legal phenomena behind user disputes in vertical searches in the legal field, resulting in poor generalization of search results and it is difficult to understand the user's true intentions.

Method used

Dynamic iterative search technology is used to update the search conditions and original search questions through the first language model, optimize the search direction until the iteration stop condition is met, and then the final search result is generated.

Benefits of technology

It achieves a gradual understanding of the user's true intentions, ensures that the search results are more accurate, and improves the accuracy and user experience of the search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719313A_ABST
    Figure CN119719313A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a search method and device and an arbitration problem search method. The search method comprises the following steps: acquiring an original search question; determining a search condition corresponding to the original search question; iteratively executing the following operations until an iteration stop condition is met: searching by adopting the search condition to obtain a search result; responding to the condition that the search result does not meet a return condition, taking the search result, the search condition and the original search question corresponding to the search condition as input of a first language model, and updating the search condition and the original search question through the first language model, obtaining a new search condition output by the first language model and a new search problem corresponding to the new search condition, and returning to execute the step of searching by adopting the search condition; and generating an answer of the original search question based on the latest search result obtained after iteration is stopped.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of information search technology, and more particularly, to a search method, device, and search method for arbitration problems. Background Art

[0002] With the development of science and technology, Natural Language Processing (NLP) technology is constantly improving. More and more searches will use large models to improve search capabilities. Even so, the current search results still have the problem of poor generalization ability.

[0003] Taking vertical search in the legal field as an example, current search technology lacks a deep understanding of the legal phenomena behind user disputes, and thus has difficulty understanding the user’s true intentions, resulting in poor search results. Summary of the invention

[0004] In view of this, one or more embodiments of this specification provide the following technical solutions: According to a first aspect of one or more embodiments of this specification, a search method is proposed, including: Get the original search question; Determine the search condition corresponding to the original search question; The iteration performs the following operations until the iteration stopping condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original search question corresponding to the search condition as inputs of a first language model, updating the search condition and the original search question through the first language model, obtaining new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition; An answer to the original search question is generated based on the latest search results obtained after the iteration stops.

[0005] Optionally, there are multiple search results obtained by searching using the search condition, and the method further includes: Determine summary information for each search result; Calculating the consistency parameter of the search result according to the summary information; When the consistency parameter is less than the consistency threshold, determining that the search result does not meet the return condition; When the consistency parameter is greater than or equal to a consistency threshold, it is determined that the search result meets the return condition.

[0006] Optionally, the process of generating an answer to the original search question based on the latest search results obtained after the iteration stops includes: The latest search results obtained after the iteration stops are used as input of the second language model, and the latest search results are sorted by the second language model to obtain an answer to the original search question output by the second language model.

[0007] Optionally, the training process of the first language model includes: Acquire a training sample, wherein the training sample includes a positive label and a negative label; The initial language model is trained using the training samples with the goal of making the probability of generating a positive prediction result higher than the probability of generating a negative prediction result, thereby obtaining the trained first language model.

[0008] Optionally, the iteration stopping condition is that the search result satisfies the return condition, or the number of iterations reaches a threshold number.

[0009] According to a second aspect of one or more embodiments of this specification, a method for searching an arbitration problem is proposed, comprising: Obtaining the original arbitration issue; Determining a search condition corresponding to the original arbitration question; The iteration performs the following operations until the iteration stopping condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original arbitration question corresponding to the search condition as inputs of a first language model, updating the search condition and the original arbitration question through the first language model to obtain new search conditions output by the first language model and new arbitration questions corresponding to the new search conditions, and returning to the step of performing the search using the search condition; An answer to the original arbitration question is generated based on the latest search result obtained after the iteration stops.

[0010] According to a third aspect of one or more embodiments of this specification, a search device is provided, including: Question acquisition module, which obtains the original search question; A condition determination module, which determines the search condition corresponding to the original search question; The iterative search module iteratively performs the following operations until the iteration stop condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original search question corresponding to the search condition as inputs of a first language model, updating the search condition and the original search question through the first language model, obtaining new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition; The answer generation module generates an answer to the original search question based on the latest search results obtained after the iteration stops.

[0011] According to a fourth aspect of one or more embodiments of the present specification, an electronic device is proposed, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the aforementioned method by running the executable instructions.

[0012] According to a fifth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the aforementioned method are implemented.

[0013] According to a sixth aspect of one or more embodiments of the present specification, a computer program product is proposed, comprising a computer program / instruction, which implements the steps of the aforementioned method when executed by a processor.

[0014] It can be seen from the above description that when performing a search, the present specification can first use the search conditions corresponding to the original search question to search and obtain search results, and if the results do not meet the return conditions, the search conditions and the original search question can be updated through the first language model to obtain new search conditions and new search questions corresponding to the new search conditions, and the new search conditions can be continued to be used for iterative search until the iteration stop condition is met, and then the answer to the original search question is generated based on the latest search results obtained after the iteration stops.

[0015] It can be seen that this manual adopts dynamic iterative search technology. When the search results do not meet the return conditions, the first language model updates the search conditions based on the latest search results, realizing continuous optimization of the search direction, and then gradually understanding the user's true intention to ensure that the search results are more accurate. At the same time, the entire search process is completed automatically, without the need for users to gradually adjust the search conditions, with a high degree of intelligence and a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the architecture of a search service system provided by an exemplary embodiment.

[0017] Figure 2It is a flowchart of a search method provided by an exemplary embodiment.

[0018] Figure 3 is a flowchart of another search method provided by an exemplary embodiment.

[0019] Figure 4 The present invention is a flowchart of a method for determining whether a search result satisfies a return condition provided by an exemplary embodiment.

[0020] Figure 5 It is a flowchart of a first language model training method provided by an exemplary embodiment.

[0021] Figure 6 The present invention is a flowchart of an arbitration problem searching method provided by an exemplary embodiment.

[0022] Figure 7 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0023] Figure 8 It is a block diagram of a search device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0024] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0025] With the development of science and technology, natural language processing technology is constantly improving, and more and more searches will adopt large models to improve search capabilities. Even so, the current search results still have the problem of poor generalization ability.

[0026] Taking vertical search in the legal field as an example, current search technology lacks a deep understanding of the legal phenomena behind user disputes, and thus has difficulty understanding user intentions, resulting in poor search results.

[0027] Figure 1 FIG. 1 is a schematic diagram of the architecture of a search service system provided by an exemplary embodiment. Figure 1 As shown, the system may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, and the like.

[0028] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 may run a server-side program of an application to implement the relevant functions of the application. For example, when the server 11 runs a search service program, it may be implemented as a corresponding search service platform.

[0029] PC 13 and mobile phone 14 are only some types of electronic devices that users can use. In fact, users can obviously also use electronic devices such as the following types: tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification do not limit this. During operation, the electronic device can run a program on the client side of a certain application to implement the relevant functions of the application. For example, when the electronic device runs a program for a search service, it can be implemented as a client of the search service. Among them, the application program of the client of the above-mentioned search service can be started and run on the electronic device. The program on the client side can be a native application installed on the electronic device, or the program on the client side can be a small program, a quick application or other similar forms. Of course, when using web page technologies such as HTML5 or similar, the relevant functions can be implemented through the page displayed by the browser. The browser here can be an independent browser application or a browser module embedded in certain applications.

[0030] As for the network 12 for interaction between electronic devices such as PC 13 and mobile phone 14 and server 11, it is possible to select a wired or wireless network to achieve communication based on the communication mode supported by the corresponding electronic device, and this specification does not limit this. For example, PC 13 can support both wired and wireless communication, so it can use a wired or wireless network to achieve communication as needed, while mobile phone 14 usually only supports wireless communication, so it can use a wireless network to achieve communication.

[0031] This specification provides a search method that can be applied to the above Figure 1 The server shown in FIG. 1 can also be applied to the aforementioned Figure 1 In the electronic device shown, this specification does not impose any particular limitation on this.

[0032] Please refer to Figure 2 In one embodiment of the present specification, the search method may include the following steps: Step 202: Obtain the original search question.

[0033] In this embodiment, the user can input the question he wants to search through a client program installed in the electronic device, which is called the original search question. Taking the application of the search method to the server as an example, the electronic device can send the original search question input by the user to the server, and the server can then obtain the original search question.

[0034] Step 204: determine the search condition corresponding to the original search question.

[0035] In this embodiment, the original search question is input by the user and may contain problems such as incorrect sentences, typos, repeated sentences, and unclear key points. After obtaining the original search question, the server can determine the search conditions for the search based on the original search question. The search conditions are an understanding of the original search question. Specifically, key questions can be extracted from the original search question, topics can be identified, etc. as the search conditions.

[0036] For example, suppose the original search question is "My neighbor's dog suddenly ran out and scratched my thigh. I was frightened. Can I ask for compensation?" Based on the original search question, the search condition determined can be "My neighbor's dog scratched the person's leg. What is the compensation issue after being frightened?" Step 206, iteratively performing the following operations until an iteration stop condition is satisfied: searching using the search condition to obtain search results; in response to the search results not satisfying the return condition, using the search results, the search condition, and the original search question corresponding to the search condition as inputs to a first language model, updating the search condition and the original search question through the first language model to obtain new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition.

[0037] In this embodiment, when performing the first iteration, the search condition corresponding to the original search question may be used to search and obtain the search results of the first iteration, wherein the number of the search results is usually multiple, that is, after performing one search, multiple search results may be obtained.

[0038] In this embodiment, after obtaining the search results, it can be determined whether the search results meet the return conditions. If they meet the conditions, step 208 can be executed to generate an answer to the original search question based on the obtained search results. If they do not meet the conditions, it usually means that the search results do not meet expectations, and the search conditions can be improved and the search can be continued.

[0039] Among them, whether the search results meet the return condition can be determined by the size relationship between the consistency parameter of each search result and the preset consistency threshold. For example, when the consistency parameter of the search result is greater than or equal to the consistency threshold, it can be determined that the search result meets the return condition, and when the consistency parameter of the search result is less than the consistency threshold, it can be determined that the search result does not meet the return condition.

[0040] In this embodiment, when the search results do not meet the return condition, the search results, the search conditions and the original search question can be used as inputs of the first language model, and the search conditions and the original search question can be updated and improved through the first language model to obtain new search conditions output by the first language model and new search questions corresponding to the new search conditions. Then, a second round of iteration is performed, and the search is performed again based on the new search conditions to obtain search results of the second round of iteration. It can be further determined whether the search results meet the return condition. If the return condition is still not met, the search results obtained in this round of iteration and the new search conditions and the new search question can be input into the first language model again to update them, and then a third round of iteration is performed.

[0041] In this embodiment, the iteration stopping condition may be that the search result meets the return condition, or may be that the iteration reaches a threshold number of times. After the iteration is stopped, the latest search result obtained by searching in the last iteration process can be obtained.

[0042] Step 208: Generate an answer to the original search question based on the latest search results obtained after the iteration stops.

[0043] Based on the aforementioned step 206 , an answer to the aforementioned original search question may be generated based on the search results obtained in the last iteration (ie, the latest search results), and then returned to the user.

[0044] In one example, each latest search result obtained in the last iteration process may be directly returned to the user as an answer to the original search question.

[0045] In another example, the latest search results can be integrated to obtain the answer to the original search question and returned to the user. For example, the second language model can be used to organize the search results to obtain the answer.

[0046] It can be seen from the above description that when performing a search, the present specification can first use the search conditions corresponding to the original search question to search and obtain search results, and if the results do not meet the return conditions, the search conditions and the original search question can be updated through the first language model to obtain new search conditions and new search questions corresponding to the new search conditions, and the new search conditions can be continued to be used for iterative search until the iteration stop condition is met, and then the answer to the original search question is generated based on the latest search results obtained after the iteration stops.

[0047] It can be seen that this manual adopts dynamic iterative search technology. When the search results do not meet the return conditions, the first language model updates the search conditions based on the latest search results, realizing continuous optimization of the search direction, and then gradually understanding the user's true intention to ensure that the search results are more accurate. At the same time, the entire search process is completed automatically, without the need for users to gradually adjust the search conditions, with a high degree of intelligence and a good user experience.

[0048] Figure 3 is a flowchart of another search method provided by an exemplary embodiment.

[0049] Please refer to Figure 3 , the search method may include the following steps: Step 302: Obtain the original search question.

[0050] Step 304: determine the search condition corresponding to the original search question.

[0051] In this embodiment, a language model (referred to as a third language model for the sake of distinction) may be used to determine the search condition corresponding to the original search question.

[0052] Step 306, determining whether the number of iterations i is less than or equal to a threshold number N.

[0053] In this embodiment, before performing the first iterative search, the initial value of the iteration number i can be determined first. The initial value of i is usually 1. Of course, in other examples, the initial value of i can also be other values ​​such as 2 or 3, and this manual does not impose any special restrictions on this.

[0054] In this embodiment, the number threshold N can be pre-set by the developer to prevent the iteration process from looping infinitely. The value of the number threshold N can be 5, 8, etc.

[0055] In this embodiment, if it is determined that the number of iterations i is less than or equal to the number threshold N, it means that the iteration process has not yet met the iteration stop condition, and the subsequent steps can be continued. If it is determined that the number of iterations i is greater than the number threshold N, it means that the iteration process has met the iteration stop condition, and step 312 can be executed to determine the answer to the original search question based on the latest search results obtained in the previous round of iterations.

[0056] Step 308: When the number of iterations i is less than or equal to the number threshold, the search condition is used to perform a search to obtain search results.

[0057] Based on the judgment result of the aforementioned step 306, when the number of iterations i is less than or equal to the number threshold, the search condition may be used for searching. For the first round of iterations, the search condition corresponding to the original search question may be used for searching, and for subsequent iterations, the new search condition output by the first language model during the previous round of iterations may be used for searching. For example, when performing the second round of iterations, the new search condition output by the first language model during the first round of iterations may be used for searching, and when performing the third round of iterations, the new search condition output by the first language model during the second round of iterations may be used for searching, and so on.

[0058] In this embodiment, when searching using search conditions, on the one hand, the search can be conducted from the relevant expert database, and on the other hand, the search can be conducted across the entire network. For example, taking the search for arbitration issues in the legal field as an example, when searching using search conditions, on the one hand, the search can be conducted from the expert case database, and on the other hand, the search can be conducted across the entire network, thereby obtaining more comprehensive search results.

[0059] Step 310: determine whether the search result meets the return condition.

[0060] Based on the above step 308, after obtaining the search results of this round, it can be determined whether the search results meet the return condition. If so, it usually means that the search results are relatively in line with expectations, and step 314 can be executed. If the search results do not meet the return condition, it usually means that the search results do not meet expectations, and step 312 can be executed.

[0061] In this embodiment, there are usually multiple search results obtained by searching using the search conditions. The first K search results (e.g., the first 6 search results, the first 8 search results, etc.) can be selected, and then the consistency of these search results can be used to determine whether the return condition is met. The consistency can represent the similarity of these search results. If the consistency is high, it means that these search results are relatively similar, and thus the search results are relatively reliable; if the consistency is low, it means that some search results are quite different, which may be due to the inability to accurately understand the user's intention, and then the iterative search can continue.

[0062] In this embodiment, please refer to Figure 4 , determining whether the search result meets the return condition may include the following steps: Step 3102, determining summary information for each search result.

[0063] In one example, the search results returned by the expert database or the whole network search engine carry corresponding summary information. When determining whether the return condition is met, the summary information carried in the search results can be directly obtained.

[0064] In another example, if the search results returned by the expert database or the whole network search engine do not carry corresponding summary information, the search result summary information can be extracted through the language model.

[0065] Step 3104: Calculate the consistency parameter of the search result according to the summary information.

[0066] Based on the aforementioned step 3102, after determining the summary information of each search result, the consistency between every two search results can be calculated based on the summary information, and then the consistency parameters of these search results can be obtained by summarizing. Algorithms such as vector space model or topic model can also be used to calculate the consistency parameters of these search results based on the summary information of each search result.

[0067] Step 3106: When the consistency parameter is less than the consistency threshold, determine that the search result does not meet the return condition.

[0068] Step 3108: When the consistency parameter is greater than or equal to the consistency threshold, determine that the search result meets the return condition.

[0069] In this embodiment, the relationship between the calculated consistency parameter of the search result and the preset consistency threshold can be determined. Taking the consistency threshold as 0.6 as an example, if the consistency parameter of the search result is less than 0.6, it can be determined that the search result does not meet the return condition. If the consistency parameter of the search result is greater than or equal to 0.6, it can be determined that the search result meets the return condition.

[0070] Step 312: If the search result does not meet the return condition, the search result, the search condition and the original search question are used as inputs of the first language model, and the search condition and the original search question are updated through the first language model to obtain new search conditions output by the first language model and new search questions corresponding to the new search conditions, update i to i+1, and return to step 306.

[0071] Based on the judgment result of the aforementioned step 310, when the search result does not satisfy the return condition, the search result, the search condition used to obtain the search result, and the search question corresponding to the search condition can be input into the first language model together. The first language model can update the search condition and the corresponding search question based on the latest search result obtained in this round of search, and output a new search condition and a new search question corresponding to the new search condition.

[0072] During the first round of iteration, if the search results do not meet the return condition, the search results, the search conditions determined based on the original search question (referred to as search condition 1) and the original search question (equivalent to search question 1) may be input into the first language model, and a new search condition (e.g., search condition 2) output by the first language model and a new search question (e.g., search question 2) corresponding to the new search condition may be obtained.

[0073] During the second round of iteration, search condition 2 is used for searching. If the search results still do not meet the return condition, the search results of this round, search condition 2, and search question 2 can be input into the first language model, and a new search condition 3 output by the first language model and a new search question 3 corresponding to the search condition 3 can be obtained.

[0074] The new search question output by the first language model may include an explanation of the new search condition, which helps to understand the update logic of the search question and promotes the update reasoning of subsequent search conditions.

[0075] For example, assuming that the original search question is "My neighbor's dog suddenly ran out and scratched my thigh. I was frightened. Can I ask for compensation?" Based on the original search question, the determined search condition 1 can be "My neighbor's dog scratched the person's leg. The compensation issue after being frightened." A search is performed based on search question 1, and the Top 5 search results are selected. After calculation, it is determined that the consistency parameters of the Top 5 search results are less than the consistency threshold, and then the first language model is used to predict search condition 2 and search question 2 corresponding to search condition 2 based on the search results, search condition 1 and the original search question.

[0076] Assuming that one of the top 5 search results obtained by searching using search condition 1 is "A dog chased a passerby, causing him to be frightened and fall, and the breeder and manager shall bear the liability for compensation. April 18, 2024 - There is a relationship between the injury of the injured party and the behavior of the infringer's animal raising that frightened the injured party..." This search result reflects the relationship between the injury of the parties and the liability for compensation.

[0077] In this example, based on the search results, search condition 1, and the original search question, the first language model can output search condition 2 "My thigh was scratched by a dog, but I was not injured. Can I ask for compensation?" and search question 2 "I think the main focus of the user's desire for compensation is whether he was injured. In this case, there is no mention of injury." It can be seen that the first language model discovered the relationship between the party's injury and the liability for compensation through the search results, while the user's original search question did not mention whether he was injured. Therefore, the key information of no injury was clarified in search condition 2, and the reason for adding the key information of no injury was explained in search question 2.

[0078] In this embodiment, after obtaining the new search conditions and new search questions output by the first language model, i can be updated to i+1, and the process returns to step 306, where the search is performed again using the new search conditions to obtain search results, and then the process continues with steps such as determining whether the search results meet the return conditions.

[0079] Step 314: Generate an answer to the original search question based on the latest search results obtained after the iteration stops.

[0080] In this embodiment, the answer to the original search question can be generated based on the latest search results (e.g., the first K search results) obtained after the iteration stops. In other words, the answer can be generated based on the search results obtained in the last iterative search process.

[0081] Optionally, a second language model may be used to integrate the search results to make the logic of the search results more coherent, thereby improving the user experience. The second language model may be the same model as the third language model, and this specification does not impose any special restrictions on this.

[0082] In this embodiment, the generated answer may be returned to the searching user for the user to view.

[0083] In this embodiment, the update process of the first language model for the search question and the search condition can also be returned to the user to allow the user to perceive the intelligence of the search process. For example, the update process can be returned to the user after receiving a search process viewing instruction triggered by the user.

[0084] The updating process of the search question and the search condition by the first language model may be presented in a list, for example, the search condition and the corresponding search question in each iterative search may be displayed in a list. The updating process of the search question and the search condition by the first language model may also be presented in a text form, for example, the adjustment process of the search condition and the corresponding search question may be organized into a text.

[0085] In this embodiment, if the user is still not satisfied with the returned answer, the user can also refer to the updating process of the search question and the search condition to improve the search question by himself.

[0086] It can be seen from the above description that in the search scheme provided in this specification, when the search results do not meet the return conditions, the first language model can be used to update the search conditions to correct the search conditions so that the search conditions are more in line with the user's intentions, and then the new search conditions are used to search again until the search results meet the return conditions or the iterative process meets the end conditions. The whole process is a chain-of-thought (CoT) search process, which improves the accuracy of the search results. At the same time, the new search questions output by the first language model also increase the interpretability of the search reasoning process.

[0087] Figure 5 It is a flowchart of a first language model training method provided by an exemplary embodiment.

[0088] Please refer to Figure 5 The training method for the first language model for updating the search condition provided in this specification may include: Step 502: Obtain training samples, where the training samples include positive labels and negative labels.

[0089] In this embodiment, before model training, training samples can be constructed first. Taking the legal field as an example, training samples can be constructed using cases in the legal field. Each training sample includes two labels, a positive label and a negative label. The input data of each training sample is a search question and a search condition. For example, the search question and the search condition can be concatenated as the input data.

[0090] For example, if the original search question is "My neighbor's dog suddenly ran out and scratched my thigh. I was frightened. Can I ask for compensation?", the search question with a positive label can be "I think the main focus of the dispute when the user wants to get compensation is whether he was injured. In this case, there is no expression of injury. Therefore, the search condition of the positive label is: My thigh was scratched by a dog, but I was not injured. Can I ask for compensation?" The search question with a negative label can be "I think the main focus of the dispute when the user wants to get compensation is the degree of fright. The user did not express the degree of fright in detail. Therefore, the search condition of the negative label is: My thigh was scratched by a dog and I was frightened."

[0091] Step 504: The initial language model is trained using the training samples with the goal of making the probability of generating a positive prediction result higher than the probability of generating a negative prediction result, to obtain the trained first language model.

[0092] In this embodiment, a DPO (Direct Preference Optimization) algorithm may be used to train the initial language model with the goal of making the probability of generating a positive prediction result higher than the probability of generating a negative prediction result.

[0093] Specifically, the following loss function can be used to train the model:

[0094] in, represents the initial language model, represents the target strategy, which is the first language model we want to optimize. represents the loss function, represents the sample set, , represents the positive label, Represents a negative label.

[0095] This embodiment uses the DPO algorithm to train the language model, and achieves precise control of the model output by directly optimizing the initial language model. Without reinforcement learning, the desired preferences can be accurately judged and learned, and the effect is more prominent.

[0096] This manual also provides a method for searching arbitration questions. Please refer to Figure 6 , the arbitration problem search method may include the following steps: Step 602: Obtain the original arbitration question.

[0097] Step 604: Determine the search condition corresponding to the original arbitration question.

[0098] Step 606, iteratively performing the following operations until an iteration stop condition is satisfied: searching using the search condition to obtain search results; in response to the search results not satisfying a return condition, using the search results, the search condition, and the original arbitration question corresponding to the search condition as inputs to a first language model, updating the search condition and the original arbitration question through the first language model to obtain new search conditions output by the first language model and new arbitration questions corresponding to the new search conditions, and returning to the step of performing a search using the search condition.

[0099] Step 608: Generate an answer to the original arbitration question based on the latest search results obtained after the iteration stops.

[0100] In this embodiment, when searching for search conditions corresponding to arbitration issues, on the one hand, the search can be conducted in the relevant legal case library, and on the other hand, the search can be conducted on the entire network to improve the comprehensiveness of the search results.

[0101] In this embodiment, the specific implementation process of the above steps can refer to the above Figure 2 or Figure 3 The embodiment shown is not described in detail here.

[0102] In this embodiment, when searching for arbitration questions, a dynamic iterative search technology is used. When the search results do not meet the return conditions, the first language model is used to update the search conditions based on the latest search results, thereby continuously optimizing the search direction and ensuring that the search results are more accurate. At the same time, the first language model will also update the search questions, which helps users understand the update logic of the search questions and further improves the user experience.

[0103] Figure 7 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 7 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0104] Please refer to Figure 8 The search device 800 can be applied to Figure 7 The device shown in the figure is used to implement the technical solution of this specification. The search device 800 may include: The question acquisition module 802 acquires the original search question; The condition determination module 804 determines the search condition corresponding to the original search question; The iterative search module 806 iteratively performs the following operations until an iteration stop condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original search question corresponding to the search condition as inputs of a first language model, updating the search condition and the original search question through the first language model, obtaining new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition; The answer generation module 808 generates an answer to the original search question based on the latest search results obtained after the iteration stops.

[0105] Optionally, there are multiple search results obtained by searching using the search condition, and the iterative search module 806 further includes: Determine summary information for each search result; Calculating the consistency parameter of the search result according to the summary information; When the consistency parameter is less than the consistency threshold, determining that the search result does not meet the return condition; When the consistency parameter is greater than or equal to a consistency threshold, it is determined that the search result meets the return condition.

[0106] Optionally, the process in which the answer generation module 808 generates an answer to the original search question based on the latest search results obtained after the iteration stops includes: The latest search results obtained after the iteration stops are used as input of the second language model, and the latest search results are sorted by the second language model to obtain an answer to the original search question output by the second language model.

[0107] Optionally, the training process of the first language model includes: Acquire a training sample, wherein the training sample includes a positive label and a negative label; The initial language model is trained using the training samples with the goal of making the probability of generating a positive prediction result higher than the probability of generating a negative prediction result, thereby obtaining the trained first language model.

[0108] Optionally, the iteration stopping condition is that the search result satisfies the return condition, or the number of iterations reaches a threshold number.

[0109] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.

[0110] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0111] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

Claims

1. A search method, comprising: Get the original search question; Determine the search condition corresponding to the original search question; The iteration performs the following operations until the iteration stopping condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original search question corresponding to the search condition as inputs of a first language model, updating the search condition and the original search question through the first language model, obtaining new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition; An answer to the original search question is generated based on the latest search results obtained after the iteration stops.

2. According to the method of claim 1, there are multiple search results obtained by searching using the search condition, and the method further comprises: Determine summary information for each search result; Calculating the consistency parameter of the search result according to the summary information; When the consistency parameter is less than the consistency threshold, determining that the search result does not meet the return condition; When the consistency parameter is greater than or equal to the consistency threshold, it is determined that the search result meets the return condition.

3. The method according to claim 1, wherein the process of generating an answer to the original search question based on the latest search results obtained after the iteration stops comprises: The latest search results obtained after the iteration stops are used as input of the second language model, and the latest search results are sorted by the second language model to obtain an answer to the original search question output by the second language model.

4. According to the method of claim 1, the training process of the first language model comprises: Acquire a training sample, wherein the training sample includes a positive label and a negative label; The initial language model is trained using the training samples with the goal of making the probability of generating a positive prediction result higher than the probability of generating a negative prediction result, thereby obtaining the trained first language model.

5. The method according to claim 1, wherein the iteration stopping condition is that the search result satisfies the return condition, or the number of iterations reaches a threshold.

6. A method for searching for arbitration issues, comprising: Obtaining the original arbitration issue; Determining a search condition corresponding to the original arbitration question; The iteration performs the following operations until the iteration stopping condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original arbitration question corresponding to the search condition as inputs of a first language model, updating the search condition and the original arbitration question through the first language model to obtain new search conditions output by the first language model and new arbitration questions corresponding to the new search conditions, and returning to the step of performing the search using the search condition; An answer to the original arbitration question is generated based on the latest search result obtained after the iteration stops.

7. A search device, comprising: Question acquisition module, which obtains the original search question; A condition determination module, which determines the search condition corresponding to the original search question; The iterative search module iteratively performs the following operations until the iteration stop condition is met: Perform a search using the search conditions to obtain search results; In response to the search result not satisfying the return condition, taking the search result, the search condition, and the original search question corresponding to the search condition as inputs of a first language model, updating the search condition and the original search question through the first language model, obtaining new search conditions output by the first language model and a new search question corresponding to the new search condition, and returning to the step of performing a search using the search condition; The answer generation module generates an answer to the original search question based on the latest search results obtained after the iteration stops.

8. An electronic device comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Answer generation method and device, electronic equipment and storage medium

    CN119106110A

  • Searching method and device, storage medium and program product

    CN119357453A

  • Non-repeatable challenge-response authentication

    US20170250968A1