Data retrieval method and device, electronic equipment and medium

Through comprehensive semantic understanding and large language model technology, split or rewrite user problems and adopt multi-path search strategy, the problem of poor retrieval results in the existing knowledge base question-and-answer system when dealing with complex problems is solved, achieving more efficient and accurate retrieval results.

CN119621944AInactive Publication Date: 2025-03-14NEW H3C AI TECH CO LTD

Patent Information

Application Number
CN202510156637.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing knowledge base question and answer system is poor in retrieval when dealing with problems such as complex users, vague intentions and special context, resulting in low answer quality.

Method used

A composite search strategy is adopted with comprehensive semantic understanding, sub-problem splitting, abstract problem generation, and hypothetical answers. The problem text is analyzed through a large language model, split or rewritten into abstract questions and hypothetical answers, and multi-path search is used to improve retrieval flexibility and accuracy.

Benefits of technology

It improves the flexibility and pertinence of searches, expands the scope of searches, and improves the accuracy and comprehensiveness of recall and searches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621944A_ABST
    Figure CN119621944A_ABST
Patent Text Reader

Abstract

The invention provides a data retrieval method and device, electronic equipment and a medium. The method comprises the following steps: analyzing whether a target problem text can be split or not by utilizing a large language model; under the condition that it is determined that the target question text cannot be split, rewriting the target question text into an abstraction question by means of a large language model; retrieving the knowledge base according to the abstraction problem to obtain a first retrieval result; generating hypothetical answers for the target question text by using a large language model; retrieving the knowledge base according to the hypothetical answer to obtain a second retrieval result; according to the target question text, retrieving the knowledge base to obtain a third retrieval result; and determining a target retrieval result according to the first retrieval result, the second retrieval result and the third retrieval result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to data retrieval methods, devices, electronic devices and media. Background Art

[0002] In today's information age, the knowledge base RAG (Retrieval-Augmented Generation) question-answering system, as an important bridge connecting users with massive information, is gradually becoming a core component of intelligent services in various industries. This type of system generates answers by retrieving relevant information fragments from the knowledge base and combining LLM (large language model), which greatly improves the accuracy and richness of question answers.

[0003] At present, knowledge base question-answering systems usually use methods based on keyword matching or semantic similarity calculation for retrieval. However, in actual application scenarios, due to differences in user language habits and knowledge background, user questions are often complex and diverse, with ambiguous intentions and special contexts. Since the existing retrieval mechanism has great limitations in these special scenarios, its retrieval effect is often unsatisfactory and the answer quality is not high. Summary of the invention

[0004] To overcome the problems existing in the related art, this specification provides a data retrieval method, device, electronic device and medium.

[0005] According to a first aspect of an embodiment of the present specification, a data retrieval method is provided, the method comprising: using a large language model to analyze whether a target question text can be split; when it is determined that the target question text cannot be split, using a large language model to rewrite the target question text into an abstract question; searching a knowledge base according to the abstract question to obtain a first search result; using a large language model to generate a hypothetical answer to the target question text; searching a knowledge base according to the hypothetical answer to obtain a second search result; searching a knowledge base according to the target question text to obtain a third search result; determining a target search result according to the first search result, the second search result and the third search result.

[0006] According to a second aspect of an embodiment of the present specification, a data retrieval device is provided, comprising: a split determination module, used to use a large language model to analyze whether a target question text can be split; a rewriting module, used to use a large language model to rewrite the target question text into an abstract question when it is determined that the target question text cannot be split; a first retrieval module, used to search a knowledge base according to the abstract question to obtain a first retrieval result; a hypothetical answer module, used to use a large language model to generate a hypothetical answer to the target question text; a second retrieval module, used to search a knowledge base according to the hypothetical answer to obtain a second retrieval result; a third retrieval module, used to search a knowledge base according to the target question text to obtain a third retrieval result; a result determination module, used to determine a target retrieval result according to the first retrieval result, the second retrieval result and the third retrieval result.

[0007] According to a third aspect of the embodiments of this specification, there is provided an electronic device, including: processor; a memory for storing processor-executable instructions; The processor is configured to execute the data retrieval method of the first aspect or any corresponding embodiment thereof.

[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, characterized in that computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to enable a computer to execute the data retrieval method of the above-mentioned first aspect or any corresponding implementation method thereof.

[0009] The technical solutions provided by the embodiments of this specification may have the following beneficial effects: In the embodiments of this specification, a composite search strategy of comprehensive semantic understanding, sub-question splitting, abstract question generation, and hypothetical answers is adopted, and the search path can be customized according to the question type, thereby improving the flexibility and pertinence of the search. In addition, by integrating the search results of multiple search paths, the search scope can be effectively expanded, the recall rate can be improved, and the accuracy and comprehensiveness of the search can be improved.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0012] Figure 1 It is a schematic diagram of a system architecture shown in this specification according to an exemplary embodiment.

[0013] Figure 2 It is a flow chart of a data retrieval method shown in this specification according to an exemplary embodiment.

[0014] Figure 3 is a flow chart of a method according to another exemplary embodiment of the present specification.

[0015] Figure 4 It is a hardware structure diagram of the computer device where the data retrieval device of the embodiment of this specification is located.

[0016] Figure 5 It is a block diagram of a data retrieval device according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION

[0017] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0018] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0019] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0020] Next, the embodiments of this specification are described in detail.

[0021] The following combination Figure 1 The system architecture to which the data retrieval method and device in the embodiments of this specification can be applied is described. It should be noted that: Figure 1What is shown is merely an example of a system architecture to which the embodiments of this specification can be applied, to help those skilled in the art understand the technical content of this specification, but it does not mean that the embodiments of this specification cannot be used in other devices, systems, environments or scenarios.

[0022] Figure 1 It is a schematic diagram of a system architecture shown in this specification according to an exemplary embodiment.

[0023] like Figure 1 As shown, the system architecture may include, for example, a terminal device, a network and a server. The network is used to provide a medium for a communication link between the terminal device and the server. The network may include various connection types, such as wired and / or wireless communication links, etc.

[0024] Users can use terminal devices to interact with servers through the network to receive or send messages, etc. Various communication client applications can be installed on the terminal devices, such as web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc.

[0025] The terminal device may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0026] The server can be a server that provides various services, such as a background management server that provides support for the content browsed by the user using the terminal device. The background management server can analyze and process the received user request and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device.

[0027] The data retrieval method provided in the embodiments of this specification is described in detail below. Figure 2 As shown, Figure 2 This is a flowchart of a data retrieval method according to an exemplary embodiment of this specification. The method can be applied to a server. The data retrieval method provided in the embodiment of this specification may include the following steps.

[0028] In step 210, the large language model is used to analyze whether the target question text can be split. If it is determined that the target question text cannot be split, steps 220 to 260 are executed.

[0029] According to the embodiments of the present specification, for example, a large language model can be used to analyze whether the target question text contains multiple information and whether it is a comparative question; if the target question text does not contain multiple information and the target question text is not a comparative question, the target question text is determined to be non-separable; otherwise, the target question text is determined to be separable.

[0030] In step 220, the target question text is rewritten into an abstract question using a large language model.

[0031] According to the embodiments of this specification, for example, a large language model can be used to extract key words and phrases in the target question text. Based on the key words and phrases, the upper-level intentions and core requirements are determined. Then, based on the upper-level intentions and core requirements, an abstract question is generated.

[0032] In step 230, the knowledge base is searched according to the abstract question to obtain a first search result.

[0033] According to the embodiments of this specification, for example, the similarity between the abstraction problem and each knowledge in the knowledge base can be calculated, and the knowledge in the knowledge base with a similarity higher than a first similarity threshold can be determined as the first search result. The first similarity threshold can be set according to actual needs.

[0034] In step 240, a hypothetical answer to the target question text is generated using the large language model.

[0035] According to an embodiment of the present specification, for example, a large language model can be used to generate an answer corresponding to the target question text as a hypothetical answer without referring to a knowledge base.

[0036] In step 250, the knowledge base is searched based on the hypothetical answer to obtain a second search result.

[0037] According to the embodiments of the present specification, for example, the similarity between the hypothetical answer and each knowledge in the knowledge base can be calculated, and the knowledge in the knowledge base with a similarity higher than a second similarity threshold can be determined as the second search result. The second similarity threshold can be set according to actual needs.

[0038] In step 260, the knowledge base is searched according to the target question text to obtain a third search result.

[0039] According to the embodiments of this specification, for example, the similarity between the target question text and each knowledge in the knowledge base can be calculated, and the knowledge in the knowledge base with a similarity higher than a third similarity threshold can be determined as the third search result. The third similarity threshold can be set according to actual needs.

[0040] According to the embodiments of this specification, steps 220 to 230, steps 240 to 250, and step 260 may be performed simultaneously or separately, and this specification does not specifically limit this.

[0041] In step 270, a target search result is determined based on the first search result, the second search result, and the third search result.

[0042] According to the embodiments of the present specification, for example, the first search result, the second search result, and the third search result may be integrated to obtain a target search result.

[0043] According to the embodiments of this specification, a composite search strategy of comprehensive semantic understanding, sub-question splitting, abstract question generation, and hypothetical answers is adopted, and the search path can be customized according to the question type, thereby improving the flexibility and pertinence of the search. In addition, by integrating the search results of multiple search paths, the search scope can be effectively expanded, the recall rate can be improved, and the accuracy and comprehensiveness of the search can be improved.

[0044] Optionally, when it is determined that the second target question text can be split, the target question text can be split into multiple sub-questions using a large language model. According to each of the multiple sub-questions, the knowledge base is searched to obtain a search result corresponding to each sub-question. Then, the search results corresponding to each sub-question are aggregated to obtain a target search result.

[0045] For example, if the large language model determines that the target question text contains multiple aspects of information after analyzing the target question text, a sub-question corresponding to each aspect is generated. If the large language model determines that the target question text is a comparison type question after analyzing the target question text, a sub-question corresponding to each comparison object is generated.

[0046] For each sub-question, the similarity between the sub-question and each knowledge in the knowledge base can be calculated, and the knowledge with a similarity higher than a fourth similarity threshold can be determined as the search result corresponding to the sub-question. The fourth similarity threshold can be set according to actual needs.

[0047] According to the embodiments of this specification, by understanding and splitting the question text, multiple sub-questions are generated, and the search is performed separately to improve the recall rate. In addition, by integrating the search results of multiple sub-questions, a more comprehensive and accurate answer can be obtained.

[0048] Optionally, the original question text may be preprocessed to obtain an intermediate question text. Then, the large language model is used to determine whether the intermediate question text has a clear intention. If the intermediate question text has a clear intention, the large language model is used to perform semantic optimization processing on the intermediate question text to obtain the target question text.

[0049] According to an embodiment of the present specification, the semantic optimization process may include, for example: using a large language model to identify and delete redundant descriptions in the intermediate question text and / or using a large language model to expand the semantic dimension of the intermediate question text.

[0050] According to the embodiments of the present specification, through semantic optimization processing, unclear, ambiguous or redundant information in the question text can be removed, and vague expressions, colloquial terms or domain-specific vocabulary can be converted into more standardized and precise query statements, thereby improving the matching degree with the data in the knowledge base and enhancing the retrieval effect.

[0051] According to the embodiments of the present specification, a useless word thesaurus and / or a synonym thesaurus can be defined and maintained. By defining and maintaining a useless word thesaurus and a synonym thesaurus, it can be used to cover the unique knowledge in the private domain and can also be used to screen the common knowledge.

[0052] Based on this, preprocessing the original question text may include, for example: splitting the original question text into multiple keywords. Then, for each of the multiple keywords, determining whether the useless word thesaurus contains the keyword, if the useless word thesaurus contains the keyword, deleting the keyword; and / or for each keyword, determining whether the synonym of the keyword is contained in the synonym thesaurus, if the synonym of the keyword is contained in the synonym thesaurus, replacing the keyword with the synonym.

[0053] Optionally, when the intermediate question text does not have a clear intention, the knowledge base can be searched based on the intermediate question text to obtain a search result. For example, the similarity between the intermediate question text and each knowledge in the knowledge base can be calculated, and the knowledge with a similarity higher than a fifth similarity threshold can be determined as the search result. The fifth similarity threshold can be set according to actual needs.

[0054] like Figure 3 FIG. 1 is a flowchart of another data retrieval method according to an exemplary embodiment. Based on the above-mentioned embodiment, this embodiment describes a data retrieval process, including the following steps: In this embodiment, the maintainable useless word library and synonymous word library can be defined separately in advance by modifying the configuration file, and then the corresponding word segmentation strategy can be set through a word segmentation tool (such as elasticsearch, etc.).

[0055] Step 301: The original question text (original question) may be received and split into multiple keywords. The split result is then compared with the useless word thesaurus and the synonym thesaurus, and only keywords that do not exist in the useless word thesaurus are retained, and the synonyms therein are replaced. Thus, a question text with noise removed and relatively accurate description, i.e., the intermediate question text, can be obtained.

[0056] Step 302: Get the intermediate question text after the first step of processing, and then use the large language model LLM and the query understanding prompt words to determine whether the intermediate question text lacks clear intention.

[0057] If it is determined that the intermediate question text lacks clear intent (for example, the query is meaningless symbols and numbers, a paragraph of text without semantics, etc.), and a valid new expression cannot be generated, step 303 is executed.

[0058] If it is determined that the intermediate question text has a clear intention, LLM will optimize the redundant descriptions in the intermediate question text and expand the semantic dimension of the intermediate question text to obtain the target question text newQ. Then step 304 is executed.

[0059] Question comprehension prompts may include: Please make inquiries based on the following points: 1. Your goal is to simplify the user problem as much as possible to overcome the limitations of distance-based similarity search and facilitate the retrieval of relevant content from the vector database.

[0060] 2. When converting, make sure to retain the core information of the original question while removing redundant and unnecessary parts.

[0061] 3. If the user's question is unclear and the semantics are ambiguous and meaningless, the output is null. Step 303: perform a knowledge base search on the intermediate question text (for example, including milvus vector data search and es keyword search) to obtain a search result.

[0062] Step 304: Perform routing judgment on the target question text. For example, LLM and sub-question splitting prompt words can be used to analyze whether the target question text contains multiple information or comparative properties, such as: "What is the rated voltage, operating temperature, size, etc. of the xxx switch?", "What are the prices of router A, router B, and router C?" and other queries that contain multiple information; another example is "Which has a lower price, switch A or switch B?", "Which is more cost-effective, product A or product B?" and other comparative queries. In this way, it can be determined whether it can be split into multiple sub-questions. If it can be split, then execute steps 305 to 306. If it cannot be split, then execute steps 304 to 306 Splitting sub-question prompts may include, for example: Please split the subquery according to the following points: 1. Receive and analyze questions raised by users.

[0063] 2. Determine whether the question contains multiple pieces of information or is a comparative question.

[0064] 3. If yes, split the sub-problem; if no, output null. For example, the target question text can be: "Which one is better, mobile phone A or mobile phone B?" After analyzing the target question text using LLM and split sub-question prompt words, the output result can be obtained as follows: Sub-question 1: What are the advantages of mobile phone A? Sub-question 2: What are the advantages of mobile phone B? For another example, the target question text may be: "Please introduce the surface features of the moon." After analyzing the target question text using LLM and split sub-question prompt words, the output result may be: null. Step 305: Use each sub-question to search the knowledge base separately.

[0065] For example, several entries with the highest similarity to each sub-question may be selected to obtain the search results for each sub-question.

[0066] Step 306: Aggregate the search results of each sub-question as the final result of this search.

[0067] Step 307: After extracting the upper semantics of the target question text using LLM and query abstraction prompt words, the knowledge base is searched based on the layer semantics, i.e., “query abstraction”. For example, for a query such as “which school will xxx attend in 2024”, the big model can extract it into “xxx’s educational history”.

[0068] Step 308: Let LLM directly answer the target question text without referring to the knowledge base data source. This answer is called "hypothetical answer". Then search the knowledge base based on the generated hypothetical answer. For example, if the query is: "Introduce the product specifications of xxx", LLM answers "xxx product specifications include size, temperature, rated voltage...", and then use this answer to search the knowledge base again. These abstract questions and hypothetical answers deeply understand the original query, provide multi-dimensional query entry, and cover all possible relevant information as much as possible.

[0069] Query abstraction hints may include, for example: Please follow the following process to extract the user's upper-level semantics: 1. Receive and parse the user’s original question.

[0070] 2. Use natural language processing technology to extract key words and phrases in the question.

[0071] 3. Determine the high-level intent and core requirements of the problem through semantic analysis.

[0072] 4. Structured output of upper-level semantics, including the core intent of the problem and possible solution directions.

[0073] For example, the target question text can be: "Which school will xxx attend in 2024?" After extracting the upper-level semantics using LLM and query abstraction prompt words, the output can be: xxx's educational history.

[0074] Step 309: Use the unsplit target question text newQ to perform knowledge base detection to obtain retrieval results.

[0075] Step 310: Integrate the search results from the abstract question, the hypothetical question, and the unsplit target question text. Then, the re-ranking model can be used to re-rank the target question text, and the top_k entries with the highest similarity are taken as the final result of this search. k is a positive integer and can be set according to actual needs.

[0076] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of a data retrieval device and a terminal used therein.

[0077] The embodiments of the data retrieval device of this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented by software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 4 The figure is a hardware structure diagram of the computer device where the data retrieval device of the embodiment of this specification is located, except Figure 4 In addition to the processor 410, memory 430, network interface 420, and non-volatile memory 440 shown, the server or electronic device where the device 431 is located in the embodiment may also include other hardware according to the actual function of the computer device, which will not be described in detail.

[0078] like Figure 5 As shown, Figure 5 is a block diagram of a data retrieval device according to an exemplary embodiment of the present specification, the device comprising: A split determination module 510 is used to analyze whether the target question text can be split using a large language model; A rewriting module 520, for rewriting the target question text into an abstract question using a large language model when it is determined that the target question text is inseparable; A first search module 530, configured to search the knowledge base according to the abstract question to obtain a first search result; A hypothetical answer module 540 is used to generate a hypothetical answer to the target question text using a large language model; A second search module 550 is used to search the knowledge base according to the hypothetical answer to obtain a second search result; The third search module 560 is used to search the knowledge base according to the target question text to obtain a third search result; The result determination module 570 is used to determine a target search result according to the first search result, the second search result and the third search result.

[0079] Optionally, the device may further include: A splitting submodule is used to split the target question text into multiple sub-questions using a large language model when it is determined that the target question text can be split; A sub-search module, used to search the knowledge base according to each of the multiple sub-questions, and obtain a search result corresponding to each sub-question; The aggregation module is used to aggregate the retrieval results corresponding to each sub-question to obtain the target retrieval results.

[0080] Optionally, the device may further include: A preprocessing module is used to preprocess the original question text to obtain an intermediate question text; The intent determination module is used to use the large language model to determine whether the intermediate question text has a clear intent; The semantic optimization module is used to use a large language model to perform semantic optimization processing on the intermediate question text when the intermediate question text has a clear intention, so as to obtain the target question text.

[0081] Optionally, the split determination module may include: The analysis submodule is used to use the large language model to analyze whether the target question text contains multiple information and whether it is a comparative question; The type determination submodule is used to determine that the target question text is not splittable if the target question text does not contain multiple information and is not a comparison question; otherwise, the target question text is splittable.

[0082] Optionally, the rewrite module may include: The extraction submodule is used to extract key words and phrases in the target question text using a large language model; The upper-level determination submodule is used to determine the upper-level intentions and core requirements based on key words and phrases; The abstract question generation submodule is used to generate abstract questions based on upper-level intentions and core requirements.

[0083] Optionally, the hypothesis answering module may include: The hypothetical answer generation submodule is used to generate an answer corresponding to the target question text as a hypothetical answer by using a large language model without referring to the knowledge base.

[0084] Optionally, the pre-processing module may include: The word splitting submodule is used to split the original question text into multiple keywords; a useless word deletion submodule, for determining, for each of the plurality of keywords, whether the useless word thesaurus contains the keyword, and if the useless word thesaurus contains the keyword, deleting the keyword; and / or The synonym determination submodule is used to determine, for each keyword, whether the synonym database contains a synonym for the keyword. If the synonym database contains a synonym for the keyword, the keyword is replaced with the synonym.

[0085] Optionally, the semantic optimization module may include: Redundancy processing submodule, used to identify and delete redundant descriptions in the intermediate question text; The extension submodule is used to expand the semantic dimension of the intermediate question text.

[0086] Optionally, the device may further include: The fourth retrieval module is used to search the knowledge base according to the intermediate question text to obtain the retrieval result when there is no clear intention in the intermediate question text.

[0087] According to the embodiments of this specification, a composite search strategy of comprehensive semantic understanding, sub-question splitting, abstract question generation, and hypothetical answers is adopted, and the search path can be customized according to the question type, thereby improving the flexibility and pertinence of the search. In addition, by integrating the search results of multiple search paths, the search scope can be effectively expanded, the recall rate can be improved, and the accuracy and comprehensiveness of the search can be improved.

[0088] Accordingly, the present specification also provides an electronic device, which includes a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to: use a large language model to analyze whether a target question text can be split; when it is determined that the target question text cannot be split, use the large language model to rewrite the target question text into an abstract question; based on the abstract question, search the knowledge base to obtain a first search result; use the large language model to generate a hypothetical answer to the target question text; based on the hypothetical answer, search the knowledge base to obtain a second search result; based on the target question text, search the knowledge base to obtain a third search result; determine the target search result based on the first search result, the second search result and the third search result.

[0089] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0090] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0091] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0092] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0093] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0094] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A data retrieval method, characterized in that: The method comprises: Use a large language model to analyze whether the target question text can be split; In the case where it is determined that the target question text cannot be split, Rewrite the target question text into an abstract question using a large language model; According to the abstracted problem, a knowledge base is searched to obtain a first search result; Generate a hypothetical answer to the target question text using a large language model; According to the hypothetical answer, the knowledge base is searched to obtain a second search result; Searching the knowledge base according to the target question text to obtain a third search result; A target search result is determined according to the first search result, the second search result and the third search result.

2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the target question text can be split, Using a large language model to split the target question text into multiple sub-questions; Searching the knowledge base according to each of the multiple sub-questions to obtain search results corresponding to each of the sub-questions; The retrieval results corresponding to each sub-question are aggregated to obtain the target retrieval result.

3. The method according to claim 1, characterized in that The method further comprises: Preprocess the original question text to obtain the intermediate question text; Using a large language model to determine whether the intermediate question text has a clear intention; In the case where the intermediate question text has a clear intention, the large language model is used to perform semantic optimization processing on the intermediate question text to obtain the target question text.

4. The method according to claim 1, characterized in that: The use of a large language model to analyze whether the target question text can be split includes: Using a large language model to analyze whether the target question text contains multiple information and whether it is a comparative question; If the target question text does not contain multiple information and the target question text is not a comparison question, it is determined that the target question text is not splittable; otherwise, it is determined that the target question text is splittable.

5. The method according to claim 1, characterized in that: The step of rewriting the target question text into an abstract question by using a large language model includes: Extracting key words and phrases in the target question text using a large language model; Based on the key words and phrases, identify the high-level intent and core needs; Generate abstract questions based on the high-level intentions and core requirements.

6. The method according to claim 1, characterized in that Generate a hypothetical answer to the target question text using a large language model, including: A large language model is used to generate an answer corresponding to the target question text as the hypothetical answer without referring to a knowledge base.

7. The method according to claim 3, characterized in that The preprocessing of the original question text includes: Splitting the original question text into multiple keywords; For each keyword among the plurality of keywords, determining whether the keyword is included in a useless word library, and if the keyword is included in the useless word library, deleting the keyword; and / or For each keyword, it is determined whether a synonym of the keyword is included in the synonym thesaurus. If the synonym thesaurus contains a synonym of the keyword, the keyword is replaced with the synonym.

8. The method according to claim 3, characterized in that The using of the large language model to perform semantic optimization processing on the intermediate question text includes: Identify and remove redundant descriptions in the interim question text; Expanding the semantic dimension of the intermediate question text.

9. The method according to claim 3, characterized in that: The method further comprises: In the case that the intermediate question text has no clear intention, the knowledge base is searched according to the intermediate question text to obtain a search result.

10. A data retrieval device, characterized in that: The device comprises: A split determination module is used to use a large language model to analyze whether the target question text can be split; A rewriting module, used for rewriting the target question text into an abstract question using a large language model when it is determined that the target question text is inseparable; A first search module, used to search the knowledge base according to the abstract question to obtain a first search result; A hypothetical answer module, used to generate a hypothetical answer to the target question text using a large language model; A second search module, used to search the knowledge base according to the hypothetical answer to obtain a second search result; A third retrieval module, used to search the knowledge base according to the target question text to obtain a third retrieval result; The result determination module is used to determine a target search result according to the first search result, the second search result and the third search result.

11. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Intelligent question and answer method, device and equipment and storage medium

    CN114398910A

  • Online intelligent question answering method and device based on instruction fine tuning and retrieval enhancement generation

    CN117688163A

  • Question and answer processing method and device, computer equipment, readable storage medium and program product

    CN119066172A

  • Retrieval method and retrieval equipment

    CN119415657A

  • Multi-source hybrid question answering method and system thereof

    KR101662450B1

Cited By

  • Question answering method and device and storage medium

    CN120579645A

  • Knowledge retrieval method and device, electronic equipment and storage medium

    CN121117177A