A method and system for dynamically defining the retrieval scope based on hierarchical semantic indexing

By constructing a knowledge card vector library using a hierarchical semantic indexing method, the problems of uncontrolled retrieval scope and context pollution in large enterprise knowledge bases are solved, achieving efficient and accurate retrieval and answer generation.

CN121350236BActive Publication Date: 2026-04-03江西博微新技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as uncontrolled search scope, contextual pollution, lack of macro-structure view of knowledge, and inability to achieve intent-driven search in large-scale, heterogeneous, and multi-domain enterprise knowledge base retrieval.

Method used

A hierarchical semantic indexing method is adopted to construct knowledge cards by acquiring domain knowledge, including semantic description interfaces and physical location pointers. A knowledge card vector library is established to perform hybrid retrieval and precise retrieval, thereby realizing high-level semantic domain positioning of user query intent and precise retrieval scope delineation.

Benefits of technology

It effectively eliminates cross-domain contextual pollution, improves search relevance and accuracy, enhances search efficiency, ensures answer quality, and simplifies knowledge maintenance and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121350236B_ABST
    Figure CN121350236B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for dynamically defining the retrieval scope based on hierarchical semantic indexing. The method includes acquiring domain knowledge; determining semantic description interfaces and physical location pointers based on the domain knowledge; constructing knowledge cards based on the semantic description interfaces and physical location pointers and storing the knowledge cards in a knowledge card vector library; acquiring the original query issued by the user; searching and filtering in the knowledge card vector library based on the original query to obtain the target knowledge card; extracting the corresponding physical location pointer from the target knowledge card; and performing precise retrieval based on the corresponding physical location pointer to output the target answer. This invention greatly improves the relevance, accuracy, and efficiency of retrieval, thereby ensuring the quality of the final generated answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of retrieval enhancement generation, specifically relating to a method and system for dynamically defining the retrieval scope based on hierarchical semantic indexing. Background Technology

[0002] Existing retrieval augmentation (RAG) systems generally employ a "single-layer flattened" global retrieval model when dealing with large, heterogeneous, and multi-domain enterprise knowledge bases. This model works by vectorizing user queries and then performing a global similarity search on a huge vector pool consisting of tens of thousands or even millions of underlying text chunks that cover all domains (such as finance, legal, human resources, and technology).

[0003] However, this existing technical solution has the following fatal and fundamental flaws:

[0004] 1. Uncontrolled search scope leads to severe context pollution: The complexity of enterprise knowledge bases lies in the fact that documents from different fields may share the same keywords, but their business logic and connotations are completely different. For example, when a user searches for "project budget approval process" in the finance field, a global "blind search" is very likely to recall text fragments from "project development process" in the technology field or "program manager recruitment process" in human resources, because they are highly similar in wording. These unrelated but "seemingly related" fragments will severely pollute the context provided to the large language model (LLM), directly causing it to generate incorrect or confusing answers.

[0005] 2. Lack of a macro-level view of knowledge structure hinders effective navigation: A flat retrieval model scatters all knowledge into fragmented pieces, completely losing the macro-level structure and logical connections of knowledge at the business level. For example, the system is like a navigator with only street addresses (text fragments) but no city map (knowledge structure). It cannot understand which "city" (business domain) the user's query should first belong to, and can only conduct a carpet search across the country, which is inefficient and prone to getting lost.

[0006] 3. Inability to achieve "intent-driven" retrieval: Existing technologies passively and mechanically respond to the literal meaning of queries. They cannot proactively perform a high-level "semantic localization" of the user's intent before retrieval, that is, they cannot answer the key meta-question: "In which document(s) should the answer to the question the user wants to ask be found?" Summary of the Invention

[0007] To address the aforementioned technical problems, this invention provides a method and system for dynamically defining the retrieval scope based on hierarchical semantic indexing, which solves the technical problems in the prior art.

[0008] In a first aspect, the present invention provides the following technical solution: a method for dynamically defining the retrieval scope based on hierarchical semantic indexing, comprising:

[0009] Acquire domain knowledge, and determine the semantic description interface and physical location pointer based on the domain knowledge;

[0010] Knowledge cards are constructed based on the semantic description interface and the physical location pointer, and the knowledge cards are stored in the knowledge card vector library;

[0011] Obtain the original query issued by the user, and search and filter the knowledge card vector library based on the original query to obtain the target knowledge card;

[0012] Extract the corresponding physical location pointer from the target knowledge card, perform precise retrieval based on the corresponding physical location pointer, and output the target answer.

[0013] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention establishes a hierarchical knowledge organization and retrieval paradigm that combines macro and micro perspectives. This paradigm can first complete the semantic domain positioning of the user's query intent at a high level before performing low-level, precise text fragment retrieval. This invention defines a novel metadata structure as a high-level semantic index, which can bridge the user's fuzzy business questions with the specific, physical document locations in the knowledge base, realizing the dynamic and precise delineation of the retrieval scope. This invention provides a two-stage retrieval method of "first positioning, then retrieval," fundamentally eliminating cross-domain context pollution, greatly improving the relevance, accuracy, and efficiency of retrieval, and thus ensuring the quality of the final generated answer.

[0014] Preferably, the semantic description interface includes card title, summary, keywords, and answerable question categories.

[0015] Preferably, the physical location pointer includes a knowledge base ID and a list of document IDs.

[0016] Preferably, the step of constructing a knowledge card based on the semantic description interface and the physical location pointer and storing the knowledge card in the knowledge card vector library includes:

[0017] The semantic description interface of the domain knowledge and the physical location pointer are vectorized. The vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library.

[0018] Preferably, the step of retrieving and filtering the target knowledge card based on the original query in the knowledge card vector database specifically includes:

[0019] A hybrid retrieval method combining dense semantics and sparse keywords is used to perform a hybrid retrieval in the knowledge card vector database to output several candidate knowledge cards. The user intent of the original query is identified by a pre-trained large language model, and the candidate knowledge cards are filtered based on the user intent and the pre-trained large language model to obtain the target knowledge card.

[0020] Preferably, the step of extracting the corresponding physical location pointer from the target knowledge card, performing precise retrieval based on the corresponding physical location pointer, and outputting the target answer specifically includes:

[0021] Extract the corresponding physical location pointer from the target knowledge card, extract the corresponding knowledge base ID and document ID list from the corresponding physical pointer, use the corresponding knowledge base ID and document ID list as a mandatory metadata filter to filter in the target database to obtain a pre-selected text fragment subset, perform a similarity search on the pre-selected text fragment subset to obtain the target text fragment, and input the target text fragment into a pre-trained large language model to generate the answer to obtain the target answer.

[0022] Secondly, the present invention provides the following technical solution: a dynamic retrieval range delineation system based on hierarchical semantic indexing, the system comprising:

[0023] The knowledge module is used to acquire domain knowledge and determine the semantic description interface and physical location pointer based on the domain knowledge;

[0024] The card module is used to construct knowledge cards based on the semantic description interface and the physical location pointer, and store the knowledge cards in the knowledge card vector library;

[0025] The retrieval module is used to obtain the original query issued by the user, and to perform retrieval and filtering in the knowledge card vector library based on the original query to obtain the target knowledge card;

[0026] The generation module is used to extract the corresponding physical location pointer from the target knowledge card, perform precise retrieval based on the corresponding physical location pointer, and output the target answer.

[0027] Preferably, the card module is specifically used for:

[0028] The semantic description interface of the domain knowledge and the physical location pointer are vectorized. The vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library.

[0029] Thirdly, the present invention provides the following technical solution: a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the above-described method for dynamically defining the retrieval scope based on hierarchical semantic index.

[0030] Fourthly, the present invention provides the following technical solution: a storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the above-described method for dynamically defining the retrieval range based on hierarchical semantic indexing. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A flowchart of a method for dynamically defining the retrieval scope based on hierarchical semantic indexing provided in Embodiment 1 of the present invention;

[0033] Figure 2 This is a structural block diagram of the dynamic retrieval range delineation system based on hierarchical semantic index provided in Embodiment 2 of the present invention;

[0034] Figure 3 This is a schematic diagram of the hardware structure of a computer provided for another embodiment of the present invention.

[0035] The embodiments of the present invention will be further described below with reference to the accompanying drawings. Detailed Implementation

[0036] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.

[0037] Example 1

[0038] In Embodiment 1 of the present invention, as Figure 1As shown, a method for dynamically defining the retrieval scope based on hierarchical semantic indexing includes:

[0039] S1. Obtain domain knowledge, and determine the semantic description interface and physical location pointer based on the domain knowledge;

[0040] The domain knowledge can be determined according to the actual use scenario. The semantic description interface here is mainly for user queries, used for retrieval and understanding, while the physical location pointer is for user queries, used for retrieval and understanding.

[0041] Specifically, the semantic description interface includes card title, summary, keywords, and answerable question categories;

[0042] Card title: A concise name of the knowledge domain, such as "Travel Expense Management Regulations".

[0043] Abstract: Describe the core content and purpose of this knowledge domain using natural language.

[0044] Keywords: A set of core keywords that are strongly related to this field.

[0045] Answerable question categories: A list of typical questions or aspects that the knowledge card can cover, such as ["Transportation standards", "Accommodation standards", "Subsidy standards", "Reimbursement process"].

[0046] Specifically, the physical location pointer includes a knowledge base ID and a list of document IDs;

[0047] Knowledge Base ID: Points to the top-level knowledge base to which it belongs, such as "Financial System Knowledge Base".

[0048] Document ID list: One or more pointers that precisely point to the specific source document IDs in the underlying knowledge base that are related to the topic of this card, such as ["Official_Travel_Policy_v3.4.pdf", "Travel_Expense_Reimbursement_SOP_v1.2.pdf"].

[0049] S2. Construct a knowledge card based on the semantic description interface and the physical location pointer, and store the knowledge card in the knowledge card vector library;

[0050] Specifically, a knowledge card is a structured metadata object that does not store massive amounts of detailed text. Instead, it serves as a macroscopic abstraction and high-level index of knowledge. Each knowledge card logically represents an independent, bounded business knowledge domain or core document.

[0051] Step S2 includes:

[0052] The semantic description interface of the domain knowledge and the physical location pointer are vectorized. The vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library.

[0053] S3. Obtain the original query issued by the user, and search and filter the knowledge card vector library based on the original query to obtain the target knowledge card;

[0054] Step S3 includes:

[0055] A hybrid retrieval method combining dense semantics and sparse keywords is used to perform a hybrid retrieval in the knowledge card vector database to output several candidate knowledge cards. The user intent of the original query is identified by a pre-trained large language model, and the candidate knowledge cards are filtered according to the user intent and the pre-trained large language model to obtain the target knowledge card.

[0056] Specifically, the knowledge card vector library is a dedicated, small-scale vector library with a high semantic level. Retrieval is performed in this library using a hybrid retrieval method composed of dense semantics and sparse keywords. The purpose of this step is not to find the answer, but to find the best knowledge card that can cover the user's original query, i.e., the candidate knowledge card. After obtaining the candidate knowledge cards, they need to be filtered, i.e., the user intent is identified by the Large Language Model (LLM), and the most matching one or several knowledge cards are selected according to the user intent, thus obtaining the target knowledge card.

[0057] Specifically, the output of step S3 is not a text fragment, but one or more structured knowledge card objects containing "physical location pointers". This step has successfully mapped a vague global problem to one or more specific document sets with clear boundaries.

[0058] S4. Extract the corresponding physical location pointer from the target knowledge card, perform precise retrieval based on the corresponding physical location pointer, and output the target answer.

[0059] Specifically, step S4 is as follows:

[0060] Extract the corresponding physical location pointer from the target knowledge card, extract the corresponding knowledge base ID and document ID list from the corresponding physical pointer, use the corresponding knowledge base ID and document ID list as a mandatory metadata filter to filter in the target database to obtain a pre-selected text fragment subset, perform similarity search in the pre-selected text fragment subset to obtain the target text fragment, input the target text fragment into a pre-trained large language model to generate the answer to obtain the target answer;

[0061] Specifically, the precise retrieval in step S4 is performed in the target database that stores a massive amount of underlying text fragments. After obtaining the retrieval request, the extracted knowledge base ID and document ID list are used as mandatory metadata filters. For example, the request will contain a filter clause like WHERE kb_id = 'Financial System Knowledge Base' AND doc_id IN ['Official_Travel_Policy_v3.4.pdf', ...]. The filtering process yields a pre-selected subset of text fragments, which is a very small subset of text fragments that meet the filtering conditions. Then, the text fragments with the highest similarity are selected as target text fragments by calculating similarity. The highly relevant text fragments recalled after precise retrieval are delivered to LLM for answer generation.

[0062] In summary, this invention achieves an optimization from "global blind search" to "layered guidance," fundamentally solving the problem of context pollution. It constructs an intermediate semantic layer called "knowledge card," decomposing the one-off, uncontrolled global search into two steps: "first locating the domain, then limiting the search." This ensures that the search is conducted within the correct knowledge boundary from the beginning, completely eliminating noise interference from other irrelevant domains, and resulting in a qualitative leap in the relevance of the search and the reliability of the answer.

[0063] This invention endows the RAG system with the ability to utilize the macro-structure of knowledge. The "knowledge card" layer itself is a digital representation of the enterprise's macro-structure of knowledge. By first searching the cards, the system obtains a "navigation map" and can understand the boundaries and connections between different knowledge domains. This elevates its search behavior from mechanical pattern matching to a more macro-guided intelligent information acquisition process that is closer to that of human experts.

[0064] This invention significantly improves retrieval efficiency and system maintainability. By narrowing the search scope to just a few relevant documents, the system's computational overhead is significantly reduced. Simultaneously, knowledge maintenance becomes clearer and more efficient. Knowledge administrators can macroscopically control the retrieval logic of the entire knowledge system by managing and updating a limited number of "knowledge cards," without having to delve into millions of underlying text fragments for tedious operations.

[0065] The first embodiment of this invention provides a method for dynamically defining the retrieval scope based on hierarchical semantic indexing. This invention establishes a hierarchical knowledge organization and retrieval paradigm that combines macro and micro perspectives. This paradigm can first complete the semantic domain positioning of the user's query intent at a high level before performing low-level, precise text fragment retrieval. This invention defines a novel metadata structure as a high-level semantic index, which can bridge the user's fuzzy business questions with the specific, physical document locations in the knowledge base, realizing the dynamic and precise definition of the retrieval scope. This invention provides a two-stage retrieval method of "first positioning, then retrieval", which fundamentally eliminates cross-domain context pollution, greatly improves the relevance, accuracy, and efficiency of retrieval, and thus ensures the quality of the final generated answer.

[0066] Example 2

[0067] like Figure 2 As shown, in Embodiment 2 of the present invention, a dynamic retrieval scope delineation system based on hierarchical semantic indexing is provided, the system comprising:

[0068] Knowledge Module 1 is used to acquire domain knowledge and determine the semantic description interface and physical location pointer based on the domain knowledge;

[0069] Card module 2 is used to construct knowledge cards based on the semantic description interface and the physical location pointer, and store the knowledge cards in the knowledge card vector library;

[0070] The retrieval module 3 is used to obtain the original query issued by the user, and to perform retrieval and filtering in the knowledge card vector library based on the original query to obtain the target knowledge card;

[0071] The generation module 4 is used to extract the corresponding physical location pointer from the target knowledge card, perform accurate retrieval based on the corresponding physical location pointer, and output the target answer.

[0072] Specifically, the card module 2 is used for:

[0073] The semantic description interface of the domain knowledge and the physical location pointer are vectorized. The vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library.

[0074] Specifically, the retrieval module 3 is used for:

[0075] A hybrid retrieval method combining dense semantics and sparse keywords is used to perform a hybrid retrieval in the knowledge card vector database to output several candidate knowledge cards. The user intent of the original query is identified by a pre-trained large language model, and the candidate knowledge cards are filtered based on the user intent and the pre-trained large language model to obtain the target knowledge card.

[0076] Specifically, the generation module 4 is used for:

[0077] Extract the corresponding physical location pointer from the target knowledge card, extract the corresponding knowledge base ID and document ID list from the corresponding physical pointer, use the corresponding knowledge base ID and document ID list as a mandatory metadata filter to filter in the target database to obtain a pre-selected text fragment subset, perform a similarity search on the pre-selected text fragment subset to obtain the target text fragment, and input the target text fragment into a pre-trained large language model to generate the answer to obtain the target answer.

[0078] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored on the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the dynamic delineation method for retrieval scope based on hierarchical semantic index as described above.

[0079] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.

[0080] The memory 102 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include removable or non-removable (or fixed) media. Where appropriate, the memory 102 may be internal or external to a data processing device. In a particular embodiment, the memory 102 is non-volatile memory. In a particular embodiment, the memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0081] The memory 102 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101.

[0082] The processor 101 reads and executes the computer program instructions stored in the memory 102 to implement the above-mentioned method for dynamically defining the retrieval scope based on hierarchical semantic index.

[0083] In some embodiments, the computer may further include a communication interface 103 and a bus 100. For example, Figure 3 As shown, the processor 101, memory 102, and communication interface 103 are connected through bus 100 and complete communication with each other.

[0084] The communication interface 103 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0085] Bus 100 includes hardware, software, or both, that couples components of a computer device together. Bus 100 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.

[0086] The computer can execute the dynamic retrieval scope definition method based on hierarchical semantic index of the present invention based on the obtained hierarchical semantic index-based dynamic retrieval scope definition system, thereby realizing dynamic retrieval scope definition based on hierarchical semantic index.

[0087] In some further embodiments of the present invention, in conjunction with the above-described method for dynamically defining the retrieval scope based on hierarchical semantic index, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described method for dynamically defining the retrieval scope based on hierarchical semantic index.

[0088] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0089] More specific examples of readable media (a non-exhaustive list) include: electrical connections (electronic devices) with one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0090] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0091] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0092] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A method for dynamically defining the retrieval scope based on hierarchical semantic indexing, characterized in that, include: Acquire domain knowledge, and determine the semantic description interface and physical location pointer based on the domain knowledge; Knowledge cards are constructed based on the semantic description interface and the physical location pointer, and the knowledge cards are stored in the knowledge card vector library; Obtain the original query issued by the user, and search and filter the knowledge card vector library based on the original query to obtain the target knowledge card; Extract the corresponding physical location pointer from the target knowledge card, perform precise retrieval based on the corresponding physical location pointer, and output the target answer; The semantic description interface includes card title, summary, keywords, and answerable question categories; The physical location pointer includes a knowledge base ID and a list of document IDs; The steps of constructing knowledge cards based on the semantic description interface and the physical location pointer, and storing the knowledge cards in the knowledge card vector library, include: The semantic description interface of the domain knowledge and the physical location pointer are vectorized, and the vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library. The specific steps for retrieving and filtering the target knowledge card from the knowledge card vector database based on the original query are as follows: A hybrid retrieval method combining dense semantics and sparse keywords is used to perform a hybrid retrieval in the knowledge card vector database to output several candidate knowledge cards. The user intent of the original query is identified by a pre-trained large language model, and the candidate knowledge cards are filtered according to the user intent and the pre-trained large language model to obtain the target knowledge card. The specific steps for extracting the corresponding physical location pointer from the target knowledge card, performing precise retrieval based on the corresponding physical location pointer, and outputting the target answer are as follows: Extract the corresponding physical location pointer from the target knowledge card, extract the corresponding knowledge base ID and document ID list from the corresponding physical pointer, use the corresponding knowledge base ID and document ID list as a mandatory metadata filter to filter in the target database to obtain a pre-selected text fragment subset, perform a similarity search on the pre-selected text fragment subset to obtain the target text fragment, and input the target text fragment into a pre-trained large language model to generate the answer to obtain the target answer.

2. A dynamic retrieval scope delineation system based on hierarchical semantic indexing, wherein the system employs the dynamic retrieval scope delineation method based on hierarchical semantic indexing as described in claim 1, characterized in that, The system includes: The knowledge module is used to acquire domain knowledge and determine the semantic description interface and physical location pointer based on the domain knowledge; The card module is used to construct knowledge cards based on the semantic description interface and the physical location pointer, and store the knowledge cards in the knowledge card vector library; The retrieval module is used to obtain the original query issued by the user, and to perform retrieval and filtering in the knowledge card vector library based on the original query to obtain the target knowledge card; The generation module is used to extract the corresponding physical location pointer from the target knowledge card, perform precise retrieval based on the corresponding physical location pointer, and output the target answer.

3. The dynamic retrieval scope delineation system based on hierarchical semantic indexing according to claim 2, characterized in that, The card module is specifically used for: The semantic description interface of the domain knowledge and the physical location pointer are vectorized. The vectorized physical location pointer is added to the vectorized semantic description interface to obtain a knowledge card. The knowledge card is then stored in a preset knowledge card vector library.

4. A computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic retrieval range determination method based on hierarchical semantic index as described in claim 1.

5. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the dynamic delineation method for the retrieval scope based on hierarchical semantic index as described in claim 1.

Citation Information

Patent Citations

  • Intelligent question answering method, device and equipment based on knowledge card and storage medium

    CN113420119A

  • Structured data retrieval system and method based on semantic matching and hierarchical indexing

    CN120873210A