Knowledge retrieval method and device
By combining the problem text with a combination of multiple search methods, the search result set after the processing is obtained and deduplicated, and input it into the language model for training, the problem of easily missing key knowledge in RAG technology is solved, and a more accurate and efficient knowledge retrieval effect is achieved.
Patent Information
- Application Number
- CN202510231699.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
AI Technical Summary
Existing RAG technology is prone to missing key knowledge in knowledge retrieval, resulting in unacceptable results for commercial-grade systems.
By obtaining the problem text for preprocessing, and using a variety of search methods, including single-word disassembly and continuous matching of inverted indexes, multiple search result sets are obtained and deduplicated, and input them into the language model for training to generate knowledge answer text.
Through various search methods and deduplication processing, the accuracy and search rate of knowledge retrieval are significantly improved, and the problem of missing key knowledge in RAG technology is overcome.
Smart Images

Figure CN119719117A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information retrieval and generation, and in particular to a knowledge retrieval method and device. Background Art
[0002] With the rapid development of AI-related technologies, large language models have demonstrated excellent results in many fields with their excellent natural language understanding and generation capabilities. However, the knowledge reserves of large models are limited by their training data and time points, making them difficult to update in real time. These problems are particularly prominent in business systems that need to access dynamic data or update frequently, and have become a bottleneck.
[0003] In order to solve the above problems, the Retrieval-Augmented-Generation (RAG) technology was born. RAG combines the external retrieval module with the generation module, so that the large model can dynamically introduce external knowledge when generating content, thereby significantly improving the knowledge coverage and the accuracy of the generated results.
[0004] However, although RAG technology has shown great potential, it also faces many challenges in actual use. For example, the more common retrieval solutions based on vectors, search engines, databases, and knowledge graphs will always miss some knowledge in the retrieval, and some of this knowledge is very critical. For a commercial-grade system, missing key knowledge is unacceptable.
[0005] In related technologies, the effect of RAG knowledge retrieval needs to be further improved. Summary of the invention
[0006] The main purpose of the present invention is to provide a knowledge retrieval method and device to solve the deficiencies existing in the related technology.
[0007] In order to achieve the above-mentioned purpose, according to a first aspect of the present invention, a knowledge retrieval method is provided, comprising: obtaining a question text and preprocessing the question text; based on the result of the preprocessing of the question text, respectively using at least one retrieval method to perform retrieval to obtain a plurality of retrieval result sets, wherein the retrieval using at least one retrieval method comprises: decomposing the question text into single words; based on the decomposed single words, performing continuous matching from a preset single word dictionary based on an inverted index to obtain a result set; deduplicating the multiple retrieval result sets, and inputting the deduplicated results and the question text into a large language model for training, so that the large language model can output a knowledge answer text for a new question sent by a terminal after the training is completed.
[0008] Optionally, based on the disassembled single words, continuous matching from a preset single word dictionary includes: matching according to a stride matching rule during continuous matching, wherein the stride matching rule indicates that after matching n words continuously, continuous matching is continued across m single words. Optionally, based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval, and multiple retrieval result sets are obtained, including: based on the question text vector obtained after vectorization processing, matching a vector for the question text vector from a preset vector library to obtain a first result set, wherein the document sample is preprocessed and stored in a search engine, and is vectorized and stored in the preset vector library.
[0009] Optionally, based on the result of the question text preprocessing, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: based on the question text segmentation obtained after the segmentation processing, relevant text is retrieved for the question text segmentation from the search engine to obtain a second result set.
[0010] Optionally, based on the result of the question text preprocessing, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: organizing SQL statements based on the question text represented in a preset manner, and searching from a preset relational database based on the SQL statements to obtain a third result set.
[0011] Optionally, based on the result of preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: after extracting entity relationships from the question text, a fourth result set is obtained by retrieving from a preset graph database based on a knowledge graph retrieval method.
[0012] According to a second aspect of the present invention, there is provided a knowledge retrieval device, comprising: a preprocessing unit, for acquiring a question text sent by a terminal and preprocessing the question text; a retrieval unit, for performing retrieval using at least one retrieval method based on the result of the preprocessing of the question text to obtain a plurality of retrieval result sets, wherein the retrieval using at least one retrieval method comprises: decomposing the question text into single words; performing continuous matching based on the decomposed single words from a preset single word dictionary based on an inverted index to obtain a result set; and a generation unit, for deduplicating the plurality of retrieval result sets, and inputting the deduplicated results and the question text into a large language model for training, so that the large language model can output a knowledge answer text for a new question sent by the terminal after the training is completed.
[0013] Optionally, performing continuous matching from a preset word dictionary based on the disassembled words includes: during continuous matching, matching is performed according to a stride matching rule, wherein the stride matching rule indicates that after continuously matching n words, continuous matching is continued across m words.
[0014] According to a third aspect of the present invention, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause the computer to execute any one of the methods described in the first aspect.
[0015] According to a fourth aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one implementation of the first aspect.
[0016] The present embodiment of the knowledge retrieval method and device, wherein the method includes obtaining a question text and preprocessing the question text; based on the result of the preprocessing of the question text, using at least one retrieval method to perform retrieval respectively to obtain multiple retrieval result sets, wherein the retrieval using at least one retrieval method includes: decomposing the question text into single words; based on the decomposed single words, performing continuous matching from a preset single word dictionary based on an inverted index to obtain a result set; deduplicating the multiple retrieval result sets, and inputting the deduplicated results and the question text into a large language model for training, so that the large language model can output a knowledge answer text for new questions sent by the terminal after the training is completed. After deduplicating the retrieval result set obtained by multiple retrieval methods, a more accurate result can be obtained, wherein the introduction of single word stride retrieval can greatly improve the retrieval effect and overcome the deficiencies existing in the relevant technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of a knowledge retrieval method according to an embodiment of the present invention; Figure 2 This is a first application example diagram of the knowledge retrieval method according to an embodiment of the present invention; Figure 3 is a second application example diagram of the knowledge retrieval method according to an embodiment of the present invention; Figure 4 is a third application schematic diagram of the knowledge retrieval method according to an embodiment of the present invention; Figure 5is a fourth application schematic diagram of the knowledge retrieval method according to an embodiment of the present invention; Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0020] It should be noted that the terms "first", "second", etc. in the drawings of the specification of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] According to an embodiment of the present invention, a knowledge retrieval method is provided, such as Figure 1 As shown, it includes the following steps 101 to 103: Step 101: Obtain a question text sent by a terminal, and pre-process the question text.
[0023] In this step, a variety of question texts can be obtained and each question text can be preprocessed. The preprocessing includes but is not limited to question word decomposition, question vectorization representation, question word segmentation, organization of SQL statements, entity relationship extraction, etc.
[0024] Step 102: Based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, wherein the retrieval using at least one retrieval method includes: decomposing the question text into single words; based on the decomposed single words, continuous matching is performed from a preset single word dictionary based on an inverted index to obtain a result set.
[0025] In this step, the results obtained from different searches are deduplicated and integrated, and then sent to the language model together with the prompt project and questions to obtain the problems existing in common RAG retrieval schemes with a relatively low degree of hallucination.
[0026] Furthermore, the common RAG search scheme has some defects. For example, user question 1: "How is Taimei International?" For Chinese search engines, if there is "Taimei International Co., Ltd." in the document, the search engine will generally segment the words into: "Tai", "US", "International", "Limited", "Company". The user's input will be segmented into: Tai, Mei, International, How is it, which obviously cannot hit the target paragraph. Of course, adding vocabulary to the search engine seems to be an option, but this situation is endless and cannot solve the fundamental problem.
[0027] Therefore, in order to solve the above retrieval problems, the single word matching technology can solve the above problems. If you want to ensure that all characters, even punctuation marks, can be fully matched, you must use the single word inverted index technology to dictionary each symbol and create an index. When matching, directly take each word or symbol for continuous matching.
[0028] Further, when building a single-word dictionary, refer to Figure 2 In the example, all article paragraphs are marked.
[0029] As an optional implementation method of this embodiment, based on the disassembled single words, continuous matching from a preset single word dictionary includes: during continuous matching, matching is performed according to a stride matching rule, wherein the stride matching rule indicates that after continuously matching n words, continuous matching is continued across m single words.
[0030] In this optional implementation, on the basis of single-word continuous retrieval, there are also some problems that cannot be accurately hit. For example, user question 2: "Mr. Zhang likes Xiao Zhang?" Assume that the paragraph in the database is: "Mr. Zhang likes Xiao Zhang next door very much." In actual retrieval, whether it is the word vector model, search engine, or database solution, it cannot be hit very well. The reason why the word vector does not hit is that this question and the corresponding document paragraph are relatively short, and the three not very important words "very" in the paragraph have occupied a large proportion, so when using vector similarity matching, it is highly likely that a good result will not be obtained. Because the characters themselves are quite different, search engines and relational databases cannot match them directly.
[0031] Based on this, single-character striding matching is adopted. The core idea of single-character striding is that on the basis of the previous single-character matching, it is allowed to perform matching across K steps between characters. Assuming here it is to stride across 2 steps, referring to Figure 3 , striding across 2 steps matches "Zhang San is great" and "Zhang San is really great" by skipping 2 characters. Specifically, the striding matching rule stipulates that when n characters are hit in the front and the next character cannot be matched, striding matching is performed. First, it will automatically try to stride 1 step. If it still doesn't match after striding 1 step, then it will try to stride 2 steps, and stop striding matching when the set maximum number of striding X steps is reached.
[0032] The maximum stride X is configured by parameters, and it is preferably configured to 3, which is more ideal. In this optional implementation, m is less than or equal to X.
[0033] For most paragraphs and sentences, single-character striding can achieve a very good effect. With this matching method, skipping 1 to 3 steps can often guarantee a very high accuracy rate and recall rate. This is very effective for the knowledge Q&A system based on large language models and RAG technology.
[0034] As an optional implementation of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is respectively used for retrieval, and multiple retrieval result sets are obtained, including: based on the question text vector obtained after vectorization processing, matching a vector for the question text vector from a preset vector library to obtain a first result set, where after preprocessing the document sample, it is stored in a search engine, and after vectorization representation, it is stored in the preset vector library.
[0035] As an optional implementation of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is respectively used for retrieval, and multiple retrieval result sets are obtained, including: based on the question text tokens obtained after tokenization processing, retrieving relevant texts for the question text tokens from the search engine to obtain a second result set. As an optional implementation of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is respectively used for retrieval, and multiple retrieval result sets are obtained, including: organizing SQL statements based on the question text represented in a preset manner, and retrieving from a preset relational database based on the SQL statements to obtain a third result set.
[0036] As an optional implementation of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is respectively used for retrieval, and multiple retrieval result sets are obtained, including: after extracting entity relationships from the question text, retrieving from a preset graph database based on the knowledge graph retrieval method to obtain a fourth result set.
[0037] In this optional implementation, a set of high-precision and high-recall text retrieval solutions is comprehensively implemented based on RAG technology, word vector semantic retrieval technology, single-word stride indexing technology, search engine technology, relational database technology, and graph database technology.
[0038] refer to Figure 4 , process different documents in advance, and then build different libraries. Divide all documents into paragraphs and store them in the search engine. At the same time, store their vectorized representations in the vector database, waiting for retrieval. Build a single-word stride dictionary based on the above method. Extract entity relations and establish a knowledge graph to build a graph database. Build a relational database based on paragraph storage relational data. Also split the document to obtain document paragraphs, and generate N corresponding questions based on the paragraphs. Multiple document paragraphs can build a summary layer.
[0039] refer to Figure 5 , illustrating how different result sets are obtained based on different search methods, how different result sets are integrated, and how a large model is used to answer new questions input by users.
[0040] The method of this embodiment divides all documents to be retrieved into paragraphs, stores them in the search engine, and stores their vectorized representations in the vector database, waiting for the next retrieval. The question Q entered by the user is vectorized and represented as W. Result set A1 is obtained by matching W with the vectorized paragraphs in the knowledge base by cosine similarity; full-text search is performed on the search engine by question Q according to the document paragraphs to obtain result set A2; SQL query is performed on the relational database to obtain result set A3 (this step is usually slow when retrieving massive documents, so it is partially applied); a knowledge graph is constructed by extracting entities and relationships from documents, and then the entity association relationship in the question is searched to obtain result set A4. Using single-word step retrieval technology, retrieval result A5 is obtained.
[0041] After deduplication and integration of the result sets of A1 to A5, they are sent to the language model together with the prompt project and the question to obtain knowledge answers with a relatively low degree of hallucination. This can greatly improve the effect of RAG knowledge retrieval, thus providing help for the knowledge question-answering system based on RAG.
[0042] This embodiment greatly improves the effect of RAG knowledge retrieval, thereby providing assistance to the RAG-based knowledge question-answering system.
[0043] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] According to an embodiment of the present invention, a knowledge retrieval device is also provided, including a preprocessing unit, which is used to obtain a question text sent by a terminal and preprocess the question text; a retrieval unit, which uses at least one retrieval method to perform retrieval based on the result of the preprocessing of the question text to obtain multiple retrieval result sets, wherein the retrieval using at least one retrieval method includes: decomposing the question text into single words; based on the decomposed single words, continuously matching from a preset single word dictionary based on an inverted index to obtain a result set; a generation unit, which is used to deduplicate the multiple retrieval result sets, and input the deduplication results and the question text into a large language model for training, so that the large language model can output a knowledge answer text for new questions sent by the terminal after the training is completed.
[0045] As an optional implementation method of this embodiment, based on the disassembled single words, continuous matching from a preset single word dictionary includes: during continuous matching, matching is performed according to a stride matching rule, wherein the stride matching rule indicates that after continuously matching n words, continuous matching is continued across m single words.
[0046] As an optional implementation method of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: based on the question text segmentation obtained after the segmentation processing, relevant text is retrieved for the question text segmentation from the search engine to obtain a second result set.
[0047] As an optional implementation method of this embodiment, based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: organizing SQL statements based on the question text represented in a preset manner, and searching from a preset relational database based on the SQL statements to obtain a third result set.
[0048] Based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, including: after extracting entity relationships from the question text, a fourth result set is obtained by searching from a preset graph database based on a knowledge graph retrieval method.
[0049] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any of the above embodiments when executing.
[0050] According to an embodiment of the present invention, the present invention further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.
[0051] According to an embodiment of the present invention, the present invention further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.
[0052] Figure 6 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
[0053] like Figure 6 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0054] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0055] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed.
[0056] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0057] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0058] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Claims
1. A knowledge retrieval method, characterized in that: include: Obtaining question text and preprocessing the question text; Based on the result of the preprocessing of the question text, at least one retrieval method is used to perform retrieval to obtain multiple retrieval result sets, wherein the retrieval using at least one retrieval method includes: decomposing the question text into single words; based on the decomposed single words, continuous matching is performed from a preset single word dictionary based on an inverted index to obtain a result set; Multiple search result sets are deduplicated, and based on the deduplication results and the question text, they are input into a large language model for training, so that the large language model can output knowledge answer texts for new questions sent by the terminal after the training is completed.
2. The knowledge retrieval method according to claim 1, characterized in that: Based on the decomposed words, continuous matching from the preset word dictionary includes: During continuous matching, matching is performed according to a stride matching rule, wherein the stride matching rule indicates that after continuously matching n words, continuous matching is continued across m single words.
3. The knowledge retrieval method according to claim 1, characterized in that: Based on the result of the preprocessing of the question text, at least one search method is used to perform search, and multiple search result sets are obtained, including: Based on the question text vector obtained after vectorization processing, a vector is matched for the question text vector from a preset vector library to obtain a first result set, wherein the document sample is preprocessed and stored in the search engine, and is vectorized and stored in the preset vector library.
4. The knowledge retrieval method according to claim 3, characterized in that: Based on the result of the question text preprocessing, at least one search method is used to perform retrieval to obtain multiple search result sets including: based on the question text segmentation obtained after the segmentation processing, relevant text is retrieved for the question text segmentation from the search engine to obtain a second result set.
5. The knowledge retrieval method according to claim 1, characterized in that: Based on the result of the preprocessing of the question text, at least one search method is used to perform search, and multiple search result sets are obtained, including: An SQL statement is organized based on the question text expressed in a preset manner, and a search is performed from a preset relational database based on the SQL statement to obtain a third result set.
6. The knowledge retrieval method according to claim 1, characterized in that: Based on the result of the preprocessing of the question text, at least one search method is used to perform search, and multiple search result sets are obtained, including: After extracting entity relationships from the question text, a fourth result set is retrieved from a preset graph database based on a knowledge graph retrieval method.
7. A knowledge retrieval device, characterized in that: include: A preprocessing unit, used for obtaining the question text sent by the terminal and preprocessing the question text; A retrieval unit, based on the result of the preprocessing of the question text, respectively uses at least one retrieval method to perform retrieval to obtain a plurality of retrieval result sets, wherein the retrieval using at least one retrieval method includes: decomposing the question text into single words; based on the decomposed single words, performing continuous matching from a preset single word dictionary based on an inverted index method to obtain a result set; The generation unit is used to deduplicate multiple search result sets, and input the deduplication results and the question text into the language model for training, so that the language model can output knowledge answer text for new questions sent by the terminal after training.
8. The knowledge retrieval device according to claim 7, characterized in that: Based on the disassembled single words, performing continuous matching from a preset single word dictionary includes: during continuous matching, matching is performed according to a stride matching rule, wherein the stride matching rule indicates that after continuously matching n words, continuous matching is continued across m single words.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 6.
10. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1-6.
Citation Information
Patent Citations
Enterprise integrated information processing method fused with multiple communication manners
CN106130874A
Intelligence intelligent question and answer method based on knowledge graph
CN115422323A
Hot news intention recognition method, device and equipment and readable storage medium
CN115516447A
RAG knowledge question-answering method and device based on fusion vector and keyword retrieval
CN117951274A
Retrieval enhancement generation system and method based on knowledge graph
CN117973540A