Retrieval method and related device, electronic equipment and storage medium
By analyzing the search requirement description statement and constructing multi-dimensional search requirement description clauses, combined with the results of large-scale model analysis, the problem of low search accuracy in the existing technology is solved, and a more efficient search process is achieved.
Patent Information
- Application Number
- CN202411447116.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-11
AI Technical Summary
The existing search methods rely on limited keywords and are difficult to fully express the search intention, resulting in low search accuracy.
By analyzing the search requirements description statement, several search requirements description clauses of search dimensions are obtained, including the search topic, scope and necessary requirements. Based on the title and text construction prompts of these description clauses and candidate chapters, they are sent to the big model to obtain the analysis results. , realize the search process from coarse to fine.
It supports the search intention to express the search intention as completely as possible by entering search requirements description statements during the search process, and understand the search intention through multi-dimensionality to improve the search accuracy.
Smart Images

Figure CN119415622A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of search technology, and in particular to a search method and related devices, electronic equipment and storage media. Background Art
[0002] At present, the existing search methods are generally divided into keyword-based information retrieval and Lucence-based information retrieval. In the latter, the full-text retrieval framework open sourced by the Lucence Committee adopts multiple search algorithms such as TF-IDF, BM25, and vector space model, taking into account multiple factors such as query word weight, word frequency, and document importance.
[0003] However, since the existing search methods rely on limited keywords, it is difficult to fully express the search intent, resulting in low search accuracy. In view of this, how to improve search accuracy has become an urgent problem to be solved. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a retrieval method and related devices, electronic equipment and storage medium, which can improve the retrieval accuracy.
[0005] In order to solve the above technical problems, the first aspect of the present application provides a retrieval method, including: parsing a retrieval requirement description statement to obtain retrieval requirement description clauses of several retrieval dimensions; wherein the several retrieval dimensions at least include a retrieval subject; based on the retrieval requirement description clauses of the retrieval subject, retrieving several candidate chapters; constructing a first prompt based at least on the retrieval requirement description clauses of the several retrieval dimensions and the chapter title and chapter text of each candidate chapter; sending the first prompt to the first large model to obtain the analysis results of the first large model on each candidate chapter; wherein the analysis results at least include whether the screening is passed.
[0006] In order to solve the above technical problems, the second aspect of the present application provides a retrieval device, including: a demand analysis module, a preliminary search module, a prompt construction module and a retrieval screening module. The demand analysis module is used to parse the retrieval demand description statement to obtain retrieval demand description clauses of several retrieval dimensions; wherein the several retrieval dimensions at least include a retrieval subject, a retrieval scope and a retrieval requirement; the preliminary retrieval module is used to retrieve several candidate chapters based on the retrieval demand description clauses of the retrieval subject; the prompt construction module is used to construct a first prompt based on at least the retrieval demand description clauses of several retrieval dimensions and the chapter title and chapter body of each candidate chapter; the retrieval screening module is used to send the first prompt to the first large model to obtain the analysis results of the first large model on each candidate chapter; wherein the analysis results at least include whether the screening is passed.
[0007] In order to solve the above technical problem, the third aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, the memory storing program instructions, and the processor being used to execute the program instructions to implement the retrieval method in the above first aspect.
[0008] In order to solve the above technical problem, the fourth aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the retrieval method of the first aspect.
[0009] The above scheme parses the search requirement description statement to obtain search requirement description clauses of several search dimensions, and the several search dimensions at least include the search subject, and then retrieves several candidate chapters based on the search requirement description clauses of the search subject, thereby constructing the first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter, and then sends the first prompt to the first large model to obtain the analysis results of each candidate chapter by the first large model, and the analysis results at least include whether they pass the screening. Therefore, on the one hand, it supports inputting search requirement description statements during the search process, which helps to express the search intention as completely as possible. On the other hand, by parsing the search requirement description statements to obtain search requirement description clauses of several search dimensions, the search intention can be understood from multiple dimensions. On the other hand, by preliminarily screening out the candidate chapters and then using the large model to perform secondary screening on the candidate chapters, it can achieve retrieval from coarse to fine. Therefore, the search accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a flowchart of an embodiment of the search method of the present application; Figure 2a It is a goal-oriented thinking Figure 1 A schematic diagram of an embodiment; Figure 2b is a schematic diagram of an embodiment of an output reason description; Figure 2c It is a process schematic diagram of an embodiment of the search method of the present application; Figure 3 It is a schematic diagram of the framework of an embodiment of the retrieval device of the present application; Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application; Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0011] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0012] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0013] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the fragment " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0014] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the search method of the present application. Specifically, it may include the following steps: Step S11: Parse the search requirement description statement to obtain search requirement description clauses of several search dimensions.
[0015] In the disclosed embodiment, several search dimensions include at least a search topic. For ease of understanding, taking the search requirement description sentence "In the field of financial technology, artificial intelligence technology has begun to be used in risk management, fraud detection and other aspects. I hope to understand how large model technology can provide support in these fields, especially in the pre-training and fine-tuning of the model and its performance in actual operation. Please help me collect the latest scientific research results and industry application cases in this regard" as an example, the search requirement description clause of the search topic can be "the application of artificial intelligence technology in risk management and fraud detection in the field of financial technology". Other situations can be deduced by analogy, and no examples are given here one by one. It can be seen that this application supports complex search queries in the form of natural language sentence input. Compared with only a few specific keywords that can be input as search query input, it can avoid the loss of semantic and logical information in the search process as much as possible, resulting in low search accuracy. In addition, the search requirement description clause can be obtained directly from the search requirement description statement, or it can be obtained by secondary generation (such as regularization) based on the description content of the search requirement description statement, or it can also include the above two situations at the same time, which is not limited here.
[0016] In an implementation scenario, several search dimensions may also include a search scope. Exemplarily, the search scope may be subdivided into dimensions such as time, place, institution, and chapter type. It should be noted that "time" is used to constrain the search publication time, "place" is used to constrain the search publication location (such as country, etc.), "institution" is used to constrain the search publication institution (such as research institutes, colleges and universities, etc.), and "chapter type" is used to constrain the search chapter type (such as case reports, academic papers, patents, etc.). For ease of understanding, still taking the aforementioned search requirement description statement as an example, the search scope may include but is not limited to "chapter type" as scientific research results and industry application cases. Of course, the above example is only a possible example in the actual application process, and does not limit other possible situations.
[0017] In an implementation scenario, several search dimensions may also include search requirements. It should be noted that the search requirements mean that the final search results must hit the search requirement description clause. For the sake of ease of description, taking the aforementioned search requirement description statement as an example, the search requirement description clauses that must be searched may be "the application of large models in risk management and fraud detection" and "pre-training and fine-tuning of models and their actual operational performance". Of course, the above example is only a possible example in the actual application process, and does not limit other possible situations.
[0018] In an implementation scenario, several search dimensions may also include optional search requirements. It should be noted that, unlike the aforementioned mandatory search requirements, optional search requirements mean that the final search results do not necessarily have to match the search requirement description clause.
[0019] It should be noted that the specific examples of the above-mentioned search dimensions are only possible examples in the actual application process, and the specific contents of the several detection dimensions are not limited here. In other words, the several search dimensions may not be limited to the above-mentioned search topics, search scopes, search requirements, and search optional requirements, and no examples are given here one by one.
[0020] In an implementation scenario, in order to parse out the retrieval requirement description clause, a sentence parsing model can be pre-trained, so that the retrieval requirement description sentence can be input into the sentence parsing model to obtain the retrieval requirement description sentence, and obtain the retrieval requirement description clauses of several retrieval dimensions. It should be noted that the sentence parsing model may include but is not limited to BERT, etc., and the network structure of the sentence parsing model is not limited here. Exemplarily, sample data can be obtained first, and the sample data can include a sample description sentence, the sample description sentence can be annotated with a sample parsing result, and the sample parsing result can include a sample description sentence, and a sample description clause of several retrieval dimensions is obtained, and then the sample description sentence is input into the sentence parsing model to obtain a predicted parsing result, and the predicted parsing result includes the sample description sentence, and a predicted description clause of several retrieval dimensions is obtained, so that the network parameters of the sentence parsing model can be adjusted based on the difference between the sample parsing result and the predicted parsing result. As a possible example, the difference between the sample parsing result and the predicted parsing result can be measured based on a loss function such as cross entropy. In addition, the network parameters of the sentence parsing model can be adjusted based on optimization methods such as gradient descent. For details, please refer to the technical details of functions such as cross entropy and optimization methods such as gradient descent, which will not be repeated here.
[0021] In another implementation scenario, in order to parse out the retrieval requirement description clause, as another possible implementation method, a prompt text can also be constructed based on the retrieval requirement description statement and several retrieval dimensions, and the prompt text can be sent to the large language model, so that the analysis result of the large language model on the retrieval requirement description statement can be obtained, and the analysis result can include the retrieval requirement description statement, and obtain the retrieval requirement description clauses of several retrieval dimensions. It should be noted that the large language model may include open source large models such as LLAMA, Bloom, etc., or the large language model can be obtained by fine-tuning parameters based on specific training data, or the large language model can also be a custom-designed large model, and the specific source of the large language model is not limited here. The above method extracts the retrieval requirement description clauses of each retrieval dimension through the large language model, and can use the general understanding ability of the large language model to parse the retrieval dimension of the retrieval requirement description statement, which helps to improve the parsing accuracy of the retrieval dimension.
[0022] In a specific implementation scenario, taking the large language model as an example of fine-tuning parameters based on specific training data, sample data can be obtained, and the sample data can include sample description sentences, the sample description sentences can be annotated with sample parsing results, and the sample parsing results can include sample description sentences, and sample description clauses of several retrieval dimensions are obtained. Then, based on the sample description sentences and several retrieval dimensions, sample prompt texts are constructed, so that the sample prompt texts can be sent to the large language model to obtain the predicted parsing results of the sample description sentences by the large language model, and the predicted parsing results include sample description sentences, and predicted description clauses of several retrieval dimensions are obtained, so that the second large model can be fine-tuned based on the difference between the sample parsing results and the predicted parsing results. It should be noted that the specific process of parameter fine-tuning can refer to the technical details of FT (Fine Tune, i.e. parameter fine-tuning) of the large language model, which will not be repeated here. The above method, by fine-tuning the parameters of the large language model through sample data including sample description sentences and sample parsing results, helps to improve the accuracy of the large language model in extracting each retrieval dimension.
[0023] In a specific implementation scenario, a corresponding prompt text (or sample prompt text) may be constructed based on a prompt template. The prompt template may include but is not limited to the following: This is a search factor extraction task. Based on the input paragraph, the search topic, search scope, and search Mandatory requirements, search optional requirements, etc. The following are the extraction requirements: 1. The extracted elements only include the search subject, search scope, search requirements, and search optional requirements. Please pay attention to this point, it is very important; 2. The answer format has the following requirements: different types of elements are separated by line breaks, and the content of each type of element is extracted in [Required [Primary name], such as [Search subject], please pay attention to this point, it is very important; 3. The factor extraction results should be simple and concise. Please pay attention to this point. This is very important. 4. [Search scope] only includes the four elements of time, place, organization and article type extracted from the input. If none of these four types of elements are extracted, the [Search Scope] will be returned as None. Please pay attention to this point, as it is very important. Please answer the following questions in Chinese. Input: {Fill in the search requirement description statement}.
[0024] It should be noted that the above prompt template is only a possible example in actual application, and the specific content of the prompt template is not limited thereto, and examples will not be given one by one here.
[0025] Step S12: Based on the search requirement description clause of the search topic, a number of candidate chapters are retrieved.
[0026] In an implementation scenario, several keywords can be extracted based on the search requirement description clause of the search subject, and then a search can be performed based on the keywords to obtain several candidate chapters. Exemplarily, a word segmentation toolkit such as hanlp can be used to extract the search requirement clause of the search subject to obtain several keywords. For example, still taking the aforementioned search requirement description sentence as an example, the search requirement description clause of the search dimension "search subject" "application of artificial intelligence technology in risk management and fraud detection in the field of financial technology" can be extracted to obtain the following keywords: "artificial intelligence", "financial technology", "risk management", "fraud detection", etc. Other situations can be deduced by analogy, and no examples are given here. In addition, as a possible example, a search can be performed based on ElasticSearch through the aforementioned extracted keywords to obtain several candidate chapters. It should be noted that the logical relationship between several keywords may include but is not limited to: or, and, non, etc., which are not limited here. The above method can improve the initial search effect as much as possible by extracting the search requirement description clause of the search subject to obtain several keywords, and then retrieving several candidate chapters based on several keywords.
[0027] In one implementation scenario, in order to facilitate interaction with the user, before retrieving a number of candidate chapters based on the search requirement description clause of the search subject, a target mind map can be obtained based on the search requirement description clauses of a number of search dimensions, so that in response to the confirmation instruction of detecting the target mind map, the search requirement description clause based on the search subject can be executed to retrieve a number of candidate chapters. The above method obtains the target mind map by retrieving the search requirement description clauses based on a number of search dimensions, and then performs a preliminary search when the confirmation instruction for the target mind map is detected, which helps to show the parsing results of the search requirement description statement to the user as intuitively as possible through the target mind map.
[0028] In a specific implementation scenario, after obtaining the search requirement description clauses of several search dimensions, the intermediate nodes of the target mind map can be constructed based on each search dimension, and then the child nodes of the intermediate nodes corresponding to the search dimensions can be constructed based on the search requirement description clauses of the search dimensions, and the child nodes of the intermediate nodes are used as leaf nodes of the target mind map. Figure 2a , Figure 2a It is a goal-oriented thinking Figure 1 Schematic diagram of an embodiment. Figure 2aAs shown, still taking the above-mentioned search requirement description statement as an example, "search subject", "search scope", "search must requirements", and "search optional requirements" can be used as intermediate nodes respectively, and the child node of the intermediate node "search subject" is its search requirement description clause, that is, "the application of artificial intelligence technology in risk management and fraud detection in the field of financial technology", the child node of the intermediate node "search scope" is its search requirement description clause, that is, "chapter type: scientific research results, industry application cases", and the child node of the intermediate node "search must requirements" is its search requirement description clause, that is, "the application of large model technology in risk management and fraud detection" and "pre-training fine-tuning of the model and its actual operation performance". Of course, the above example is only a possible example in the actual application process, and does not limit the specific content of the target mind map. In the above method, based on each search dimension, the intermediate nodes of the target mind map are constructed respectively, and then based on the search requirement description clause of the search dimension, the child nodes of the intermediate nodes corresponding to the search dimension are constructed, and the child nodes of the intermediate nodes are leaf nodes, which can reflect each search dimension and its search requirement description clause as clearly as possible.
[0029] In a specific implementation scenario, as described above, the middle node of the target mind map is the retrieval dimension, and the child node of the middle node is the retrieval requirement description clause of the retrieval dimension as a leaf node. In response to detecting an edit instruction for the target mind map, the target mind map is edited based on the edit instruction until a confirmation instruction is detected, and the edit instruction may include at least one of: an instruction to add a leaf node, an instruction to delete a leaf node, and an instruction to modify a leaf node. For example, please continue to refer to Figure 2a Based on the adding instruction of the leaf node, you can add its child nodes in the "search range" of the intermediate node, such as "time: in the past year"; or, based on the deleting instruction of the leaf node, you can delete the leaf node "time: in the past year" that has just been added in the target mind map; or, based on the modifying instruction of the leaf node, you can modify the leaf node "Chapter type: scientific research results, industry application cases" of the intermediate node "search range" to "Chapter type: scientific research results, industry application cases, patents". Of course, the above example is only a possible example in the actual application process, and it does not limit the specific editing content of the target mind map. In the above method, in response to detecting the editing instruction of the target mind map, based on the editing instruction, the target mind map is edited until the confirmation instruction is detected, so it can support users to edit the target mind map again.
[0030] Step S13: construct a first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter.
[0031] In the disclosed embodiment, the first prompt is used to instruct the model to perform a secondary screening on each candidate chapter based on the search requirement description clauses of each search dimension, so as to select the candidate chapters whose chapter content meets the search requirement description clauses of each search dimension. Specifically, the prompt text can be constructed according to the prompt template, at least based on the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter. For ease of distinction, the "prompt template" here can be referred to as the first template, and the "prompt template" in the aforementioned related description can be referred to as the second template. In addition, the "prompt text" here can be referred to as the first prompt, and the "prompt text" in the aforementioned related description can be referred to as the second prompt. As a possible example, the second template can specifically include but is not limited to the following: This is an intelligence selection task. The following are the generation requirements: 1. Regarding the answer format, if you pass the selection, please answer yes, if you fail, please answer no. Please judge strictly and carefully. Very important; 2. If the content of the article meets the three search dimensions of [Search Topic], [Search Scope], and [Search Requirement] at the same time, If you have passed the selection, please pay attention to this point, it is very important; 3. If the content of the article does not meet any of the search dimensions of [Search Topic], [Search Scope], or [Search Requirement], If you fail the selection, please pay attention to this point, which is very important. 4. [Search optional requirements] are not used as a criterion for whether or not to pass the selection. Please pay attention to this point. This is very important. want; 5. [Search Required] may contain multiple sub-conditions. When judging, the content of the article only needs to meet one of the sub-conditions. If the number of files is less than 10, it is considered to meet the [Required Requirements for Search]. Please pay attention to this point, which is very important; Select the following passages, please answer in Chinese; Input: {Fill in each candidate chapter}.
[0032] It should be noted that the above second template is only a possible example in the actual application process, and the specific content of the second template is not limited by it. For example, it can also be defined in the second template that "[Search must be required] may contain multiple sub-conditions, and the content of the article must meet all sub-conditions when judging to meet [Search must be required]". In addition, it can also be required to output a description of the reasons for passing or failing. For example, the second template can include but is not limited to the following content: This is an intelligence selection task. The following are the generation requirements: 1. In terms of answer format, if you pass the selection, please answer yes and give the reason for passing. If you fail, please answer no and It is important to use strict judgment when giving reasons for failure; 2. If the content of the article meets the three search dimensions of [Search Topic], [Search Scope], and [Search Requirement] at the same time, If you have passed the selection, please pay attention to this point, it is very important; 3. If the content of the article does not meet any of the search dimensions of [Search Topic], [Search Scope], or [Search Requirement], If you fail the selection, please pay attention to this point, which is very important. 4. [Search optional requirements] are not used as a criterion for whether or not to pass the selection. Please pay attention to this point. This is very important. want; 5. [Search Required] may contain multiple sub-conditions. When judging, the content of the article only needs to meet one of the sub-conditions. If the number of files is less than 10, it is considered to meet the [Required Requirements for Search]. Please pay attention to this point, which is very important; Select the following passages, please answer in Chinese; Input: {Fill in each candidate chapter}.
[0033] Of course, in actual application, there may be other search requirements. In the case of other search requirements, the same can be applied and no further examples are given here.
[0034] Step S14: sending the first prompt to the first large model to obtain the analysis results of the first large model on each candidate chapter.
[0035] In the disclosed embodiment, the analysis result at least includes whether the screening is passed. In addition, for the sake of distinction, the aforementioned large language model used to parse the retrieval requirement description statement can be referred to as the second large model. It should be noted that the first large model and the second large model can be different large language models, or the first large model and the second large model can also be the same large language model. Similar to the second large model, the first large model can include open source large models such as LLAMA, Bloom, etc., or the first large model can be obtained by fine-tuning parameters based on specific training data, or the first large model can also be a custom designed large model, and the specific source of the large language model is not limited here.
[0036] In an implementation scenario, taking the first large model obtained by fine-tuning parameters based on specific training data as an example, sample data can be obtained first. For the sake of distinction, the sample data used to train the first large model can be referred to as the first sample data, and the sample data used to train the second large model can be referred to as the second sample data. In addition, the first sample data can include a sample description sentence (for the sake of distinction, it can be referred to as the first sample description sentence, and the sample description sentence in the second sample data can be referred to as the second sample description sentence), and obtain a number of sample description clauses of retrieval requirements (for the sake of distinction, it can be referred to as the first sample description clause, and the sample description clause in the second sample data can be referred to as the second sample description clause) and a number of sample candidate chapters (for the sake of distinction, it can be referred to as sample candidate chapters), and a number of sample candidate chapters are retrieved based on the first sample description clause of the retrieval topic, and a number of sample candidate chapters are also annotated with sample analysis results, and the sample analysis results at least include whether they actually pass the screening. Based on this, the first sample prompt can be constructed based on at least the first sample description clauses of several retrieval dimensions and the chapter titles and chapter texts of each sample candidate chapter, and then the first sample prompt can be sent to the first large model to obtain the prediction and analysis results of the first large model for each sample candidate chapter, and the prediction and analysis results at least include the prediction of whether it passes the screening. For details, please refer to the aforementioned description on the construction of the first prompt, which will not be repeated here. On this basis, the parameters of the first large model can be fine-tuned based on the difference between the sample analysis results and the prediction and analysis results. It should be noted that the specific implementation of the difference measurement and parameter fine-tuning can refer to the aforementioned related descriptions, which will not be repeated here. The above method, which uses the first sample data to fine-tune the parameters of the first large model, helps to maximize the accuracy of the second screening of the first large model.
[0037] In one implementation scenario, as mentioned above, the retrieval requirements also include analyzing the specific reasons for passing or failing the screening. In this case, the sample analysis results in the aforementioned first sample data can also include a description of the sample reasons why the sample candidate chapters passed or failed the screening, so that the first large model can learn to give a description of the reasons why the candidate chapters passed or failed the screening through parameter fine-tuning.
[0038] In one implementation scenario, as described above, the analysis result may also include a description of the reasons why a candidate chapter passed or failed the screening. In response to detecting a selection instruction for any candidate chapter, the description of the reasons corresponding to the candidate chapter is output. In the above manner, when a selection instruction for a candidate chapter is detected, the description of the reasons corresponding to the candidate chapter is output, which can provide users with as rich secondary screening results as possible, help users understand the effectiveness of the secondary screening, improve the persuasiveness of the secondary screening, and make the search traceable.
[0039] In a specific implementation scenario, the selection instruction for any candidate chapter can be implemented by moving the mouse pointer to hover over the candidate chapter, or by moving the mouse pointer to select the candidate chapter; or by clicking the "Tab key", "direction key", etc. to select the candidate chapter. Of course, the above examples are only several possible examples of triggering the selection instruction for the candidate chapter, and do not limit the specific method of selecting the candidate chapter.
[0040] In a specific implementation scenario, the description of the reason why a candidate passage passes the screening may include: the retrieval requirement description clauses of each retrieval dimension that the candidate passage hits and the corresponding hit explanations. Similarly, the description of the reason why a candidate passage fails the screening may at least include: the retrieval requirement description clauses of the retrieval dimension that the candidate passage misses and the corresponding miss explanations. Of course, the description of the reason why a candidate passage fails the screening may also include: the retrieval requirement description clauses of the retrieval dimension that the candidate passage partially hits and the corresponding hit explanations.
[0041] In a specific implementation scenario, please refer to Figure 2b , Figure 2b FIG. 1 is a schematic diagram of an embodiment of output reason description. Figure 2b As shown in the figure, when a selection instruction for the candidate article "Large language models may completely change the financial industry within two years" is detected, a description of the reason why the candidate article passes the screening can be displayed in the form of an overlay window, such as the description content starting from [Search Topic] "This article details the application of large language models (LLMs) in the financial field, including detecting fraud, generating financial insights, and automating customer service, which is consistent with [Monitoring Topic] Application of artificial intelligence technology in risk management and fraud detection in the field of financial technology." For other search dimensions, please refer to Figure 2b , and so on. Of course, Figure 2b The example shown is only a possible example in the actual application process. The description of the reasons in the secondary screening of other chapters can be deduced by analogy, and no more examples are given here. In addition, the specific way of outputting the reason description is not limited to display output, but can also be output in the form of voice, etc., which is not limited here.
[0042] In one implementation scenario, in response to detecting a trigger instruction for filtering a large model, the analysis results include candidate chapters that pass the filtering as target chapters, and the target chapters are output. Figure 2b ,like Figure 2b As shown in the upper left corner, the user interface can set the target control used to trigger the large model screening (such as Figure 2bThe button control referred to by ), when a trigger instruction for the target control is detected, it can be regarded as detecting a trigger instruction for the large model screening. At this time, the analysis results can be output including the candidate chapters that passed the screening, and the filtering analysis reasons include the candidate chapters that did not pass the screening. In the above method, when a trigger instruction for the large model screening is detected, the analysis reasons are output including the candidate chapters that passed the screening, which can minimize the interference of the candidate chapters that did not pass the screening on the retrieval, and help improve the user's retrieval efficiency.
[0043] In an implementation scenario, please refer to 2c. Figure 2c Schematic diagram of the process of an embodiment of the search method of the present application. As a possible example in the actual application process, Figure 2c As shown, the search requirement description statement is first parsed by the second largest model to obtain search requirement description clauses of several search dimensions (such as search subject, search scope, search must requirements, search optional requirements, etc.). In order to facilitate interaction with users, the search requirement description clauses of several search dimensions can be displayed in the form of a target mind map, so that users can perform node editing operations on the target mind map. For details, please refer to the aforementioned related descriptions, which will not be repeated here. On this basis, after detecting the confirmation instruction for the target mind map, several keywords can be extracted based on the search requirement description clause of the search subject, and then the ElasticSearch framework is used to search based on several keywords to obtain several candidate chapters, so that the search requirement description clauses of the aforementioned several search dimensions can be used based on the first largest model to perform secondary screening among several candidate chapters, so as to accurately screen out the target chapters that meet the search requirement description statement.
[0044] The above scheme parses the search requirement description statement to obtain search requirement description clauses of several search dimensions, and the several search dimensions at least include the search subject, and then retrieves several candidate chapters based on the search requirement description clauses of the search subject, thereby constructing the first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter, and then sends the first prompt to the first large model to obtain the analysis results of each candidate chapter by the first large model, and the analysis results at least include whether they pass the screening. Therefore, on the one hand, it supports inputting search requirement description statements during the search process, which helps to express the search intention as completely as possible. On the other hand, by parsing the search requirement description statements to obtain search requirement description clauses of several search dimensions, the search intention can be understood from multiple dimensions. On the other hand, by preliminarily screening out the candidate chapters and then using the large model to perform secondary screening on the candidate chapters, it can achieve retrieval from coarse to fine. Therefore, the search accuracy can be improved.
[0045] See also Figure 3 , Figure 3It is a schematic diagram of the framework of an embodiment of the retrieval device 30 of the present application. The retrieval device 30 includes: a demand analysis module 31, a preliminary retrieval module 32, a prompt construction module 33 and a retrieval screening module 34. The demand analysis module 31 is used to analyze the retrieval demand description statement to obtain the retrieval demand description clauses of several retrieval dimensions; wherein the several retrieval dimensions at least include the retrieval subject, the retrieval scope and the retrieval requirements; the preliminary retrieval module 32 is used to retrieve several candidate chapters based on the retrieval demand description clauses of the retrieval subject; the prompt construction module 33 is used to construct the first prompt based on at least the retrieval demand description clauses of several retrieval dimensions and the chapter title and chapter body of each candidate chapter; the retrieval screening module 34 is used to send the first prompt to the first large model to obtain the analysis results of the first large model on each candidate chapter; wherein the analysis results at least include whether it passes the screening.
[0046] In the above scheme, the search device 30 parses the search requirement description statement to obtain the search requirement description clauses of several search dimensions, and the several search dimensions at least include the search subject, and then retrieves several candidate chapters based on the search requirement description clauses of the search subject, thereby constructing a first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter, and then sends the first prompt to the first large model to obtain the analysis results of each candidate chapter by the first large model, and the analysis results at least include whether they pass the screening. Therefore, on the one hand, it supports the input of the search requirement description statement during the search process, which helps to express the search intention as completely as possible. On the other hand, by parsing the search requirement description statement to obtain the search requirement description clauses of several search dimensions, the search intention can be understood from multiple dimensions. On the other hand, by preliminarily screening out the candidate chapters and then using the large model to perform secondary screening on the candidate chapters, it can be realized from coarse to fine retrieval. Therefore, the search accuracy can be improved.
[0047] In some disclosed embodiments, the retrieval device 30 includes a map construction module for obtaining a target mind map based on retrieval requirement description clauses of several retrieval dimensions; the preliminary retrieval module 32 is specifically used to respond to the detection of a confirmation instruction for the target mind map, execute the retrieval requirement description clause based on the retrieval topic, and retrieve several candidate chapters.
[0048] In some disclosed embodiments, the map construction module includes an intermediate node construction sub-module, which is used to construct the intermediate nodes of the target mind map based on each retrieval dimension; the map construction module includes a leaf node construction sub-module, which is used to construct the child nodes of the intermediate nodes corresponding to the retrieval dimensions based on the retrieval requirement description clauses of the retrieval dimensions; wherein the child nodes of the intermediate nodes serve as leaf nodes.
[0049] In some disclosed embodiments, the intermediate node of the target mind map is a retrieval dimension, and the child nodes of the intermediate node are leaf nodes that describe retrieval requirements of the retrieval dimension. The retrieval device 30 includes a map editing module for responding to the detection of an editing instruction for the target mind map, and editing the target mind map based on the editing instruction until a confirmation instruction is detected; wherein the editing instruction includes: at least one of an instruction to add a leaf node, an instruction to delete a leaf node, and an instruction to modify a leaf node.
[0050] In some disclosed embodiments, the analysis result also includes a description of the reasons why the candidate chapter passed or failed the screening, and the retrieval device 30 includes a reason output module for outputting the reason description corresponding to the candidate chapter in response to detecting a selection instruction for any candidate chapter.
[0051] In some disclosed embodiments, the description of the reason why a candidate passage passes screening includes: the candidate passage hits the retrieval requirement description clauses of each retrieval dimension and the corresponding hit explanation; and / or, the description of the reason why a candidate passage fails screening includes at least: the candidate passage misses the retrieval requirement description clauses of the retrieval dimension and the corresponding miss explanation.
[0052] In some disclosed embodiments, the retrieval device 30 includes a first acquisition module for acquiring first sample data; wherein the first sample data includes a first sample description sentence, and a first sample description clause and a number of sample candidate chapters of a number of retrieval requirements are obtained, and the number of sample candidate chapters are retrieved based on the first sample description clause of the retrieval topic, and the number of candidate chapters are also marked with sample analysis results, and the sample analysis results at least include whether they actually pass the screening; the retrieval device 30 includes a first construction module for constructing a first sample prompt based on at least the first sample description clauses of a number of retrieval dimensions and the chapter title and chapter body of each sample candidate chapter; the retrieval device 30 includes a first processing module for sending the first sample prompt to the first large model to obtain the prediction analysis results of the first large model for each sample candidate chapter; wherein the prediction analysis results at least include the prediction whether it passes the screening; the retrieval device 30 includes a first fine-tuning module for fine-tuning the parameters of the first large model based on the difference between the sample analysis results and the prediction analysis results.
[0053] In some disclosed embodiments, the retrieval device 30 includes a chapter output module for selecting, in response to detecting a trigger instruction for filtering a large model, a candidate chapter that has passed the screening in the analysis results as a target chapter, and outputting the target chapter.
[0054] In some disclosed embodiments, the requirement parsing module 31 includes a construction submodule for constructing a second prompt based on a retrieval requirement description statement and a number of retrieval dimensions; the requirement parsing module 31 includes a processing submodule for sending the second prompt to the second largest model to obtain the parsing result of the second largest model on the retrieval requirement description statement; wherein the parsing result includes the retrieval requirement description statement, and obtains the retrieval requirement description clauses of a number of retrieval dimensions.
[0055] In some disclosed embodiments, the retrieval device 30 includes a second acquisition module for acquiring second sample data; wherein the second sample data includes a second sample description sentence, the second sample description sentence is annotated with a sample parsing result, the sample parsing result includes the second sample description sentence, and a second sample description clause of several retrieval dimensions is obtained; the retrieval device 30 includes a second construction module for constructing a second sample prompt based on the second sample description sentence and several retrieval dimensions; the retrieval device 30 includes a second processing module for sending the second sample prompt to the second largest model to obtain the predicted parsing result of the second largest model for the second sample description sentence; wherein the predicted parsing result includes the second sample description sentence, and a predicted sample description clause of several retrieval dimensions is obtained; the retrieval device 30 includes a second fine-tuning module for fine-tuning parameters of the second largest model based on the difference between the sample parsing result and the predicted parsing result.
[0056] In some disclosed embodiments, the preliminary search module 32 includes an extraction submodule for extracting a number of keywords based on a search requirement description clause of the search topic; the preliminary search module 32 includes a retrieval submodule for searching based on a number of keywords to obtain a number of candidate chapters.
[0057] In some disclosed embodiments, the plurality of search requirements further include at least one of the following: search scope, search mandatory requirements, and search optional requirements.
[0058] See also Figure 4 , Figure 4 : is a schematic diagram of the framework of an embodiment of an electronic device 40 of the present application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other, the memory 41 stores program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-mentioned retrieval method embodiments. For details, please refer to the aforementioned disclosed embodiments, which will not be repeated here. As a possible situation, the electronic device 40 may also include a human-computer interaction circuit (not shown) for realizing human-computer interaction with the user, such as information input, information output, etc. The human-computer interaction circuit may include but is not limited to: a screen, a speaker, a microphone, etc., which are not limited here.
[0059] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned retrieval method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.
[0060] In the above scheme, the electronic device 40 parses the search requirement description statement to obtain the search requirement description clauses of several search dimensions, and the several search dimensions at least include the search subject, and then retrieves several candidate chapters based on the search requirement description clauses of the search subject, thereby constructing a first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter, and then sends the first prompt to the first large model to obtain the analysis results of the first large model on each candidate chapter, and the analysis results at least include whether they pass the screening. Therefore, on the one hand, it supports inputting the search requirement description statement during the search process, which helps to express the search intention as completely as possible. On the other hand, by parsing the search requirement description statement to obtain the search requirement description clauses of several search dimensions, the search intention can be understood from multiple dimensions. On the other hand, by preliminarily screening out the candidate chapters and then using the large model to perform secondary screening on the candidate chapters, it can be realized from coarse to fine retrieval. Therefore, the search accuracy can be improved.
[0061] See also Figure 5 , Figure 5 1 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 50 of the present application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor, and the program instructions 51 are used to implement the steps in any of the above-mentioned retrieval method embodiments.
[0062] In the above scheme, the computer-readable storage medium 50 parses the search requirement description statement to obtain the search requirement description clauses of several search dimensions, and the several search dimensions at least include the search subject, and then retrieves several candidate chapters based on the search requirement description clauses of the search subject, thereby constructing a first prompt based on at least the search requirement description clauses of several search dimensions and the chapter titles and chapter texts of each candidate chapter, and then sends the first prompt to the first large model to obtain the analysis results of each candidate chapter by the first large model, and the analysis results at least include whether they pass the screening. Therefore, on the one hand, it supports inputting the search requirement description statement during the search process, which helps to express the search intention as completely as possible. On the other hand, by parsing the search requirement description statement to obtain the search requirement description clauses of several search dimensions, the search intention can be understood from multiple dimensions. On the other hand, by preliminarily screening out the candidate chapters and then using the large model to perform secondary screening on the candidate chapters, it can be realized to perform retrieval from coarse to fine. Therefore, the search accuracy can be improved.
[0063] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0064] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0065] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0066] 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 present embodiment.
[0067] In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0068] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0069] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A search method, characterized in that: include: Parsing the search requirement description statement to obtain search requirement description clauses of several search dimensions; wherein the several search dimensions at least include a search subject; Based on the search requirement description clause of the search topic, a number of candidate chapters are retrieved; Constructing a first prompt based at least on the search requirement description clauses of the plurality of search dimensions and the chapter title and chapter body of each of the candidate chapters; The first prompt is sent to the first large model to obtain the analysis result of the first large model on each of the candidate chapters; wherein the analysis result at least includes whether it passes the screening.
2. The method according to claim 1, characterized in that Before retrieving a number of candidate chapters based on the search requirement description clause of the search subject, the method further includes: Based on the search requirement description clauses of the plurality of search dimensions, a target mind map is obtained; The search requirement description clause based on the search subject retrieves several candidate chapters, including: In response to detecting a confirmation instruction for the target mind map, the retrieval requirement description clause based on the retrieval subject is executed to retrieve a number of candidate chapters.
3. The method according to claim 2, characterized in that The retrieval requirement description clauses based on the plurality of retrieval dimensions obtain a target mind map, including: Based on each of the search dimensions, construct the intermediate nodes of the target mind map respectively; Based on the search requirement description clause of the search dimension, a child node of the intermediate node corresponding to the search dimension is constructed; wherein the child node of the intermediate node serves as a leaf node.
4. The method according to claim 2, characterized in that: The middle node of the target mind map is the search dimension, and the child nodes of the middle node are leaf nodes that are search requirement description clauses of the search dimension. The method further includes: In response to detecting an editing instruction for the target mind map, editing the target mind map based on the editing instruction until the confirmation instruction is detected; The editing instruction includes at least one of an instruction to add the leaf node, an instruction to delete the leaf node, and an instruction to modify the leaf node.
5. The method according to claim 1, characterized in that The analysis result also includes a description of the reason why the candidate chapter passed or failed the screening. The method further includes: In response to detecting a selection instruction for any of the candidate chapters, outputting a reason description corresponding to the candidate chapter; Among them, the description of the reason why the candidate chapter passes the screening includes: the candidate chapter hits the retrieval requirement description clauses of each of the retrieval dimensions and the corresponding hit explanation; and / or, the description of the reason why the candidate chapter fails the screening includes at least: the candidate chapter does not hit the retrieval requirement description clauses of the retrieval dimensions and the corresponding miss explanation.
6. The method according to claim 1, characterized in that The step of obtaining the first large model comprises: Acquire first sample data; wherein the first sample data includes a first sample description clause of a first sample description sentence about the plurality of search requirements and a plurality of sample candidate chapters, and the plurality of sample candidate chapters are retrieved based on the first sample description clause of the search topic, and the plurality of sample candidate chapters are also annotated with sample analysis results, and the sample analysis results at least include whether they actually pass the screening; Constructing a first sample prompt based at least on the first sample description clauses of the plurality of search dimensions and the chapter title and the chapter body of each of the sample candidate chapters; Sending the first sample prompt to the first large model to obtain the prediction analysis results of the first large model on each of the sample candidate chapters; wherein the prediction analysis results at least include a prediction of whether to pass the screening; Based on the difference between the sample analysis result and the prediction analysis result, the parameters of the first large model are fine-tuned.
7. The method according to claim 1, characterized in that The method further comprises: In response to detecting a trigger instruction for screening the large model, the analysis result includes a candidate chapter that passes the screening, selected as a target chapter, and the target chapter is output.
8. The method according to claim 1, characterized in that The parsing of the search requirement description statement obtains search requirement description clauses of several search dimensions, including: Constructing a second prompt based on the search requirement description statement and the plurality of search dimensions; The second prompt is sent to the second largest model to obtain the parsing result of the second largest model on the retrieval requirement description statement; wherein the parsing result includes the retrieval requirement description clauses of the retrieval requirement description statement regarding the several retrieval dimensions.
9. The method according to claim 8, characterized in that The steps of obtaining the second largest model include: Acquire second sample data; wherein the second sample data includes a second sample description sentence, the second sample description sentence is annotated with a sample parsing result, and the sample parsing result includes a second sample description clause of the second sample description sentence about the plurality of search dimensions; constructing a second sample prompt based on the second sample description sentence and the plurality of search dimensions; Sending the second sample prompt to the second large model to obtain a prediction and analysis result of the second large model on the second sample description sentence; wherein the prediction and analysis result includes a predicted sample description clause of the second sample description sentence with respect to the plurality of search dimensions; Based on the difference between the sample analysis result and the prediction analysis result, the parameters of the second largest model are fine-tuned.
10. The method according to claim 1, characterized in that The search requirement description clause based on the search subject retrieves several candidate chapters, including: Extracting a number of keywords based on the search requirement description clause of the search subject; A search is performed based on the plurality of keywords to obtain the plurality of candidate chapters.
11. The method according to any one of claims 1 to 10, characterized in that: The several search requirements also include at least one of the following: search scope, necessary search requirements, and optional search requirements.
12. A search device, characterized in that: include: A requirement parsing module, used to parse the search requirement description statement to obtain a number of search requirement description clauses of search dimensions; wherein the number of search dimensions at least include a search subject, a search scope and a search requirement; A preliminary search module, for retrieving a number of candidate chapters based on a search requirement description clause of the search topic; A prompt construction module, configured to construct a first prompt based at least on the search requirement description clauses of the plurality of search dimensions and the chapter title and chapter body of each of the candidate chapters; The retrieval and screening module is used to send the first prompt to the first large model to obtain the analysis results of the first large model on each of the candidate chapters; wherein the analysis results at least include whether they pass the screening.
13. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the retrieval method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the retrieval method described in any one of claims 1 to 11.