Information retrieval method and device and related equipment

By using a large language model for semantic parsing and vectorization in a vector knowledge base, the search keywords and target vector knowledge set are determined, solving the problem of inaccurate information retrieval in the vector knowledge base and achieving more accurate search results.

CN120994801APending Publication Date: 2025-11-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410613265.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The information retrieval results in the existing vector knowledge base are inaccurate and cannot meet the user's retrieval needs, especially when the user's input is unclear or the language expression is insufficient, which may return incorrect retrieval results.

Method used

The first major language model is used to perform semantic parsing of user questions, determine search keywords, and vectorize them. Combined with knowledge positioning, the target vector knowledge set is determined for retrieval, ensuring that the search results are within the matching knowledge range. The accuracy of retrieval is improved by rewriting question information and expanding synonyms, and by combining precise and fuzzy retrieval with semantic retrieval techniques.

Benefits of technology

It improves the accuracy and efficiency of information retrieval, ensures that search results can better solve users' problems, and reduces the occurrence of erroneous results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994801A_ABST
    Figure CN120994801A_ABST
Patent Text Reader

Abstract

The invention discloses an information retrieval method, and relates to the technical field of computers. The method can be applied to an application scene of information retrieval based on the vector knowledge base so as to solve the problem of inaccurate retrieval results. Specifically, the information retrieval method comprises the following steps: acquiring target problem information; performing semantic analysis on the target problem information through a first large language model (LLM), and determining a retrieval keyword corresponding to the target problem information; determining a keyword vector according to the retrieval keyword; knowledge positioning is carried out according to the retrieval keyword, a target vector knowledge set matched with the retrieval keyword is determined, and a retrieval result corresponding to the target question information probably belongs to the target vector knowledge set; and according to the keyword vector, performing retrieval from the target vector knowledge set to obtain a retrieval result corresponding to the target problem information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an information retrieval method, apparatus and related equipment. Background Technology

[0002] A vector knowledge base is an information management system based on vector database technology, commonly used in the field of information retrieval. Through a vector knowledge base, data such as text, images, and audio can be converted into vectors and stored. When a retrieval is needed, the user's question information can be converted into vectors, and search results can be obtained from the vector knowledge base based on vector matching.

[0003] However, in real-world scenarios, the information stored in vector knowledge bases can be quite complex, and the accuracy of the search requirements described by the question information varies. During the search, incorrect results may be obtained from the vector knowledge base, resulting in search results that fail to meet the user's search needs. Summary of the Invention

[0004] In view of this, this application provides an information retrieval method for obtaining accurate retrieval results. This application also provides corresponding apparatus, computing device clusters, computer-readable storage media, and computer program products.

[0005] Firstly, this application provides an information retrieval method. This method can be applied to information retrieval scenarios based on vector knowledge bases to solve the problem of inaccurate retrieval results. Specifically, when conducting information retrieval, the target question information can first be obtained. The target question information is determined based on the question input by the user, representing the user's retrieval intent. Next, the first question can be semantically parsed using a first language model to analyze the user's retrieval intent. Through the first language model, the search keywords corresponding to the first question can be obtained. After obtaining the search keywords, on the one hand, the search keywords can be vectorized to obtain the keyword vectors corresponding to the search keywords. On the other hand, knowledge localization can be performed based on the search keywords to determine the target vector knowledge set that matches the search keywords. Since the search keywords are obtained by parsing the target question information using the first language model, the search keywords can reflect the retrieval intent expressed in the target question information. Therefore, the target vector knowledge set that matches the search keywords also matches the retrieval intent, and the retrieval results corresponding to the target question information have a probability of belonging to the target vector knowledge set. After determining the target vector knowledge set, retrieval can be performed from the target vector knowledge set based on the keyword vectors to obtain the retrieval results corresponding to the target question information. In this way, knowledge localization is performed before the search, limiting the search results to the target knowledge set corresponding to the search keywords. This is equivalent to pre-determining the scope of information retrieval before searching based on keyword vectors, ensuring that the search results are within the target vector knowledge set corresponding to the search keywords, and preventing the retrieval of knowledge outside this set. Furthermore, the search keywords are obtained through semantic parsing using a large language model, rather than being derived from the breakdown of the original question information. Therefore, the search keywords effectively describe the user's search needs. Thus, the scope of information retrieval is associated with the question information, and the search keywords used during the search process are also associated with the question information, ensuring that the search results effectively address the user's question. This improves the accuracy of the search results.

[0006] In some possible implementations, the target vector knowledge set can be determined based on the knowledge positioning keywords corresponding to the vector knowledge set. Specifically, after determining the search keywords, multiple knowledge positioning keywords can be obtained. Each knowledge positioning keyword is associated with a vector knowledge set. Next, the search keywords can be matched with the multiple obtained knowledge positioning keywords. Based on the matching results, one or more target vector knowledge sets are determined from the multiple vector knowledge sets. The knowledge positioning keywords corresponding to the target vector knowledge sets match the search keywords. Here, the knowledge positioning keywords represent the domain corresponding to the knowledge in the vector knowledge set. Therefore, selecting the vector knowledge set whose knowledge positioning keywords match the search keywords as the target vector knowledge set can limit the search scope to the target vector knowledge sets matching the search keywords before the search begins. In this way, by limiting the search scope, the accuracy of the search results can be improved.

[0007] In some possible implementations, the target question information can be obtained by rewriting question information. Specifically, the original question information input by the user can be obtained first. Then, the original question information can be rewritten using a large language model (e.g., a second large language model) to obtain rewritten question information. The target question information can then be determined based on the rewritten question information. In this way, rewriting the original question information provided by the user before performing the decontamination chain can improve the quality of the questions used in information retrieval and increase the accuracy of information retrieval.

[0008] In some possible implementations, the rewritten question information may not meet the needs of information retrieval. Therefore, the rewritten question information can be quality-verified. Quality verification can predict whether the effect of using the rewritten question information for information retrieval is better than using the original question information. If the rewritten question information passes the quality verification, it means that using it for information retrieval is more effective, and thus the rewritten question information can be identified as the target question information. If the rewritten question information fails the quality verification, it means that using the original question information is more effective, and thus the original question information can be identified as the target question information. In this way, by performing quality verification on the rewritten question information, we can ensure that the quality of the target question information is not lower than that of the original question information, thereby avoiding the use of low-quality question information for verification. This ensures the quality of the question information used in the information retrieval process, improving both the efficiency and quality of information retrieval.

[0009] In some possible implementations, the search keywords can be expanded. Specifically, after obtaining the search keywords, expanded prompts can be generated based on them and sent to the third-party language model. The expanded prompts include the search keywords and instruct the third-party language model to expand the search with synonyms. The third-party language model can then expand the search with synonyms as instructed by the expanded prompts, obtaining and returning the synonyms corresponding to the search keywords. After receiving the expanded keywords and search keywords from the third-party language model, these can be vectorized to obtain keyword vectors. Expanding the search keywords before vectorizing them improves search accuracy.

[0010] In some possible implementations, keyword vectors can be used for both precise and fuzzy searches, and the final search result can be obtained based on the results of both precise and fuzzy searches. Specifically, on the one hand, vector matching can be performed from the target vector knowledge set based on the keyword vectors to obtain the corresponding first search result. The first search result contains the keywords corresponding to the keyword vectors. On the other hand, the keyword vectors can also be segmented into words to determine multiple keyword segments and the word segmentation vectors corresponding to each keyword segment. Based on the word segmentation vectors, vector matching can be performed from the target vector knowledge set to obtain the second search result. The second search result contains the keyword segments. The search result for the target question "new message" can be obtained based on the first and second search results. That is to say, on the one hand, retrieval can be performed based on keyword vectors, and on the other hand, word segmentation can be performed first, and then the word segmentation vectors can be used for retrieval. In this way, combining precise and fuzzy searches can broaden the search scope and obtain more accurate search results.

[0011] In some possible implementations, semantic retrieval can also be performed. Specifically, during retrieval, a semantic vector can be determined first based on the keyword vector and the question information vector. Then, vector matching is performed from the target vector knowledge set using the semantic vector. The semantic question information vector can be determined based on the target question information. In other words, during information retrieval, the semantic vector can be obtained by combining the question and its keywords, and then vector matching is performed using the semantic vector. In this way, the retrieval results obtained through semantic retrieval are more closely matched to the retrieval intent, improving the accuracy of information retrieval.

[0012] In some possible implementations, semantic vectors can be obtained through average pooling. Specifically, during vectorization, the search keywords and question information vectors can be mapped to n-dimensional vectors (n is a positive integer greater than 1). When determining the semantic vector, for each of the n dimensions, the average value of the keyword vector and question information vector is calculated for that dimension. Thus, by determining the average values ​​of the keyword vector and question information vector across the n dimensions, an n-dimensional vector can be constructed based on these average values, resulting in the semantic vector. In this way, through average pooling, the information implicit in the keyword vector and question information vector can be preserved within the semantic vector, improving the effectiveness of information retrieval.

[0013] Secondly, this application provides a retrieval device, comprising: an acquisition unit for acquiring target question information; a parsing unit for performing semantic parsing on the target question information using a first large language model (LLM) to determine retrieval keywords corresponding to the target question information; a vector determination unit for determining keyword vectors based on the retrieval keywords; a set determination unit for performing knowledge localization based on the retrieval keywords to determine a target vector knowledge set matching the retrieval keywords, wherein the retrieval result corresponding to the target question information has a probability of belonging to the target vector knowledge set; and a retrieval unit for retrieving from the target vector knowledge set based on the keyword vectors to obtain the retrieval result corresponding to the target question information.

[0014] In some possible implementations, the set determination unit is specifically used to acquire multiple knowledge positioning keywords, each of which corresponds to a vector knowledge set; match the search keyword with the multiple knowledge positioning keywords; and determine a target vector knowledge set from the multiple vector knowledge sets based on the matching results, wherein the knowledge positioning keyword corresponding to the target vector knowledge set matches the search keyword.

[0015] In some possible implementations, the acquisition unit is specifically used to acquire the original question information input by the user; the parsing unit is further used to rewrite the original question information using a second LLM to obtain rewritten question information; and to determine the target question information based on the rewritten question information.

[0016] In some possible implementations, the parsing unit is specifically used to perform quality verification on the rewritten question information to predict whether the effect of information retrieval using the rewritten question information is better than the effect of information retrieval using the original question information; if the rewritten question information passes the quality verification, the rewritten question information is determined as the target question information; if the rewritten question information fails the quality verification, the original question information is determined as the target question information.

[0017] In some possible implementations, the vector determination unit is specifically used to generate an expanded prompt based on the search keywords and send it to a third LLM. The expanded prompt includes the search keywords and is used to instruct the third LLM to perform synonym expansion based on the search keywords. The unit also receives synonyms corresponding to the search keywords returned by the third LLM and vectorizes the search keywords and the synonyms to obtain the keyword vector.

[0018] In some possible implementations, the retrieval unit is specifically configured to perform vector matching from the target vector knowledge set based on the keyword vector to obtain a first retrieval result, wherein the first retrieval result contains the keyword corresponding to the keyword vector; perform word segmentation on the keyword vector to determine multiple keyword word segments and word segmentation vectors corresponding to each keyword word segmentation; perform vector matching from the target vector knowledge set based on the word segmentation vectors to obtain a second retrieval result, wherein the second retrieval result contains the keyword word segmentation; and obtain the retrieval result corresponding to the target question information based on the first retrieval result and the second retrieval result.

[0019] In some possible implementations, the retrieval unit is specifically used to determine a semantic vector based on the keyword vector and the question information vector, and to perform vector matching from the target vector knowledge set based on the semantic vector, wherein the question information vector is determined based on the target question information.

[0020] In some possible implementations, the keyword vector, the question information vector, and the semantic vector each include n dimensions, where n is a positive integer greater than 1. The retrieval unit is specifically used to calculate the average value of the keyword vector and the question information vector in each of the n dimensions to obtain the value of the semantic vector in each of the n dimensions.

[0021] Thirdly, this application provides a computing device, comprising at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device to perform the method described in the first aspect or any possible implementation thereof. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The at least one computing device may further include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0022] Fourthly, this application provides a computing device cluster, the computing device including at least one computing device, the at least one computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0023] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0024] In a sixth aspect, this application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0025] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0026] Figure 1a A schematic diagram illustrating an application scenario of the information retrieval method provided in this application;

[0027] Figure 1b A schematic diagram illustrating another application scenario of the information retrieval method provided in this application;

[0028] Figure 1c A schematic diagram illustrating another application scenario of the information retrieval method provided in this application;

[0029] Figure 1d A schematic diagram illustrating another application scenario of the information retrieval method provided in this application;

[0030] Figure 2 A flowchart illustrating the information retrieval method provided in this application;

[0031] Figure 3 A flowchart illustrating a method for obtaining target problem information provided in this application;

[0032] Figure 4A flowchart illustrating the implementation of the information retrieval method provided in this application;

[0033] Figure 5 A schematic diagram of the information retrieval device provided in this application;

[0034] Figure 6 A schematic diagram of the structure of the computing device provided in this application;

[0035] Figure 7 A schematic diagram of a computing device cluster provided in this application;

[0036] Figure 8 This is a schematic diagram illustrating one implementation of the computing device cluster provided in this application. Detailed Implementation

[0037] To facilitate understanding, we will first introduce some of the terms used in this application.

[0038] Large Language Models (LLMs), also known simply as large models, are deep learning models that include a large number of parameters (for example, the number of parameters in an LLM can reach billions or even more). Large language models possess Natural Language Processing (NLP) capabilities and can handle tasks related to natural language. For example, large language models can perform tasks requiring NLP capabilities, such as semantic recognition, natural language rewriting, and synonym expansion.

[0039] Vector knowledge base: A vector knowledge base is a type of vector database that stores and retrieves data in vector format. Specifically, knowledge that needs to be stored can be vectorized and then stored in the vector knowledge base. When retrieving information from a vector knowledge base, a target vector can be determined based on keywords. Then, vector matching is used to find matching result vectors from the vector database to obtain search results that meet the retrieval requirements. The data stored in a vector knowledge base can also be referred to as knowledge.

[0040] Retrieval-Augmented Generation (RAG): Retrieval-augmented generation is an end-to-end application that combines a vector knowledge base and a large language model. In the RAG scenario, a user sends a search request to the RAG server. The user's search request is then vectorized to obtain a target vector. Next, the vector knowledge base retrieves results that match the target vector. Finally, the search results and the search request are sent to the large language model, which generates the search answer and displays it to the user.

[0041] Pooling: Pooling is an important operation in neural networks that can reduce the amount of data while retaining important feature information. Average pooling is a type of pooling operation. When performing average pooling on n m-dimensional vectors (where n and m are positive integers greater than 1), the average value of the n vectors can be calculated in each dimension to determine the value of the average-pooled vector in each dimension.

[0042] With the development of computer technology, information retrieval technology has received widespread attention. Vector knowledge base-based information retrieval technology is an important branch of information retrieval. Specifically, searchable information (such as text and media information) can be vectorized and stored in a vector database beforehand, resulting in a vector knowledge base. During retrieval, keywords can be vectorized, and vectors matching the keyword vectors can be found from the vector knowledge base. The knowledge corresponding to these vectors is then returned as the retrieval result.

[0043] Information retrieval technology based on vector knowledge bases can be applied to scenarios where search results are obtained from pre-defined information scopes. For example, it can be applied to the fields of RAG (Research, Information, and General Knowledge), information recommendation, and professional article generation. Taking the RAG field as an example, users can provide search keywords in the form of questions. After obtaining the user's question, it can be broken down into multiple keywords, which are then mapped to vectors. Next, vector matching can be used to search for knowledge matching the keywords in the vector knowledge base, obtaining search results. Finally, a large language model can be used to transform the search results, obtaining the search answer and displaying it to the user. In this way, by combining the NLP capabilities of the large language model, user questions can be answered in natural language. Furthermore, the basis for answering user questions, i.e., the search results, is pre-stored in the vector knowledge base, ensuring the quality of the search answer.

[0044] However, in real-world scenarios, the information stored in vector knowledge bases is often quite complex, potentially involving knowledge from multiple fields. The user's search intent may not be clear enough, so knowledge from other fields may be identified as knowledge from the user's desired field, resulting in inaccurate information retrieval results.

[0045] Specifically, vector knowledge bases may store knowledge from different domains, and this knowledge may contain easily confused concepts. The vectors corresponding to easily confused concepts in different domains may be similar or identical. Therefore, if the user's search intent is not clear enough, the search engine cannot determine which domains the user needs to retrieve, and may mistakenly identify knowledge from other domains as the user's desired domain, resulting in incorrect search results. Furthermore, for searches involving specialized knowledge, the same term may have different interpretations in different domains. Thus, searching solely based on keywords may confuse the meanings of different terms in different domains, leading to incorrect answers.

[0046] For example, in physics, the keyword "flow" often refers to the continuous movement of fluids, such as water flow and airflow. In computer science, however, "flow" often refers to continuous data or information, such as information flow, data flow, and message flow. The two are not the same. Similarly, in taxation, the keyword "depreciation" can be understood as the portion of a fixed asset's value that decreases over time, used as a deduction when calculating a company's taxable income. However, in other fields, such as financial accounting, the keyword "depreciation" may not only refer to the portion of an asset that decreases over time, but also involve physical depreciation and functional depreciation of physical equipment. The two are not the same.

[0047] Let's take a RAG (Real Estate Information Group) scenario as an example. Suppose user A owns a batch of machinery and plans to use the depreciation of this machinery to offset taxes. User A's question is, "I need to pay taxes, I have a batch of machinery, how should I depreciate it?" By segmenting the question, we can obtain the keyword "depreciation" and vectorize it. If the vector knowledge base includes relevant knowledge from both the tax and financial accounting fields, then searching from the vector knowledge base may yield explanations of "depreciation" not only in the tax field but also in other fields.

[0048] Correspondingly, if the search yields relevant explanations of "depreciation" in the tax field, the answer provided by the RAG system can guide user A to deduct taxes through the depreciation of machinery and equipment assets. However, if the search results yield relevant explanations of "depreciation" in other fields, the answer provided by the large language model may guide user A to depreciate the machinery and equipment before selling it, failing to solve user A's problem and resulting in an irrelevant answer.

[0049] It is evident that traditional keyword-based retrieval methods may suffer from inaccurate results because the same or similar keywords can have different interpretations in different fields. Conversely, the information retrieval method provided in this application, through identification using a primary language model, can determine that the user's search intent is to find knowledge related to "depreciation" within the "taxation" domain. Therefore, it can locate the target vector knowledge set of "taxation" based on the search keywords, avoiding searches from other vector knowledge sets and thus preventing the retrieval of interpretations of "depreciation" from other domains, thereby improving the accuracy of information retrieval.

[0050] Furthermore, in real-world scenarios, the keywords entered by users may not match the content they actually want to find. For example, if a user is unfamiliar with a certain field but has only heard of a certain keyword in that field, they might enter a different keyword due to memory lapses. Thus, searching with the wrong keyword will yield results that do not meet the user's actual needs. Additionally, in applications like RAG where users describe their search needs using natural language, the questions entered by users may not fully describe their search requirements due to limitations in their language expression abilities. Consequently, the search results will also fail to meet the user's actual needs.

[0051] In summary, existing information retrieval technologies based on vector knowledge bases may suffer from inaccurate search results, failing to meet users' actual needs.

[0052] Based on this, this application provides an information retrieval method. This method can be applied to information retrieval scenarios based on vector knowledge bases to solve the problem of inaccurate retrieval results. Specifically, when performing information retrieval, the target question information can first be obtained. The target question information is determined based on the question input by the user, representing the user's retrieval intent. Next, the first question can be semantically parsed using a first language model to analyze the user's retrieval intent. Through the first language model, the search keywords corresponding to the first question can be obtained. After obtaining the search keywords, on the one hand, the search keywords can be vectorized to obtain the keyword vectors corresponding to the search keywords. On the other hand, knowledge localization can be performed based on the search keywords to determine the target vector knowledge set that matches the search keywords. Since the search keywords are obtained by parsing the target question information using the first language model, the search keywords can reflect the retrieval intent expressed in the target question information. Therefore, the target vector knowledge set that matches the search keywords also matches the retrieval intent, and the retrieval results corresponding to the target question information have a probability of belonging to the target vector knowledge set. After determining the target vector knowledge set, retrieval can be performed from the target vector knowledge set based on the keyword vectors to obtain the retrieval results corresponding to the target question information. In this way, knowledge localization is performed before the search, limiting the search results to the target knowledge set corresponding to the search keywords. This is equivalent to pre-determining the scope of information retrieval before searching based on keyword vectors, ensuring that the search results are within the target vector knowledge set corresponding to the search keywords, and preventing the retrieval of knowledge outside this set. Furthermore, the search keywords are obtained through semantic parsing using a large language model, rather than being derived from the breakdown of the original question information, so the search keywords can better describe the user's search needs. Thus, the scope of information retrieval is associated with the question information, and the search keywords used during the search process are also associated with the question information, ensuring that the search results can effectively solve the user's problem. This improves the accuracy of the search results.

[0053] Next, various non-limiting implementation methods of the information retrieval process will be described in detail. The information retrieval method provided in this application can be applied to application scenarios of information retrieval from vector knowledge bases.

[0054] For example, in the RAG scenario, the information retrieval method provided in this application can be used to obtain retrieval results from the vector knowledge base, and then a large language model can be used to generate an answer.

[0055] For example, in a personalized content recommendation system, user-related information can be input into the information retrieval device as question information. Content that can be recommended to the user is stored in a vector knowledge base, and the vector knowledge sets are divided according to content categories. In this way, appropriate content can be selected and recommended to the user based on their relevant information. Similarly, in a text generation system involving specialized knowledge, the specialized knowledge can be stored in a vector knowledge base, and the vector knowledge sets are divided according to the domain to which the specialized knowledge belongs. Thus, after obtaining a text generation task, the requirements of the text generation task can be used as question information, and the necessary knowledge for the text generation task can be retrieved from the vector knowledge base to generate the corresponding text.

[0056] It should be noted that, for ease of understanding, the following explanation uses the application of the information retrieval method in the RAG scenario as an example. The information retrieval method to be protected in this application can also be applied to other scenarios besides the RAG scenario.

[0057] The following section will introduce exemplary application scenarios using RAG as an example.

[0058] See Figure 1a , Figure 1a This is a schematic diagram illustrating one application scenario of the information retrieval method provided in this application. Figure 1a The application scenario of RAG shown includes user A, client 10, information retrieval device 20, large language model 31, large language model 32, and vector knowledge base 40. Information retrieval device 20 includes acquisition unit 21, parsing unit 22, vector determination unit 23, set determination unit 24, and retrieval unit 25. Vector knowledge base 40 is pre-divided into vector knowledge set 41, vector knowledge set 42, and vector knowledge set 43. Different vector knowledge sets can be associated with knowledge from different domains.

[0059] During the use of the RAG service, user A can first input question information on client 10. Client 10 can send the question information to information retrieval device 20 via the network or other means. Information retrieval device 20 can obtain the question information sent by the client through acquisition unit 21. After receiving the question information, acquisition unit 21 can send the question information to parsing unit 22 and large language model 32. Parsing unit 22 can call large language model 31 to parse the question information, thereby determining the search keywords corresponding to the question information. Parsing unit 22 can send the search keywords to vector determination unit 23 and set determination unit 24 respectively. Vector determination unit 23 can determine the keyword vector based on the search keywords and send it to retrieval unit 25. Set determination unit 24 can select one (or more) vector knowledge sets from vector knowledge sets 41, 42, and 43 as the target vector knowledge set based on the search keywords. After determining the target vector knowledge set, set determination unit 24 can notify retrieval unit 25 of the target vector knowledge set, for example, by sending the identifier of the target vector knowledge set to retrieval unit 25. Retrieval unit 25 can perform a search from the target vector knowledge set based on the keyword vector to obtain the search results corresponding to the question information. Figure 1a In the corresponding implementation, the set determination unit 24 determines the target vector knowledge set as the vector knowledge set 43. Next, the retrieval unit 25 can send the retrieval results to the large language model 32. The large language model 32 can combine the user's question and the retrieval results to generate answer information and return the information to the client 10. The client 10 can display the answer information corresponding to the question information to user A, so that the user knows the answer to the question information.

[0060] In the RAG scenario, client 10 can also be referred to as a RAG client, and information retrieval device 20 can be referred to as a RAG server. Optionally, client 10 can be, for example, a browser client or software client running on the terminal device used by user A. Information retrieval device 20 can be a software platform running on a server or server cluster. Furthermore, information retrieval device 200 can call large language models and vector knowledge bases for information retrieval.

[0061] The following section provides a detailed introduction to the specific implementation methods in the information retrieval process.

[0062] See Figure 2 , Figure 2 This is a flowchart illustrating the information retrieval method provided in this application. This method can be applied to... Figure 1a The application scenario shown can also be applied to other applicable application scenarios. If this method is applied to... Figure 1aIf the application scenario is as shown, then the method can be executed by the information retrieval device 21.

[0063] Specifically, Figure 2 The information retrieval methods shown may specifically include:

[0064] S201: The information retrieval device acquires information about the target problem.

[0065] Before conducting an information retrieval, the information retrieval device can first determine the information retrieval needs. These needs can be described by target question information. That is, the information retrieval device can acquire target question information and determine the information retrieval needs by analyzing that information.

[0066] Optionally, the target question information can be information entered by the user through the client. Specifically, if a user needs to obtain information on a certain topic, the user can enter a search request described in natural language on the client. The client can then send the user's entered search request as the target question information to the information retrieval device.

[0067] However, in real-world scenarios, due to limitations in users' language expression abilities, the question information input by users may not adequately describe their search needs or be difficult for large language models to process. Therefore, if the user's input question information is directly treated as the target question information, the resulting search results may be inaccurate and fail to meet the user's needs.

[0068] Therefore, one possible approach is to optimize the quality of the question information to improve the quality of information retrieval. This would address the problem of inaccurate information retrieval caused by inaccurate user-inputted question information.

[0069] For example, information retrieval devices can engage in multi-turn dialogues with users to determine their search intent and target information. This multi-turn dialogue clarifies the user's search intent, leading to higher-quality target information and improving the quality of information retrieval.

[0070] Alternatively, for example, the information retrieval device can also rewrite the user-inputted question information, transforming low-quality question information into high-quality target question information, thereby improving information retrieval. Specifically, let's call the user-inputted question information the original question information. After obtaining the original question information, the information retrieval device can rewrite it using a second language model to obtain rewritten question information. Then, the target question information can be determined based on the rewritten question information. For example, the rewritten question information can be used as the target question information for subsequent processing.

[0071] For a detailed explanation of this information rewriting issue, please refer to [link / reference]. Figure 1b as well as Figure 3 The implementation details will not be elaborated here.

[0072] S202: The information retrieval device performs semantic analysis on the target question information through the first major language model to determine the retrieval keywords corresponding to the target question information.

[0073] After obtaining the target question information, the information retrieval device can parse the target question information to determine the retrieval intent. Specifically, the parsing unit in the information retrieval device can call the first major language model to perform semantic parsing on the target question information to determine the search keywords corresponding to the target question information.

[0074] Optionally, the number of search keywords corresponding to the target question information can be one or more.

[0075] The first major language model is a pre-configured large language model used to parse the question information to determine search keywords. Search keywords represent the search intent and are used to determine the target vector knowledge set and the keywords retrieved from it. That is, search keywords represent the specific content retrieved from the target question information, and the domain to which the retrieved information belongs can also be determined based on the search keywords. The domain to which the information belongs can be pre-defined. Optionally, the domain to which the information belongs can be determined based on the division of the vector knowledge base, with each vector knowledge set corresponding to one domain. The part about determining the domain to which the retrieved information belongs based on search keywords will be discussed below and will not be repeated here.

[0076] The following describes some methods for determining search keywords.

[0077] Optionally, search keywords can be obtained by extracting keywords from the target question information. That is, search keywords can be keywords from the target question information. The first language model can have a keyword extraction function. After inputting the target question information into the first language model, the first language model can extract keywords from the target question information to obtain search keywords.

[0078] In some possible implementations, the first language model can determine search keywords based on prompt examples. Specifically, when calling the first language model to determine search keywords, the target question information and prompt examples can be input into the first language model. For example, the information retrieval device can generate a first prompt message based on the target question information and prompt examples, and then send the first prompt message to the first language model. The prompt example can be a pre-set example, which may include example question information and example search keywords. Based on the prompt example, the first language model can determine how the question information needs to be processed, thereby extracting search keywords from the target question information according to the association between the example question information and the example search keywords in the prompt example. Optionally, one example question information can correspond to one example search keyword, or it can correspond to multiple example search keywords.

[0079] Optionally, the suggested examples used to determine search keywords can be fixed or selected based on the target question information. These will be described separately below.

[0080] Implementation Method 1: Generate the first prompt message using a fixed prompt example.

[0081] If search keywords are determined using fixed prompt examples, these prompt examples can be pre-set and stored in the information retrieval device. After obtaining the target question information, a first prompt message can be generated based on the target question information and the pre-stored prompt examples and sent to the first large language model. Optionally, the aforementioned fixed prompt examples may include multiple sample question information and sample search keywords corresponding to each sample question information.

[0082] In some implementations, to ensure compatibility with information retrieval across different domains, the aforementioned fixed prompt examples can include prompt examples from different domains. That is, if the information retrieval device is used for information retrieval in domains A, B, and C, one or more prompt examples can be set for each domain separately. Optionally, the domains involved in the information retrieval device can be determined based on a vector knowledge base.

[0083] Method 2: Select a prompt example based on the target problem information to generate the first prompt message.

[0084] Specifically, multiple candidate prompt examples can be pre-configured. After obtaining the target question information, the information retrieval device can select a preset number of prompt examples from the multiple candidate prompt examples based on the target question information, and generate a first prompt message based on the selected prompt examples and the target question information, and send it to the first large language model. Optionally, the preset number can be, for example, 10. Optionally, the selected prompt example used to generate the first prompt message can be referred to as the target prompt example.

[0085] Optionally, the information retrieval device can select a suggestion example based on the degree of relevance between the candidate suggestion examples and the target question information. That is, the information retrieval device can select one or more candidate suggestion examples with the highest degree of relevance to the target question information from multiple candidate suggestion examples as the target suggestion examples.

[0086] Specifically, the information retrieval device can analyze each candidate suggestion example to determine the degree of relevance between each candidate suggestion example and the target question information. For example, the information retrieval device can determine the degree of relevance between the candidate suggestion example and the target question information based on the degree of overlap in words. Then, it can select a preset number of candidate suggestion examples with the highest degree of relevance from multiple candidate suggestion examples as target suggestion examples.

[0087] After the target sample is determined, the first prompt information can be generated based on the determined target sample and target problem information through the dynamic prompt engineering method.

[0088] After determining the search keywords, on the one hand, S203 can be executed to determine the corresponding keyword vector based on the search keywords, and on the other hand, S204 can be executed to determine the target vector knowledge set from the vector knowledge base based on the search keywords.

[0089] S203: The information retrieval device determines the keyword vector based on the search keywords.

[0090] Information retrieval devices can retrieve information from vector knowledge bases. The knowledge in a vector knowledge base exists in the form of vectors. Therefore, before retrieving from a vector knowledge base, the vectors used for retrieval can be determined first. Specifically, the information retrieval device can determine keyword vectors based on search keywords.

[0091] Optionally, the information retrieval device can embed the search keywords and then use the embedded search keywords as keyword vectors for information retrieval. If multiple search keywords are determined in step S202, the information retrieval device can embed each search keyword separately to determine the keyword vector corresponding to each search keyword.

[0092] As mentioned earlier, search keywords can be derived from target question information. However, in application scenarios such as RAG, the quality of the target question information is affected by the original question information input by the user. Furthermore, search keywords are obtained by semantic parsing of the question information using the primary language model. Therefore, search keywords may not fully reflect the user's search needs, leading to inaccurate information retrieval results.

[0093] In some possible implementations, to address the problem that search keywords may not fully reflect the user's search needs, leading to low accuracy of search results, the technical solution protected in this application can expand the search keywords and determine a keyword vector based on the search keywords and the expanded keywords. In other words, the information retrieval device can call a third-party language model to expand the search keywords, determine the synonyms corresponding to the search keywords, and thus obtain a keyword vector based on the search keywords and the keywords used.

[0094] Optionally, the number of synonyms can be one or more. If multiple synonyms are identified, the information retrieval device can vectorize each synonym separately to determine the keyword vector corresponding to each synonym.

[0095] Specifically, when determining the synonyms corresponding to the search keywords, the information retrieval device can send extended prompt information to the third language model. This extended prompt information can also be called the second prompt information. The second prompt information may include the search keywords and corresponding sample information. The sample information in the second prompt information represents the association between the search keywords and synonyms; for example, it may include sample search keywords and their corresponding sample synonyms. The third language model can refer to the association between the sample search keywords and their sample synonyms to expand the search keywords, obtain the synonyms corresponding to the search keywords, and return them to the information retrieval device. The information retrieval device can receive the same keywords as the search keywords returned by the third language model. After obtaining the synonyms, the information retrieval device can vectorize the search keywords and synonyms to obtain keyword vectors. An introduction to vectorization can be found below and will not be repeated here.

[0096] Alternatively, if applied to the RAG field, the above process can be as follows: Figure 1c As shown. In Figure 1a Based on the implementation shown, Figure 1c The implementation shown also includes a large language model 34. Figure 1cIn the corresponding implementation, the large language model 34 functions as the third large language model mentioned earlier. The vector determination unit 23 in the information retrieval device 20 can send search keywords to the large language model 34. The large language model 34 can determine synonymous keywords based on the search keywords and return them to the vector determination unit 23, so that the vector determination unit 23 can determine the keyword vector.

[0097] In some scenarios, some (or all) synonyms may overlap with or have the same semantic meaning as the search keywords. Therefore, directly vectorizing all search keywords and synonyms could result in a large number of keyword vectors. This leads to a large number of vectors needing to be matched during vector matching, resulting in low information retrieval efficiency. To address this, information retrieval devices can deduplicate search keywords and synonyms, removing keywords with the same meaning and reducing the number of keywords requiring vectorization, thereby reducing the number of keyword vectors. This reduces the number of vectors that need to be matched, improving the efficiency of information retrieval.

[0098] S204: The information retrieval device locates knowledge based on the search keywords and determines the target vector knowledge set that matches the search keywords.

[0099] As mentioned earlier, because vector knowledge bases contain knowledge from different domains, directly searching from the vector knowledge base based on keyword vectors may yield inaccurate search results. Therefore, in Figure 2 In the corresponding implementation, the knowledge in the vector knowledge base can be pre-divided into multiple vector knowledge sets. During information retrieval, on the one hand, keyword vectors can be determined based on the search keywords; on the other hand, knowledge can be located based on the search keywords to determine the target vector knowledge set that matches the search keywords. Therefore, selecting the vector knowledge set that matches the search keywords as the target vector knowledge set allows the search scope to be limited to the target vector knowledge set matching the search keywords before the search begins. In this way, by limiting the search scope, the accuracy of the search results can be improved.

[0100] Optionally, the number of target vector knowledge sets matching the search keywords can be one or more. For ease of explanation, the following explanation will primarily use the example of a single target vector knowledge set.

[0101] Optionally, the information retrieval device can perform knowledge localization through keyword matching. Specifically, each vector knowledge set in the vector knowledge base can correspond to a knowledge localization keyword. The knowledge localization keyword corresponding to a vector knowledge set can describe the domain to which the vectors in that vector knowledge set belong. Therefore, if a search keyword matches a knowledge localization keyword, it means that the search keyword may match a certain knowledge in the corresponding vector knowledge set, and the search intent represented by the search keyword may match a certain knowledge in the vector knowledge set. Therefore, searching from the vector knowledge set can yield search results corresponding to the search intent. Furthermore, narrowing the search scope from the entire vector knowledge base to the vector knowledge set corresponding to the search keyword results in more accurate search results, avoiding the retrieval of knowledge irrelevant to the search intent.

[0102] The following is a detailed introduction. First, we will introduce the method of partitioning the vector knowledge set.

[0103] In this application, a vector knowledge set is obtained by partitioning knowledge in a vector knowledge base. Optionally, vector knowledge sets can be created based on the domain to which the knowledge belongs during the process of building the vector knowledge base. If a piece of knowledge corresponds to a certain knowledge positioning keyword, then this knowledge can be added to the vector knowledge set corresponding to this knowledge positioning keyword. The knowledge positioning keyword can be set when partitioning the vector knowledge set. Optionally, a vector knowledge set can correspond to one knowledge positioning keyword or a group of knowledge positioning keywords.

[0104] Understandably, a single piece of knowledge can correspond to multiple knowledge positioning keywords. Correspondingly, this knowledge can belong to multiple vector knowledge sets. For example, suppose a piece of knowledge describes tax-related laws and regulations; then this knowledge can belong to both the vector knowledge set corresponding to the knowledge positioning keyword "taxation" and the vector knowledge set corresponding to the knowledge positioning keyword "laws and regulations."

[0105] Optionally, vector knowledge sets can be implemented based on independent databases, meaning different vector knowledge sets correspond to different databases, and each database can be associated with a knowledge-locating keyword. Alternatively, vector knowledge sets can also be virtual data sets partitioned within a database.

[0106] In this application, knowledge positioning can be performed by matching search keywords and knowledge positioning keywords. That is, the target vector knowledge set can be selected from multiple vector knowledge sets based on the matching results of search keywords and knowledge positioning keywords. Optionally, if multiple search keywords are determined in step S202, knowledge positioning can be performed separately based on each search keyword.

[0107] The following introduces three ways to implement knowledge localization.

[0108] Implementation Method 1: The information retrieval device can compare whether the search keywords and knowledge positioning keywords are consistent. If a search keyword matches a knowledge positioning keyword, it can be considered a match. Accordingly, the vector knowledge set corresponding to the knowledge positioning keyword can be determined as the target vector knowledge set.

[0109] Implementation Method Two: The information retrieval device can determine whether a certain knowledge positioning keyword includes the search keyword. If a certain knowledge positioning keyword includes the search keyword, it can be considered that the search keyword matches the knowledge positioning keyword. Accordingly, the vector knowledge set corresponding to the knowledge positioning keyword can be determined as the target vector knowledge set.

[0110] Implementation Method 3: The information retrieval device can perform knowledge localization based on the similarity between search keywords and knowledge positioning keywords. Specifically, the information retrieval device can calculate the similarity between search keywords and each knowledge positioning keyword, for example, by calculating the similarity between the search keywords and knowledge positioning keywords based on the edit distance between them. If the similarity between a search keyword and a knowledge positioning keyword is higher than a preset similarity threshold, the search keyword can be considered a match for that knowledge positioning keyword. Accordingly, the vector knowledge set corresponding to that knowledge positioning keyword can be determined as the target vector knowledge set.

[0111] It is understandable that other methods can be used for knowledge localization in practical applications, which will not be elaborated here.

[0112] S205: The information retrieval device performs a search based on the keyword vector and the target vector knowledge set to obtain the retrieval results corresponding to the target question information.

[0113] After determining the keyword vector and the target vector knowledge set, the information retrieval device can retrieve the target vector knowledge set based on the keyword vector to obtain the retrieval results corresponding to the target question information.

[0114] Optionally, the information retrieval device can determine the retrieval results corresponding to the target question from a vector knowledge set based on vector matching. Vector matching refers to selecting one (or more) vectors from multiple selectable vectors that match a reference vector. In other words, the information retrieval device can find knowledge that matches vectorized keywords from vectorized knowledge to obtain retrieval results. Thus, since the retrieval results are obtained based on vector matching, the correlation between the retrieval results and the keyword vectors is high, and the retrieval results can answer the target question.

[0115] The information retrieval device can perform vector matching from a target vector knowledge set based on keyword vectors. Optionally, the information retrieval device can use keyword vectors as reference vectors for vector matching, and / or, the information retrieval device can first process the keyword vectors and then use the processed vectors as reference vectors for vector matching. For a more detailed explanation of this part, please refer to [link to relevant documentation]. Figure 4 The corresponding implementation methods will not be elaborated here.

[0116] Before performing a search based on keyword vectors, the target vector knowledge set is first determined from the vector knowledge base according to the search keywords. This is equivalent to pre-determining the scope of information retrieval before the search, ensuring that the search results are within the target vector knowledge set corresponding to the search keywords, and preventing the retrieval of knowledge outside this set. Furthermore, the target vector knowledge set is derived from the search keywords, which are obtained through semantic parsing of the target question information using a large language model. Therefore, the target vector knowledge set is essentially categorized according to the user's question, and the information within it is relevant to the user's search intent. Consequently, the search results obtained from the target vector knowledge set also align with the user's search intent, avoiding the presentation of knowledge from other domains. Moreover, the search keywords are also obtained through semantic parsing using a large language model, ensuring they effectively describe the user's search needs. In this way, the scope of information retrieval is associated with the question information, and the search keywords used during the search process are also related to the question information, ensuring that the search results effectively address the user's question. This improves the accuracy of the search results.

[0117] After obtaining the search results corresponding to the target question information, the information retrieval device can output the search results. For example, in a RAG scenario, the information retrieval device can output the search results and target question information to a fourth language model, so that the fourth language model can generate a response to the target question information based on the search results and target question information and return it to the user. For example, in Figure 1a In the application scenario shown, after obtaining the search results, the information retrieval device 20 can send the question information and search results to the large language model 32. The large language model 32 can generate answer information based on the question information and search results, and return the answer information to the client 10, thus completing the response to the user.

[0118] Optionally, in the above implementation, the first, second, third, and fourth language models can be the same large language model or different large language models.

[0119] The preceding text introduced some implementation methods for information retrieval devices to determine search results based on target question information. In the above introduction, the target question information can be the question information input by the user, i.e., the original question information, or it can be obtained by the information retrieval device by rewriting the target question information. The following section will combine... Figure 3 This paper introduces some implementation methods for information retrieval devices to rewrite target question information.

[0120] See Figure 3 This figure is a flowchart illustrating one method for obtaining target problem information provided in this application. This method can be applied to... Figure 1b The application scenarios shown for RAG can also be applied to other applicable scenarios. If this method is applied to… Figure 1b If the application scenario is as shown, then the method can be executed by the information retrieval device 21.

[0121] Specifically, Figure 3 The specific methods for rewriting the problem information shown can include:

[0122] S301: The information retrieval device receives the original question information sent by the client.

[0123] When rewriting problem information, the information retrieval device can first obtain the problem information sent by the client. Figure 3 In the corresponding implementation, the question information entered by the user on the client and returned by the client to the information retrieval device can be referred to as the original question information. In other words, the user can enter the original question information on the client. The client can then send the original question information to the information retrieval device via the network.

[0124] Optionally, to facilitate the rewriting of question information, the information retrieval device (or client device, etc.) can preprocess the original question information. Specifically, useless information in the user-input question information can be removed using methods such as regular expression matching. Useless information may include, for example, spaces, punctuation marks, stop words, and interjections—words not involved in the information retrieval process.

[0125] S302: The information retrieval device rewrites the original question information using the second language model to obtain the rewritten question information.

[0126] exist Figure 3In the corresponding implementation, the information retrieval device can invoke a second language model to rewrite the question information, obtaining rewritten question information corresponding to the original question information. Specifically, after obtaining the original question information, the information retrieval device can send the original question information to the second language model, thereby rewriting the original question information through the second language model to obtain rewritten question information. Optionally, the second language model can obtain one rewritten question information, or it can obtain multiple rewritten question information based on the original question information.

[0127] Optionally, the information retrieval device can invoke the second language model to rewrite the question information using the third prompt information. The third prompt information may include the original question information and sample information corresponding to the original question information. The sample information corresponding to the original question information can indicate the relationship between the question information before and after rewriting, and is used to instruct the second language model to rewrite the question information. Optionally, the sample information corresponding to the original question information may include sample original question information and sample rewritten question information. Based on the sample original question information and sample rewritten question information, the second language model can determine the principle of question information rewriting, and thus rewrite the original question information into rewritten question information according to the instructions of the sample information.

[0128] Optionally, the sample information in the third prompt can be selected based on the original question information. Specifically, multiple sample information for rewriting the question information can be pre-configured. After obtaining the original question information, the information retrieval device can select one or more sample information from the pre-configured sample information based on the retrieved question information, generate the third prompt information based on the original question information and the sample information, and send the third prompt information to the second language model.

[0129] After obtaining the rewritten question information returned by the second largest language model, the information retrieval device can determine the target question information based on the rewritten question information, so as to perform information retrieval based on the target question information.

[0130] Specifically, the above process can be as follows: Figure 1b As shown. In Figure 1a Based on the implementation shown, Figure 1bThe implementation shown also includes a large language model 33, used to implement the functions of the second large language model described above. The acquisition unit 21 can acquire the original question information sent by the client 10 and send it to the parsing unit 22. The parsing unit 22 can send the original question information to the large language model 33. The large language model 33 can determine the rewritten question information based on the original question information and return it to the parsing unit 22. The parsing unit 22 can determine the target question information based on the rewritten question information and send the target question information to the large language model 31. The large language model 31 can parse the target question information, determine the search keywords, and return them to the parsing unit 22. Then, the information retrieval device 20 can proceed as follows... Figure 2 The implementation method shown determines the search results.

[0131] After obtaining the rewritten question information, the information retrieval device can determine the target question information based on the rewritten question information. Thus, by rewriting the original question information provided by the user before proceeding with the decontamination chain, the quality of the questions used in information retrieval can be improved, thereby increasing the accuracy of information retrieval.

[0132] The following sections, in conjunction with steps S303, S304, and S305, introduce some methods for determining the target problem information based on the rewritten problem information.

[0133] It should be noted that steps S303, S304, and S305 described below are merely examples. In some other possible implementations, other methods can be used to determine the target question information according to the actual needs of information retrieval. For example, the information retrieval device can determine the original question information and the rewritten question information as target question information separately, obtaining two sets of target question information. Then, information retrieval is performed based on the two sets of target question information separately, resulting in two retrieval results. Finally, the two retrieval results are output, or the two retrieval results are merged and output. Alternatively, the information retrieval device can also merge the original question information and the rewritten question information, and use the merged question information as the target question information for information retrieval. This application does not limit the specific method for determining the target question information based on the rewritten question information.

[0134] S303: The information retrieval device performs quality verification on the rewritten problem information.

[0135] After obtaining the rewritten question information, the information retrieval device can perform a quality check on the rewritten question information. Through this quality check, the effectiveness of information retrieval using the rewritten question information can be predicted, and the effectiveness of information retrieval using the rewritten question information can be compared with that using the original question information. If the effectiveness of information retrieval using the rewritten question information is better than that using the original question information, the rewritten question information is determined to have passed the quality check, and step S304 is executed. If the effectiveness of information retrieval using the rewritten question information is not better than that using the original question information, the rewritten question information is determined to have failed the quality check, and step S305 is executed.

[0136] Optionally, during quality verification, it can be determined whether the rewritten question information meets preset conditions. These preset conditions refer to pre-defined criteria used to determine whether the rewritten question information passes the quality verification. Optionally, the preset conditions may include any one or more of the following: "whether the matching degree between the rewritten question information and the template question information is greater than a preset matching degree threshold," "whether the semantic similarity between the rewritten question information and the original question information is greater than a preset similarity threshold," and "whether the perplexity of the rewritten question information is greater than a preset perplexity threshold." These will be described in detail below.

[0137] In the first possible implementation, the preset conditions include "whether the degree of matching between the rewritten problem information and the template problem information is greater than a preset matching degree threshold".

[0138] The template question information is a pre-defined template of the target question information, suitable for use as the target question information. Optionally, the template question information can be set according to the question information rewriting capability of the second language model. Specifically, multiple question information templates can be pre-determined, and the second language model's ability to rewrite the question information for each template can be tested. Then, the template with the strongest question information rewriting capability can be used as the template question information. When determining whether the rewritten question information meets the preset conditions, the degree of matching between the rewritten question information and the target question information can be calculated, for example, by using regular expression matching methods. If the degree of matching between the rewritten question information and the target question information is not higher than a preset matching degree threshold, it can be determined that the rewritten question information does not meet the preset conditions.

[0139] In the second possible implementation, the preset conditions include "whether the semantic similarity between the rewritten question information and the original question information is higher than a preset similarity threshold".

[0140] If the second language model significantly modifies the original question information, it may lead to substantial differences between the original and rewritten question information. Consequently, the rewritten and original question information may also differ semantically. This could result in a significant discrepancy between the search requirements corresponding to the rewritten question information and the user's actual search needs, impacting the accuracy of information retrieval.

[0141] Therefore, in some implementations, it can be determined whether there is an excessively large difference between the rewritten question information and the original question information. Specifically, the information retrieval device can calculate the semantic similarity between the rewritten question information and the original question information, and determine whether the semantic similarity is greater than a preset similarity threshold. If the semantic similarity between the rewritten question information and the original question information is less than the preset similarity threshold, it can be determined that the rewritten question information does not meet the preset conditions.

[0142] In the third possible implementation, the preset condition includes "whether the perplexity of rewriting the problem information is greater than a preset perplexity threshold".

[0143] In the field of information retrieval, question information is used to represent the questions of the retrieval party (e.g., a user). Information retrieval systems obtain search results to answer these questions by performing information retrieval. However, in some scenarios, a second language model might reduce the question level of the question information, or even transform the interrogative sentence into a declarative sentence. Thus, if the rewritten question information is used as the target question information for semantic analysis, the first language model may be unable to determine the user's search intent, and consequently, the search keywords.

[0144] In some implementations, it can be determined whether the rewritten question information adequately expresses the searcher's question. Specifically, the perplexity of the rewritten question information can be calculated, and then it can be determined whether the perplexity exceeds a preset perplexity threshold. The perplexity of the rewritten question information indicates the degree to which the rewritten information semantically expresses a question. If the perplexity of the rewritten question information is less than the preset perplexity threshold, it can be determined that the rewritten question information does not meet the preset conditions.

[0145] Optionally, the above three implementation methods are only examples. In actual application scenarios, other conditions can be selected as preset conditions according to search requirements, which will not be elaborated here.

[0146] S304: If the rewritten problem information passes the quality verification, the information retrieval device will identify the rewritten problem information as the target problem information.

[0147] If the rewritten question information passes the quality check, it means that the quality of the rewritten question information is high and it can well represent the retrieval needs. Then the information retrieval device can identify the rewritten question information as the target question information and use the rewritten question information as the target question information for information retrieval.

[0148] S305: If the rewritten problem information fails the quality check, the information retrieval device will identify the original problem information as the target problem information.

[0149] If the rewritten question information fails the quality check, it means that the quality of the rewritten question information is poor and it is not suitable as the target question information for information retrieval. In this case, the information retrieval device can identify the original question information as the target question information and use the original question information as the target question information for information retrieval.

[0150] In this way, by performing quality checks on the rewritten question information, we can ensure that the quality of the target question information is not lower than that of the original question information, thereby avoiding the use of low-quality question information for information verification. This guarantees the quality of the question information used in the information retrieval process, improving both the efficiency and quality of information retrieval.

[0151] As mentioned above, when retrieving information from a target vector knowledge set based on keyword vectors, one can either use the keyword vectors as reference vectors for vector matching, or process the keyword vectors first and then use the processed vectors as reference vectors for vector matching.

[0152] The phrase "using keyword vectors as reference vectors for vector matching" can include precise keyword retrieval and / or fuzzy keyword retrieval based on keyword vectors. The phrase "processing keyword vectors first, then using the processed vectors as reference vectors for vector matching" can include determining semantic vectors based on keyword vectors and then using the semantic vectors for retrieval. The following section combines... Figure 4 The three implementation methods described above will be introduced. Figure 4 In the implementation shown, the information retrieval device can comprehensively employ the above three methods to determine the retrieval results from the target vector knowledge set. In practical applications, more or fewer methods can be selected to determine the retrieval results from the target vector knowledge set according to the information retrieval needs.

[0153] See Figure 4 The figure is a flowchart illustrating one implementation method of information retrieval provided in this application. This method can be applied to... Figure 1d The application scenario shown can also be applied to other applicable application scenarios. If this method is applied to... Figure 1dIf the application scenario is as shown, then the method can be executed by the information retrieval device 21.

[0154] Specifically, Figure 4 The information retrieval methods shown may specifically include:

[0155] S401: Perform vector matching from the target vector knowledge set based on the keyword vector to obtain the first search result.

[0156] When retrieving information based on keyword vectors, information retrieval devices can perform precise keyword searches. Precise keyword searches can also be referred to as precise keyword lookups. Figure 4 In the corresponding implementation, the search results obtained by the information retrieval device through precise keyword retrieval can be referred to as the first search result.

[0157] When performing precise keyword retrieval, vector matching can be used to determine whether a specific piece of knowledge in the target vector knowledge set contains the complete keyword. That is, whether the keyword appears completely in a particular piece of knowledge. If the keyword appears completely in a piece of knowledge, that piece of knowledge can be output as the first search result. Optionally, if it is determined that the keyword vector includes vectors corresponding to multiple keywords (e.g., search keywords and synonyms), then for each keyword, it can be checked one by one whether there is knowledge in the target vector knowledge set that completely includes that keyword. In this way, through precise keyword retrieval, knowledge matching the keyword (e.g., search keywords and synonyms) can be found, resulting in accurate search results.

[0158] Information retrieval devices can determine whether a keyword appears in a piece of knowledge based on vector matching. Specifically, when determining whether knowledge A includes keyword B, it can be determined whether the vector corresponding to knowledge A includes the vector corresponding to keyword B. If the vector corresponding to knowledge A includes the vector corresponding to keyword B, it can be determined that knowledge A includes keyword B. If the vector corresponding to knowledge A does not include the vector corresponding to keyword B, it can be determined that knowledge A does not include keyword B.

[0159] S402: Perform word segmentation on the keyword vector to determine multiple keyword segments and the corresponding word segmentation vector for each keyword segmentation.

[0160] In addition to precise retrieval based on keyword vectors, information retrieval devices can also perform fuzzy keyword retrieval from a target vector knowledge set based on keyword vectors. Figure 4 In the corresponding implementation, the search results obtained by the information retrieval device through keyword fuzzy search can be referred to as the second search result.

[0161] When performing fuzzy keyword searches, keywords (including search keywords and synonyms) can first be segmented into words to determine multiple keyword segments and their corresponding word vectors. For example, an information retrieval device can split a keyword into one or more keyword segments, and then vectorize each segment to obtain the word vector corresponding to each keyword segment.

[0162] S403: Perform vector matching from the target vector knowledge set based on the word segmentation vector to obtain the second search result.

[0163] After determining the segmentation vector corresponding to each keyword, vector matching can be performed from the target vector knowledge set based on the segmentation vectors to obtain the second search result. Vector matching determines whether a knowledge entry in the target vector knowledge set contains the complete keyword segmentation; that is, whether the complete keyword segmentation appears in a particular knowledge entry. If the complete keyword segmentation appears in a knowledge entry, that knowledge entry can be output as the second search result. Similarly, if a part of a keyword appears in a knowledge entry, that knowledge entry can be output as the search result. Thus, through keyword fuzzy search, the search scope of information retrieval is expanded, and the accuracy of information retrieval is improved.

[0164] Understandably, in some scenarios, certain keywords may not be segmented. In this implementation method, keywords that cannot be segmented can be used as keywords for fuzzy retrieval.

[0165] S404: Determine the semantic vector based on the keyword vector and the question information vector.

[0166] Steps S401 to S403 above introduce some implementation methods for information retrieval based on keyword vectors, including fuzzy keyword retrieval and precise keyword retrieval. In some scenarios, to better meet retrieval needs, keyword vectors can be processed into semantic vectors, thereby enabling information retrieval based on semantic vectors. In this way, the retrieval results obtained through semantic retrieval are more closely matched to the retrieval intent, improving the accuracy of information retrieval.

[0167] Semantic vectors, used to represent the retrieval intent expressed by the target question information, are obtained by combining search keywords and target question information. Specifically, when determining the semantic vector based on the keyword vector, the target question information can be analyzed first to determine the corresponding question information vector. Then, the semantic vector can be determined by combining the keyword vector and the question information vector. In this way, by analyzing the target question information, the retrieval intent expressed by the target question information can be determined. Combining the question information vector with the keyword vector further emphasizes the retrieval intent. Therefore, the semantic vector obtained from the question information vector and keyword vector can better reflect the retrieval intent expressed by the target question information. Information retrieval based on semantic vectors yields search results that better meet the needs of information retrieval.

[0168] Optionally, average pooling can be performed on the keyword vector and question information vector to determine the semantic vector. The keyword vector and question information vector can be vectors of the same dimension. During average pooling, the keyword vector and question information vector can be summed across each dimension and then averaged to obtain the semantic vector. That is, assuming both the keyword vector and question information vector are n-dimensional vectors (n is a positive integer greater than 1), the semantic vector is determined by summing the elements of the i-th dimension of the keyword vector (i is a positive integer less than or equal to n) with the elements of the i-th dimension of the question information vector and taking the average. This average value is then used as the element of the i-th dimension of the semantic vector. In this way, average pooling preserves the information implicit in the keyword vector and question information vector within the semantic vector, improving the effectiveness of information retrieval.

[0169] In some possible implementations, the information retrieval vector may be determined based on multiple keywords derived from the target question information. Correspondingly, when determining the semantic vector, it can be determined based on multiple keyword vectors and the question information vector. Assuming the information retrieval device determines m keyword vectors, the m keyword vectors and the question information vector can be averaged to obtain the semantic vector. Specifically, the value of the i-th element in the semantic vector can be determined using the following formula (1).

[0170] Formula (1):

[0171] Among them, a i This represents the i-th element in the semantic vector. This represents the i-th element in the first keyword vector. This represents the i-th element in the second keyword vector. c represents the i-th element in the m-th keyword vector. i This represents the i-th element in the question information vector. m is the number of keyword vectors.

[0172] S405: Based on the semantic vector, perform vector matching from the target vector knowledge set to obtain the third retrieval result.

[0173] After determining the semantic vector, vector matching can be performed from the target vector knowledge set based on the semantic vector to obtain the third retrieval result. Through vector matching, it can be determined whether there is knowledge in the target vector knowledge set that matches the semantic vector. If so, this knowledge can be used as the third retrieval result. Optionally, the information retrieval device can also calculate the similarity between the semantic vector and each vector in the target vector knowledge set, and use the knowledge corresponding to the vectors with similarity higher than a similarity threshold as the third retrieval result.

[0174] S406: Based on the first search result, the second search result, and the third search result, determine the search results corresponding to the target question information.

[0175] After obtaining three information retrieval results through three methods, the information retrieval device can determine the retrieval result corresponding to the target question information based on the three retrieval results. In this way, the final retrieval result output by the information retrieval device is obtained by fusing different retrieval results obtained through different methods, which can comprehensively and accurately answer the question information, thereby improving the recall and precision of information retrieval.

[0176] For example, an information retrieval device can first integrate and deduplicate the first, second, and third search results to remove overlapping parts. Next, a ranking model can be used to sort the deduplicated search results, ranking the knowledge within the search results according to their relevance to the target question. Finally, the information retrieval device can output the ranked search results.

[0177] Alternatively, if applied to the RAG field, the above process can be as follows: Figure 1d As shown. In Figure 1a Based on the implementation shown, Figure 1d In the implementation shown, the retrieval unit 25 can perform retrieval from the vector knowledge set 43 through three methods: exact keyword matching, fuzzy keyword matching, and semantic matching.

[0178] This application also provides an information retrieval device, wherein the information retrieval device can be applied to... Figure 1a , Figure 1b , Figure 1c or Figure 1d The information retrieval device shown in the implementation method is used to achieve... Figure 2 , Figure 3 or Figure 4 The information retrieval device in the illustrated implementation demonstrates its functionality. Specifically, as shown... Figure 5 As shown, the information retrieval device 500 includes:

[0179] Acquisition unit 510 is used to acquire target problem information;

[0180] The parsing unit 520 is used to perform semantic parsing on the target question information using the first large language model LLM to determine the search keywords corresponding to the target question information;

[0181] Vector determination unit 530 is used to determine a keyword vector based on the search keywords;

[0182] The set determination unit 540 is used to perform knowledge positioning based on the search keywords, determine the target vector knowledge set that matches the search keywords, and the search results corresponding to the target question information have a probability of belonging to the target vector knowledge set.

[0183] The retrieval unit 550 is used to retrieve the target vector knowledge set based on the keyword vector to obtain the retrieval results corresponding to the target question information.

[0184] The acquisition unit 510, parsing unit 520, vector determination unit 530, set determination unit 540, and retrieval unit 550 can all be implemented in software or in hardware. For example, the implementation of the acquisition unit 510 will be described below. Similarly, the implementation of the parsing unit 520, vector determination unit 530, set determination unit 540, and retrieval unit 550 can refer to the implementation of the acquisition unit 510.

[0185] As an example of a software functional unit, the acquisition unit 510 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the acquisition unit 510 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0186] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0187] As an example of a hardware functional unit, the acquisition unit 510 may include at least one computing device, such as a server. Alternatively, the acquisition unit 510 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0188] The multiple computing devices included in the acquisition unit 510 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the acquisition unit 510 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the acquisition unit 510 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0189] It should be noted that, in other embodiments, the acquisition unit 510 can be used to execute any step in the information retrieval method, the parsing unit 520 can be used to execute any step in the information retrieval method, the vector determination unit 530 can be used to execute any step in the information retrieval method, the set determination unit 540 can be used to execute any step in the information retrieval method, and the retrieval unit 550 can be used to execute any step in the information retrieval method. The steps implemented by the acquisition unit 510, the parsing unit 520, the vector determination unit 530, the set determination unit 540, and the retrieval unit 550 can be specified as needed. By implementing different steps in the information retrieval method through the acquisition unit 510, the parsing unit 520, the vector determination unit 530, the set determination unit 540, and the retrieval unit 550, all functions of the information retrieval device can be realized.

[0190] This application also provides a computing device 100. For example... Figure 6 As shown, the computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 100.

[0191] Bus 102 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The Unified Bus is also known as the Lingqu Bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus is represented by only one line, but this does not mean that there is only one bus or one type of bus. Bus 104 may include a path for transmitting information between various components of computing device 100 (e.g., memory 106, processor 104, communication interface 108). The unified bus may also be referred to as the Lingqu bus.

[0192] The processor 104 may include any one or more of the following computing devices: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP), ASIC, FPGA, CPLD, NPU, SoC, offload card, accelerator card, etc.

[0193] Memory 106 may include volatile memory, such as random access memory (RAM). Processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 106 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0194] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 106, or two or more types of storage media can be configured to realize the function of memory 106. This application does not limit this.

[0195] The memory 106 stores executable program code, which the processor 104 executes to implement the functions of the aforementioned acquisition unit 510, parsing unit 520, vector determination unit 530, set determination unit 540, and retrieval unit 550, thereby realizing the information retrieval method. That is, the memory 106 stores instructions for executing the information retrieval method. The instructions or code stored in the memory 106 can be read and executed by the processor 104 to achieve the aforementioned functions. Figure 2 , Figure 3 or Figure 4 The information retrieval method is shown in any of the implementations of the embodiments illustrated.

[0196] The communication interface 108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 100 and other devices or communication networks.

[0197] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0198] like Figure 7 As shown, the computing device cluster includes at least one computing device 100. The memory 106 of one or more computing devices 100 in the computing device cluster may store the same instructions for executing information retrieval methods.

[0199] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the information retrieval method. In other words, a combination of one or more computing devices 100 can jointly execute the instructions for executing the information retrieval method.

[0200] It should be noted that the memories 106 in different computing devices 100 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the information retrieval device. That is, the instructions stored in the memories 106 of different computing devices 100 can implement the functions of one or more units among the acquisition unit 510, parsing unit 520, vector determination unit 530, set determination unit 540, and retrieval unit 550. The instructions or code stored in the memories 106 can be read and executed by the processor 104 to achieve the functions described above. Figure 2 , Figure 3 or Figure 4 The information retrieval method is shown in any of the implementations of the embodiments illustrated.

[0201] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 8 One possible implementation is shown. For example... Figure 8 As shown, the two computing devices 100A and 100B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this possible implementation, the memory 106 in computing device 100A stores instructions for executing the functions of the acquisition unit 510, the parsing unit 520, the vector determination unit 530, and the set determination unit 540. Simultaneously, the memory 106 in computing device 100B stores instructions for executing the function of the retrieval unit 550. The instructions or code stored in the memory 106 of computing device 100A can be read and executed by the processor 104 in computing device 100A to achieve the aforementioned... Figure 2 , Figure 3 or Figure 4 The functions of the acquisition unit 510, parsing unit 520, vector determination unit 530, and set determination unit 540 shown in any implementation of the illustrated embodiments are as follows. Instructions or code stored in the memory 106 of the computing device 100B can be read and executed by the processor 104 of the computing device 100B to achieve the functions described above. Figure 2 , Figure 3 or Figure 4 The function of the retrieval unit 550 shown in any of the embodiments illustrated.

[0202] Figure 8 The connection method between the computing device clusters shown can be that, considering that the information retrieval process in the information retrieval method provided in this application may need to interact with the vector knowledge base, the function implemented by the retrieval unit 550 is to be executed by the computing device 100A.

[0203] It should be understood that Figure 8 The functions of the computing device 100A shown can also be performed by multiple computing devices 100. Similarly, the functions of the computing device 100B can also be performed by multiple computing devices 100.

[0204] This application provides another computing device cluster. The interconnection relationships between the computing devices in this computing device cluster can be similarly referenced. Figure 7 and Figure 8 The connection method of the computing device cluster. The difference is that the memory 106 of one or more computing devices 100 in the computing device cluster can store the same instructions for executing information retrieval methods.

[0205] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the information retrieval method. In other words, a combination of one or more computing devices 100 can jointly execute the instructions for executing the information retrieval method.

[0206] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform an information retrieval method.

[0207] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform an information retrieval method.

[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. An information retrieval method, characterized in that, The method includes: Obtain information about the target problem; The target question information is semantically parsed using the first major language model, LLM, to determine the search keywords corresponding to the target question information; Determine the keyword vector based on the search keywords; Based on the search keywords, knowledge is located to determine the target vector knowledge set that matches the search keywords. The search results corresponding to the target question information have a probability of belonging to the target vector knowledge set. Based on the keyword vector, a search is performed from the target vector knowledge set to obtain the search results corresponding to the target question information.

2. The method according to claim 1, characterized in that, The step of determining the target vector knowledge set that matches the search keywords by performing knowledge localization based on the search keywords includes: Obtain multiple knowledge positioning keywords, each of which corresponds to a vector knowledge set; The search keywords and the plurality of knowledge positioning keywords are matched, and a target vector knowledge set is determined from the plurality of vector knowledge sets based on the matching results. The knowledge positioning keywords corresponding to the target vector knowledge set are matched with the search keywords.

3. The method according to claim 1 or 2, characterized in that, The acquisition of target problem information includes: Obtain the original question information input by the user; The original problem information is rewritten using a second LLM to obtain rewritten problem information. The target problem information is determined based on the rewritten problem information.

4. The method according to claim 3, characterized in that, Determining the target problem information based on the rewritten problem information includes: The rewritten question information is subjected to quality verification in order to predict whether the effect of information retrieval using the rewritten question information is better than the effect of information retrieval using the original question information; If the rewritten problem information passes the quality check, the rewritten problem information will be identified as the target problem information. If the rewritten problem information fails the quality check, the original problem information is identified as the target problem information.

5. The method according to any one of claims 1 to 4, characterized in that, The step of determining the keyword vector based on the search keywords includes: An expanded prompt is generated based on the search keywords and sent to a third LLM. The expanded prompt includes the search keywords and is used to instruct the third LLM to expand the search with synonyms based on the search keywords. Receive synonyms corresponding to the search keywords returned by the third LLM; The search keywords and synonyms are vectorized to obtain the keyword vector.

6. The method according to any one of claims 1 to 5, characterized in that, The step of retrieving information from the target vector knowledge set based on the keyword vector includes: Based on the keyword vector, vector matching is performed from the target vector knowledge set to obtain a first search result, wherein the keyword corresponding to the keyword vector exists in the first search result; The keyword vectors are segmented to determine multiple keyword segments and the segmentation vectors corresponding to each keyword segment; Based on the word segmentation vector, vector matching is performed from the target vector knowledge set to obtain a second retrieval result, in which the keyword word segmentation exists; The search results corresponding to the target question information are obtained based on the first search result and the second search result.

7. The method according to any one of claims 1 to 6, characterized in that, The step of retrieving information from the target vector knowledge set based on the keyword vector includes: A semantic vector is determined based on the keyword vector and the question information vector, and vector matching is performed from the target vector knowledge set based on the semantic vector. The question information vector is determined based on the target question information.

8. The method according to claim 7, characterized in that, The keyword vector, the question information vector, and the semantic vector each include n dimensions, where n is a positive integer greater than 1. Determining the semantic vector based on the keyword vector and the question information vector includes: Calculate the average value of the keyword vector and the question information vector in each of the n dimensions to obtain the value of the semantic vector in each of the n dimensions.

9. An information retrieval device, characterized in that, The device includes: The acquisition unit is used to acquire information about the target problem. The parsing unit is used to perform semantic parsing on the target question information using the first major language model (LLM) to determine the search keywords corresponding to the target question information. A vector determination unit is used to determine a keyword vector based on the search keywords; The set determination unit is used to perform knowledge positioning based on the search keywords, determine the target vector knowledge set that matches the search keywords, and the search results corresponding to the target question information have a probability of belonging to the target vector knowledge set. The retrieval unit is used to retrieve information from the target vector knowledge set based on the keyword vector to obtain the retrieval results corresponding to the target question information.

10. The apparatus according to claim 9, characterized in that, The set determination unit is specifically used to acquire multiple knowledge positioning keywords, each of which corresponds to a vector knowledge set; match the search keyword with the multiple knowledge positioning keywords; and determine a target vector knowledge set from the multiple vector knowledge sets based on the matching results, wherein the knowledge positioning keyword corresponding to the target vector knowledge set matches the search keyword.

11. The apparatus according to claim 8 or 9, characterized in that, The acquisition unit is specifically used to acquire the original question information input by the user; The parsing unit is further configured to rewrite the original problem information using a second LLM to obtain rewritten problem information; and to determine the target problem information based on the rewritten problem information.

12. The apparatus according to claim 11, characterized in that, The parsing unit is specifically used to perform quality verification on the rewritten question information in order to predict whether the effect of information retrieval using the rewritten question information is better than the effect of information retrieval using the original question information. If the rewritten problem information passes the quality check, the rewritten problem information will be identified as the target problem information. If the rewritten problem information fails the quality check, the original problem information is identified as the target problem information.

13. The apparatus according to any one of claims 8 to 12, characterized in that, The vector determination unit is specifically used to generate an expanded prompt based on the search keywords and send it to the third LLM. The expanded prompt includes the search keywords and is used to instruct the third LLM to expand the search keywords with synonyms. The unit also receives the synonyms corresponding to the search keywords returned by the third LLM and vectorizes the search keywords and the synonyms to obtain the keyword vector.

14. The apparatus according to any one of claims 8 to 13, characterized in that, The retrieval unit is specifically configured to perform vector matching from the target vector knowledge set based on the keyword vector to obtain a first retrieval result, wherein the first retrieval result contains the keyword corresponding to the keyword vector; perform word segmentation on the keyword vector to determine multiple keyword word segments and word segmentation vectors corresponding to each keyword word segmentation; perform vector matching from the target vector knowledge set based on the word segmentation vectors to obtain a second retrieval result, wherein the second retrieval result contains the keyword word segmentation; and obtain the retrieval result corresponding to the target question information based on the first retrieval result and the second retrieval result.

15. The apparatus according to any one of claims 8 to 14, characterized in that, The retrieval unit is specifically used to determine a semantic vector based on the keyword vector and the question information vector, and to perform vector matching from the target vector knowledge set based on the semantic vector, wherein the question information vector is determined based on the target question information.

16. The apparatus according to claim 15, characterized in that, The keyword vector, the question information vector, and the semantic vector each include n dimensions, where n is a positive integer greater than 1. The retrieval unit is specifically used to calculate the average value of the keyword vector and the question information vector in each of the n dimensions, so as to obtain the value of the semantic vector in each of the n dimensions.

17. A computing device, characterized in that, The computing device includes a processor and memory; The processor is configured to execute instructions stored in the memory to cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 8.

18. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, each computing device including a processor and memory: The memory is used to store instructions; The processor is configured to, according to the instructions, cause the computing device cluster to perform the operational steps of the method according to any one of claims 1 to 8.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computing device, cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 8.

20. A computer program product comprising instructions that, when run on a computing device, cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 8.