Search enhancement generation method based on topic reinforcement and related products
Patent Information
- Application Number
- CN202511247573.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-09-02
AI Technical Summary
[0004]该方法存在若干关键局限:首先,通用基座模型在垂直领域中对专业术语和上下文语义的理解能力有限,导致检索召回率与准确率偏低;其次,其依赖开源软件包实现,版本兼容性差,维护成本高,且难以兼容其他RAG优化方法,例如,使用迭代检索或智能体;再次,检索过程主要依赖稠密向量相似度,缺乏对关键词精确匹配、结构化数据查询等多样化检索需求的支持,灵活性不足
[0076]为了解决现有检索增强生成技术在实际应用中仍存在诸多不足的问题,本公开提供的基于主题强化的检索增强生成方法、装置、电子设备、存储介质和计算机程序产品,获取预设的知识词典,其中,知识词典包括多个命名实体主题;响应于接收到用户输入的查询语句和针对所述查询语句的业务深度和语义权重,识别查询语句中的至少一个目标命名实体;根据各目标命名实体和知识词典,确定与查询语句对应的命名实体主题集合,其中,命名实体主题名集合包括至少一个目标命名实体主题且每个目标命名实体主题对应一个目标命名实体;根据所述业务深度和语义权重,确定与命名实体主题集合对应的目标检索算法;基于所述实体命名主题集合和所述目标检索算法执行数据检索操作,获得与查询语句匹配的至少一条语料数据;将查询语句与至少一条语料数据输入预设的应答结果生成模型,生成针对查询语句的应答结果。该公开有效解决了现有RAG技术在垂直领域语义理解能力弱、检索灵活性差、系统耦合度高以及微调成本高等问题。通过构建包含命名实体主题的预设知识词典,提升了对领域术语的识别准确率,降低了通用基座模型导致的召回精度低的问题;通过根据查询语句的业务深度和语义权重动态选择差异化检索算法(如完全检索、精准检索等),实现了面向业务需求的混合检索策略,克服了传统RAG仅依赖向量相似度带来的灵活性不足缺陷;同时,该方法将检索逻辑与模型微调解耦,避免了为提升性能而依赖大量标注数据进行训练的高成本路径;整体架构降低了组件间耦合性,增强了对多类型检索需求的适配能力,显著提升了检索的准确性、灵活性及生成结果的可靠性。
Smart Images

Figure CN121166749B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information retrieval and generation technology, specifically to a topic-enhanced retrieval generation method and related products. Background Technology
[0002] Retrieval-Augmented Generation (RAG), an emerging paradigm that integrates information retrieval and generation technologies, has been widely applied in scenarios such as intelligent question answering and knowledge reasoning in recent years. A typical RAG architecture consists of three main modules: a knowledge base, a retrieval unit, and a generator. The knowledge base is built offline. When a query is received, the retrieval unit first retrieves the most relevant knowledge corpus from the knowledge base. This knowledge corpus and the query are then combined and processed by the generator to produce the output. Compared to traditional retrieval systems, RAG has good scalability, supports independent updates to the knowledge base without retraining the model, and can handle large-scale corpora while generating semantically coherent and context-sensitive output.
[0003] However, current mainstream RAG systems are usually implemented based on general frameworks such as LangChain. Their typical process is as follows: after the document is simply divided into blocks, it is vectorized and stored in the knowledge base; when querying, the most relevant document fragments are retrieved from the knowledge base based on semantic similarity, and the original query and the retrieval results are concatenated and input into the base language model to generate the answer.
[0004] This method has several key limitations: First, the general-purpose base model has limited ability to understand technical terms and contextual semantics in vertical domains, resulting in low retrieval recall and precision. Second, it relies on open-source software packages, leading to poor version compatibility, high maintenance costs, and difficulty in compatibility with other RAG optimization methods, such as iterative retrieval or agents. Third, the retrieval process mainly relies on dense vector similarity, lacking support for diverse retrieval needs such as precise keyword matching and structured data querying, resulting in insufficient flexibility. Although some solutions attempt to improve domain adaptability by fine-tuning the base model, they are often limited by the scarcity of vertical domain labeled data, high costs of data cleaning and labeling, and large training resource consumption, making practical implementation difficult. Summary of the Invention
[0005] Embodiments of this disclosure provide a topic-enhanced retrieval enhancement generation method, apparatus, electronic device, storage medium, and computer program product.
[0006] In a first aspect, this disclosure provides a topic-enhanced retrieval enhancement generation method, which includes:
[0007] Obtain a preset knowledge dictionary, wherein the knowledge dictionary includes multiple named entity topics;
[0008] In response to receiving a query statement input by a user and the business depth and semantic weight for the query statement, at least one target named entity in the query statement is identified;
[0009] Based on each target named entity and the knowledge dictionary, a set of named entity topics corresponding to the query statement is determined, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity;
[0010] Based on the business depth and the semantic weight, determine the target retrieval algorithm corresponding to the named entity topic set;
[0011] Based on the entity naming topic set and the target retrieval algorithm, a data retrieval operation is performed to obtain at least one piece of corpus data that matches the query statement;
[0012] The query statement and at least one piece of the corpus data are input into a preset response generation model to generate a response result for the query statement.
[0013] In some optional implementations, the method further includes, before obtaining a preset knowledge dictionary:
[0014] Obtain a target domain corpus, wherein the target domain corpus includes multiple corpus data related to the target domain;
[0015] Entity recognition is performed on each of the corpus data, and at least one first candidate named entity is extracted from each of the corpus data to generate a first candidate named entity set.
[0016] For each of the first candidate named entities, generate named entity description information for the first candidate named entity;
[0017] Based on the description information of each named entity, each first candidate named entity is divided into topics to obtain at least one named entity topic, wherein each named entity topic includes at least one semantically related first candidate named entity;
[0018] For each named entity topic, a named entity topic summary is generated based on the named entity description information of each of the first candidate named entities in the named entity topic, and each of the first candidate named entities included in the named entity topic is used as a named entity topic alias for the named entity topic.
[0019] The knowledge dictionary is constructed and generated based on each named entity topic, the named entity topic summary information corresponding to each named entity topic, and the named entity topic alias.
[0020] In some optional implementations, generating the named entity description information of the first candidate named entity includes:
[0021] Retrieve the target statement associated with the first candidate named entity in the target domain corpus, and identify the context statements adjacent to the target statement to form a context statement set;
[0022] Based on the first candidate named entity and the set of context statements, generate the named entity description information of the first candidate named entity.
[0023] In some optional implementations, the step of performing entity recognition on each of the corpus data, extracting at least one first candidate named entity from each of the corpus data, and generating a first candidate named entity set includes:
[0024] For each of the corpus data, at least one second candidate named entity is extracted from each of the corpus data using the N-gram candidate named entity extraction method, generating a second candidate named entity set; and at least one third candidate named entity is extracted from each of the corpus data using a preset candidate named entity extraction model, generating a third candidate named entity set.
[0025] Find the intersection of the second candidate named entity set and the third candidate named entity set, extract the common candidate named entities, determine the common candidate named entities as at least one first candidate named entity of each of the corpus data, and generate a first candidate named entity set.
[0026] In some optional implementations, the retrieval algorithm includes at least one of a complete retrieval algorithm, a precise retrieval algorithm, a general retrieval algorithm, and a deep retrieval algorithm. The step of determining the target retrieval algorithm corresponding to the named entity topic set based on the business depth and the semantic weight includes:
[0027] If the business depth is a first depth and the semantic weight is a first weight, the target retrieval algorithm corresponding to the named entity topic set is determined to be a complete retrieval algorithm.
[0028] If the business depth is the second depth and the semantic weight is within the second weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the precise retrieval algorithm.
[0029] If the business depth is the third depth and the semantic weight is within the third weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a general retrieval algorithm.
[0030] If the business depth is the fourth depth and the semantic weight is within the fourth weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a deep retrieval algorithm.
[0031] In some optional implementations, the knowledge dictionary further includes at least one named entity topic alias corresponding to each named entity topic, and the step of determining the set of named entity topics corresponding to the query statement based on each target named entity and the knowledge dictionary includes:
[0032] For each target named entity, determine whether there exists a named entity topic or named entity topic alias that matches the target named entity in the knowledge dictionary;
[0033] If it exists, a first set of named entities is generated based on the matching named entity topic or the named entity topic corresponding to the matching named entity topic alias;
[0034] If it does not exist, then one of the following operations is performed based on the business depth of the target named entity:
[0035] Refuse to process the query statement; or
[0036] Determine the named entity topics that are semantically similar to the target named entity, and generate a second set of named entities based on the semantically similar named entity topics;
[0037] Based on the first named entity set and the second named entity set, determine the named entity topic set corresponding to the query statement.
[0038] Secondly, this disclosure provides a topic-enhanced retrieval enhancement generation apparatus, the apparatus comprising:
[0039] The first acquisition unit is used to acquire a preset knowledge dictionary, wherein the knowledge dictionary includes multiple named entity topics;
[0040] The first determining unit is configured to identify at least one target named entity in the query statement in response to receiving a query statement input by a user and the business depth and semantic weight of the query statement;
[0041] The second determining unit is configured to determine a set of named entity topics corresponding to the query statement based on each of the target named entities and the knowledge dictionary, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity;
[0042] The third determining unit is used to determine the target retrieval algorithm corresponding to the named entity topic set based on the business depth and the semantic weight.
[0043] The second acquisition unit is used to perform a data retrieval operation based on the target retrieval algorithm of the entity naming topic set to obtain at least one piece of corpus data that matches the query statement;
[0044] The first generation unit is used to input the query statement and the at least one piece of the corpus data into a preset response result generation model to generate a response result for the query statement.
[0045] In some alternative embodiments, the device further includes:
[0046] The third acquisition unit is used to acquire a target domain corpus, wherein the target domain corpus includes multiple corpus data related to the target domain;
[0047] The second generation unit is used to perform entity recognition on each of the corpus data, extract at least one first candidate named entity from each of the corpus data, and generate a first candidate named entity set.
[0048] The third generation unit generates named entity description information for each of the first candidate named entities.
[0049] The fourth generation unit is used to perform topic division on each of the first candidate named entities based on the description information of each named entity, to obtain at least one named entity topic, wherein each named entity topic includes at least one semantically related first candidate named entity;
[0050] The fifth generation unit is configured to generate named entity topic summary information for each named entity topic based on the named entity description information of each first candidate named entity in the named entity topic, and use each first candidate named entity included in the named entity topic as a named entity topic alias for the named entity topic.
[0051] The sixth generation unit is used to construct and generate the knowledge dictionary based on each of the named entity topics, the named entity topic summary information corresponding to each of the named entity topics, and the named entity topic aliases.
[0052] In some alternative implementations, the third generation unit may be further used for:
[0053] Retrieve the target statement associated with the first candidate named entity in the target domain corpus, and identify the context statements adjacent to the target statement to form a context statement set;
[0054] Based on the first candidate named entity and the set of context statements, generate the named entity description information of the first candidate named entity.
[0055] In some alternative implementations, the fourth generation unit may be further used for:
[0056] For each of the corpus data, at least one second candidate named entity is extracted from each of the corpus data using the N-gram candidate named entity extraction method, generating a second candidate named entity set; and at least one third candidate named entity is extracted from each of the corpus data using a preset candidate named entity extraction model, generating a third candidate named entity set.
[0057] Find the intersection of the second candidate named entity set and the third candidate named entity set, extract the common candidate named entities, determine the common candidate named entities as at least one first candidate named entity of each of the corpus data, and generate a first candidate named entity set.
[0058] In some optional implementations, the retrieval algorithm includes at least one of a complete retrieval algorithm, a precise retrieval algorithm, a general retrieval algorithm, and a deep retrieval algorithm, and the third determining unit may be further used for:
[0059] If the business depth is a first depth and the semantic weight is a first weight, the target retrieval algorithm corresponding to the named entity topic set is determined to be a complete retrieval algorithm.
[0060] If the business depth is the second depth and the semantic weight is within the second weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the precise retrieval algorithm.
[0061] If the business depth is the third depth and the semantic weight is within the third weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a general retrieval algorithm.
[0062] If the business depth is the fourth depth and the semantic weight is within the fourth weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a deep retrieval algorithm.
[0063] In some optional implementations, the knowledge dictionary further includes at least one named entity topic alias corresponding to each named entity topic, and the second determining unit may be further used to:
[0064] For each target named entity, determine whether there exists a named entity topic or named entity topic alias that matches the target named entity in the knowledge dictionary;
[0065] If it exists, a first set of named entities is generated based on the matching named entity topic or the named entity topic corresponding to the matching named entity topic alias;
[0066] If it does not exist, then one of the following operations is performed based on the business depth of the target named entity:
[0067] Refuse to process the query statement; or
[0068] Determine the named entity topics that are semantically similar to the target named entity, and generate a second set of named entities based on the semantically similar named entity topics;
[0069] Based on the first named entity set and the second named entity set, determine the named entity topic set corresponding to the query statement.
[0070] Thirdly, this disclosure provides an electronic device, including:
[0071] One or more processors;
[0072] Storage device, on which one or more programs are stored,
[0073] When the above-described one or more programs are executed by the above-described one or more processors, the above-described one or more processors implement the method as described in any embodiment of the first aspect of this disclosure.
[0074] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method described in any embodiment of the first aspect of this disclosure.
[0075] Fifthly, this disclosure provides a computer program product including a computer program / instructions that, when executed by a processor, implement the method described in any embodiment of the first aspect of this disclosure.
[0076] To address the shortcomings of existing retrieval enhancement generation technologies in practical applications, this disclosure provides a topic-based retrieval enhancement generation method, apparatus, electronic device, storage medium, and computer program product. The method involves: acquiring a pre-defined knowledge dictionary, which includes multiple named entity topics; identifying at least one target named entity in the query statement in response to a user-inputted query and its business depth and semantic weight; determining a set of named entity topics corresponding to the query statement based on each target named entity and the knowledge dictionary, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity; determining a target retrieval algorithm corresponding to the set of named entity topics based on the business depth and semantic weight; performing a data retrieval operation based on the entity named entity topic set and the target retrieval algorithm to obtain at least one corpus data matching the query statement; and inputting the query statement and at least one corpus data into a pre-defined response result generation model to generate a response result for the query statement. This disclosure effectively solves the problems of existing RAG technologies, such as weak semantic understanding in vertical domains, poor retrieval flexibility, high system coupling, and high fine-tuning costs. By constructing a pre-defined knowledge dictionary containing named entity topics, the accuracy of domain terminology recognition is improved, reducing the low recall precision problem caused by the general base model. By dynamically selecting differentiated retrieval algorithms (such as full retrieval and exact retrieval) based on the business depth and semantic weight of the query statement, a hybrid retrieval strategy oriented towards business needs is realized, overcoming the lack of flexibility caused by the traditional RAG relying solely on vector similarity. At the same time, this method decouples the retrieval logic from model fine-tuning, avoiding the high-cost path of relying on a large amount of labeled data for training in order to improve performance. The overall architecture reduces the coupling between components, enhances the adaptability to multiple types of retrieval needs, and significantly improves the accuracy, flexibility, and reliability of the generated results. Attached Figure Description
[0077] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the scope of this disclosure. In the drawings:
[0078] Figure 1 This is an exemplary system architecture diagram to which one embodiment of this disclosure can be applied;
[0079] Figure 2 This is a flowchart of an embodiment of the topic-enhanced retrieval enhancement generation method according to the present disclosure;
[0080] Figure 3This is a schematic diagram of a structure of an embodiment of the topic-enhanced retrieval enhancement generation apparatus according to the present disclosure;
[0081] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation
[0082] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0083] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0084] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the topic-enhanced retrieval enhancement generation method, apparatus, electronic device, and storage medium of this disclosure can be applied.
[0085] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0086] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as topic-enhanced search and generation applications.
[0087] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with information input devices (e.g., keyboard, mouse, touchscreen, microphone, camera, etc.) and information output devices (e.g., display screen, speaker, etc.), including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed on the terminal devices listed above. They can be implemented as multiple software programs or software modules (e.g., used to obtain a preset knowledge dictionary) or as a single software program or software module. No specific limitations are made here.
[0088] In some cases, the topic-based search enhancement generation method provided in this disclosure can be executed by terminal devices 101, 102, and 103, and correspondingly, the topic-based search enhancement generation apparatus can be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.
[0089] In some cases, the topic-enhanced retrieval enhancement generation method provided in this disclosure can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the step of "obtaining a preset knowledge dictionary" can be executed by terminal devices 101, 102, and 103, and the step of "identifying at least one target named entity in the query statement in response to receiving a query statement input by a user and the business depth and semantic weight of the query statement" can be executed by server 105. This disclosure does not limit this. Accordingly, the topic-enhanced retrieval enhancement generation device can also be respectively set in terminal devices 101, 102, and 103 and server 105.
[0090] In some cases, the topic-based search enhancement generation method provided in this disclosure can be executed by server 105. Correspondingly, the topic-based search enhancement generation device can also be set in server 105. In this case, the system architecture 100 may not include terminal devices 101, 102, and 103.
[0091] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0092] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0093] Continue to refer to Figure 2 , Figure 2 A flow 200 of an embodiment of a topic-enhanced retrieval enhancement generation method according to the present disclosure is shown, the flow 200 including at least the steps 201-206.
[0094] Step 201: Obtain the preset knowledge dictionary.
[0095] In this embodiment, the knowledge dictionary can refer to a knowledge dictionary of the target domain, which may include multiple named entity topics. A named entity topic can refer to an entity category or core concept with clear semantic boundaries in the target domain. Each named entity topic represents a semantic unit and serves as a knowledge anchor for subsequent retrieval and generation.
[0096] Step 202: In response to receiving the query statement input by the user and the business depth and semantic weight of the query statement, identify at least one target named entity in the query statement.
[0097] In this embodiment, the target named entity can refer to a key named entity that is identified from the user's input query statement, has a clear business meaning and contextual importance, and represents the core focus of the user's query.
[0098] Business depth can refer to the level of detail or analysis of a query statement at the business level. Business depth can be predefined. After a user enters a query statement, they can further input or select the business depth for that query statement.
[0099] Semantic weight can refer to the importance of the semantics of a query statement to the query intent at a specific business depth. Semantic weight can also be predefined. After the user enters the query statement, they can further input or select the semantic weight for that query statement.
[0100] Specifically, you can first enter or select the business depth for the query statement, and then select or enter the corresponding semantic weight under that business depth.
[0101] In some optional implementations, the service depth can be divided into a first depth, a second depth, a third depth, and a fourth depth. For example, the service depth value corresponding to the first depth can be 1, the service depth value corresponding to the second depth can be 2, the service depth value corresponding to the third depth can be 3, and the service depth value corresponding to the fourth depth can be 4. The specific service depth value can be set according to actual needs and is not limited here.
[0102] Semantic weights can be divided into a first weight, a second weight range, a third weight range, and a fourth weight range. For example, the first weight can be 0, the second weight can be (0,1], the third weight range can be (0,1], and the fourth weight range can be (0,1).
[0103] Here, after receiving the query statement input by the user and considering the business depth and semantic weight of the query statement, named entity recognition is first performed to identify one or more target named entities with actual business significance in the query statement.
[0104] Step 203: Determine the set of named entity topics corresponding to the query statement based on the named entities of each target and the knowledge dictionary.
[0105] In this embodiment, the set of named entity topic names includes at least one target named entity topic, and each target named entity topic corresponds to one target named entity.
[0106] In this embodiment, an entity hitter can be used to match based on a knowledge dictionary and each target named entity to determine the set of named entity topics corresponding to the query statement.
[0107] In some optional implementations, the knowledge dictionary also includes at least one named entity topic alias corresponding to each named entity topic.
[0108] Here, at least one named entity topic alias can refer to a different expression with the same or similar semantics as the corresponding named entity topic, used to cover synonyms, abbreviations, colloquialisms, spelling variations or domain-specific expressions that users may use in queries.
[0109] Introducing named entity topic aliases can enhance adaptability to diverse user language expressions and resolve matching omissions caused by differences in terminology. By establishing a mapping relationship of "named entity topic - at least one named entity topic alias," even if users use non-standard or colloquial expressions, they can still be accurately normalized to the corresponding named entity topic. This improves the recall rate of named entity recognition and the robustness of semantic understanding, providing reliable support for subsequent accurate retrieval and intelligent generation.
[0110] In some optional implementations, the knowledge dictionary also includes summary information corresponding to each named entity topic.
[0111] Here, summary information can refer to text content that concisely and accurately describes the semantic connotation, core features, typical attributes, or contextual usage of a named entity topic.
[0112] In some alternative implementations, step 203 may include the following A1-A4.
[0113] A1. For each target named entity, determine whether there is a named entity topic or named entity topic alias that matches the target named entity in the knowledge dictionary.
[0114] In this embodiment, for each target named entity, each target named entity can be compared one by one with the named entity topics and named entity topic aliases in the preset knowledge dictionary.
[0115] Specifically, this can be achieved by checking whether the target named entity exactly matches or fuzzily matches (e.g., based on string similarity, edit distance, or semantic vectors) a named entity topic in the knowledge dictionary, or at least one associated named entity topic alias.
[0116] For example, if a user query contains the target named entity "AI", it can be determined whether it matches the named entity topic alias "AI" corresponding to the named entity topic "artificial intelligence" in the knowledge dictionary.
[0117] This step aims to normalize terminology, mapping user expressions to legitimate topics within a standard knowledge system.
[0118] A2, if it exists, then generate the first named entity set based on the matching named entity topic or the named entity topic corresponding to the matching named entity topic alias.
[0119] In this embodiment, when a target named entity successfully matches a named entity topic or its corresponding named entity topic alias in the knowledge dictionary, the named entity topic can be included as a valid matching result in the first named entity set.
[0120] The first named entity set is used to record all directly identifiable topics with clear knowledge support. For example, if "machine learning" matches the topic "machine learning", or "AI" matches the named entity topic "artificial intelligence" and its corresponding named entity topic alias "AI", then the corresponding named entity topics "machine learning" and "artificial intelligence" are both added to the first named entity set.
[0121] If A3 does not exist, then perform one of the following operations based on the business depth of the target named entity:
[0122] Refuse to process the query, or determine a named entity topic that is semantically similar to the target named entity, and generate a second named entity set based on the semantically similar named entity topic.
[0123] In this embodiment, when a target named entity has no direct match in the knowledge dictionary, there are two situations. The first situation is that the query statement belongs to the target domain and its business depth corresponds to the full search or precise search mode, indicating that the user has strict requirements for the question domain and the accuracy of the answer, and needs to respond within a clear knowledge boundary.
[0124] In this case, if the target named entity cannot be matched with any named entity topic or named entity topic alias in the knowledge dictionary, the query is rejected to avoid returning unreliable or misleading information.
[0125] Conversely, when the business depth is general retrieval or deep retrieval, it indicates that the query statement has relatively loose restrictions on the target domain, allowing a certain degree of cross-domain association and semantic expansion.
[0126] At this point, even if the query involves target named entities outside the target domain, semantic similarity can still be calculated based on the summary information of the target named entity and each named entity topic in the knowledge dictionary. The top-K most relevant named entity topics can be recalled through approximate nearest neighbor search as named entity topics that are semantically similar to the target named entity and included in the second named entity set, where K is the number of named entity topics, K is greater than or equal to 1. Alternatively, N named entity topics can be further selected from the top-K most relevant named entity topics and included in the second named entity set, where N is greater than or equal to 1 and less than or equal to K.
[0127] A4. Based on the first and second named entity sets, determine the set of named entity topics corresponding to the query statement.
[0128] In this embodiment, the first named entity set (direct matching) and the second named entity set (semantic extended matching) can be merged to form a complete named entity topic set corresponding to the query statement.
[0129] Step 204: Determine the target retrieval algorithm corresponding to the named entity topic set based on business depth and semantic weight.
[0130] It should be noted that users have different purposes for querying information, different accuracy requirements, and different levels of knowledge in different business scenarios.
[0131] Here, based on business depth and semantic weight, the retrieval strategy corresponding to the query statement can be selected to improve the accuracy and efficiency of retrieval.
[0132] In some alternative implementations, the retrieval algorithm may include at least one of a complete retrieval algorithm, a precise retrieval algorithm, a general retrieval algorithm, and a deep retrieval algorithm.
[0133] Among them, the complete retrieval algorithm is a sparse retrieval method based on keyword matching. It emphasizes achieving high-precision and high-recall fine-grained knowledge positioning within a strictly defined domain. Its core is to use the target named entity topic as keywords and measure the relevance between the document and the query by the keyword hit rate.
[0134] The complete search algorithm uses Jaccard similarity to define the theme relevance score (TR), as shown in the following formula:
[0135]
[0136] Using the above formula, the most relevant S documents can be recalled through named entity topic consistency, where S is greater than or equal to 0. The currently retrieved document can refer to one or more corpus data in a preset target domain corpus.
[0137] Full retrieval algorithms are suitable for scenarios with clear business logic, well-defined information needs, and low fault tolerance. For example, in bidding and tendering applications, it is usually desired that the question-answering system can quickly and accurately identify relevant bidding and tendering information for the corresponding product, such as product qualifications and standard document status, without focusing on information such as the actual operation and deployment methods of the product. Therefore, bidding and tendering data is characterized by fragmented, disjointed, and superficial business information, requiring no complex semantic understanding but demanding accurate and interpretable results.
[0138] The pseudocode for the complete search algorithm can be shown below:
[0139]
[0140] The precise retrieval algorithm is a hybrid retrieval strategy that introduces semantic enhancement on the basis of complete retrieval. It combines sparse retrieval (keywords) and dense retrieval (vectors) to achieve a two-stage retrieval mechanism of first broad filtering and then deep sorting.
[0141] Specifically, the first step is to invoke a full retrieval algorithm, using the target named entity topic as the keyword, to recall all relevant candidate documents (setting s=-1 indicates an unlimited number). These candidate documents have a high relevance to the target named entity topic at the keyword level, which can ensure that no potential relevant information is missed and provide sufficient samples for subsequent fine-grained screening. Then, the semantic similarity between each candidate document and the query statement is calculated.
[0142] Specifically, the semantic similarity between each candidate document and the query statement can be calculated using the following formula.
[0143]
[0144] Here, cos_dis(doc,query) can represent the semantic similarity between a candidate document and the query statement, Embed(doc) can represent the document vector of the candidate document, and Embed(query) can represent the statement vector of the query statement.
[0145] After obtaining the semantic similarity between each candidate document and the query statement, a comprehensive score can be calculated based on the topic consistency score and semantic similarity to obtain the top y documents that best meet the user's needs, where y is greater than or equal to 0.
[0146] Specifically, the overall score can be calculated using the following formula:
[0147] score = w d ·cos_dis(doc,query)+w t TR(doc, query)
[0148] Where "score" is the overall score, and "w" is the total score. d w is the semantic weight parameter. t w represents the topic weight parameter. d and w t The values of both are between 0 and 1, and their sum is 1. d and w t The specific data can be adjusted according to business needs and data characteristics. cos_dis(doc, query) represents the semantic similarity between a candidate document and the query statement, and TR(doc, query) represents the topic consistency score of the candidate document.
[0149] In this way, based on the overall score of the candidate documents, it can be decided whether to include them as at least one piece of corpus data that matches the query statement.
[0150] Specifically, if the number of corpora matching at least one query is less than the user's required corpus data threshold y, then the document and its score are directly added; if the number of corpora matching at least one query is greater than or equal to the user's required corpus data threshold y, then it is checked whether there is a document with a low overall score, and if so, it is replaced with the current document, ensuring that the corpus data matching at least one query always retains the y most relevant documents that have been processed.
[0151] Precise retrieval algorithms can balance keyword accuracy with semantic generalization ability, effectively capturing potential information that is semantically related but does not appear in the keywords, and their ranking is more refined, which can improve the quality of the final generated answer.
[0152] The pseudocode for the exact retrieval algorithm can be shown as follows:
[0153]
[0154] General search is suitable for scenarios where query boundaries are vague and cross-domain association of related documents is allowed. General search expands the search scope through query rewriting and semantic search, while using topic relevance to refine the ranking of results.
[0155] The query rewriting phase utilizes target named entity topics and external dictionaries to enrich the user's original query into a new query containing more semantic information, thereby improving the accuracy and recall of semantic retrieval. Then, semantic retrieval is used to obtain candidate documents most relevant to the rewritten query, and these documents are ranked according to topic relevance. Finally, x documents that best meet the user's needs are returned.
[0156] The pseudocode for a general retrieval algorithm can be shown below:
[0157]
[0158] Deep search addresses complex queries with broad knowledge requirements, ambiguous intent, and the desire to obtain multi-level documents. Its core principle is to leverage target named entity topics and external dictionaries, combined with the HyDE (Hypothetical Document Embeddings) method, to expand the original query statement, generating a semantically richer new query statement. Then, candidate documents are obtained through semantic retrieval, and the results are ranked according to topic relevance to obtain the j documents that best meet the user's needs.
[0159] HyDE is a method for improving information retrieval by aligning the semantic space of queries and hypothesis documents by generating hypothesis documents that can be used to answer user input questions.
[0160] These hypothetical documents are generated by large language models based on their learned knowledge. However, due to the limitations of large language models in capturing semantics within vertical domains, this paper incorporates topic information into the HyDE method to improve the reliability and usability of the generated documents. The HyDE method expands user intent, compensates for users' shortcomings in information understanding and descriptive language, and extends the information retrieval domain, fully leveraging the fusion, understanding, and reasoning capabilities of large language models. This results in better retrieval performance and user experience in practical applications.
[0161] The pseudocode for the depth search algorithm can be shown below:
[0162]
[0163] In some optional implementations, if the business depth is the first depth and the semantic weight is the first weight, the target retrieval algorithm corresponding to the named entity topic set is determined to be the complete retrieval algorithm.
[0164] If the business depth is the second depth and the semantic weight is within the second weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the precise retrieval algorithm.
[0165] If the business depth is the third depth and the semantic weight is within the third weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the general retrieval algorithm.
[0166] If the business depth is the fourth depth and the semantic weight is within the fourth weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the deep retrieval algorithm.
[0167] Step 205: Perform data retrieval operations based on the entity naming topic set and target retrieval algorithm to obtain at least one piece of corpus data that matches the query statement.
[0168] In this embodiment, after determining the target retrieval algorithm, a data retrieval operation can be performed based on the named entity topic set and the corresponding target retrieval algorithm to obtain at least one piece of corpus data that matches the query statement.
[0169] Here, multiple corpus data obtained from the retrieval based on the named entity topic set will be uniformly aggregated to form a complete corpus dataset that matches the query statement.
[0170] Step 206: Input the query statement and at least one piece of corpus data into the preset response generation model to generate a response result for the query statement.
[0171] Thus, based on the acquisition of high-quality corpus data that is highly relevant to the query using the target retrieval algorithm, and by utilizing response result generation models, such as the natural language understanding and generation capabilities of various known large language models, accurate, coherent, professional, and user-intent-close response results can be generated.
[0172] In some optional implementations, before step 203, the user query statement may be pre-searched to enhance the semantics and structure of the user query statement, thereby improving the recall and accuracy of subsequent searches.
[0173] Specifically, pre-retrieval processing can be implemented by integrating commonly used pre-retrieval methods through the pre-processing module. The pre-retrieval method configuration items can be stored in the Chat (question and answer) item under pipeline_config.yaml. Setting the rewrite (rewrite) parameter to True means rewriting and reconstructing the user query statement. Setting the hyde (hypothetical document embedding) parameter to True means enabling virtual question generation. Enabling the task_split (task splitting) item means splitting the user query statement into tasks, etc.
[0174] The pre-retrieval module interface definition can be as follows:
[0175]
[0176]
[0177] In some optional implementations, prior to step 206, post-retrieval processing may be performed on at least one piece of corpus data that matches the query statement. For example, post-processing operations such as sorting, deduplication, and re-scoring may be performed on at least one piece of corpus data that matches the query statement to optimize the context quality of the generation stage.
[0178] The post-retrieval module can support the integration of new post-processing algorithms, such as reordering and relevance filtering, and has good maintainability.
[0179] The interface definition for the post-retrieval module can be as follows:
[0180]
[0181] In some alternative implementations, after generating the response to the query, sensitive information in the response can be obfuscated, for example, sensitive information can be masked.
[0182] Specifically, an external sensitive word file can be imported. After generating the response results for the query, this file can be used to determine which content is sensitive information and then "blurred" it.
[0183] To achieve flexible control over the task processing flow, a pipeline configuration tool is needed to dynamically adjust task routes. For this purpose, a configuration file, `. / config / pipeline_config.yaml`, was specifically designed to uniformly manage the enabling status and parameter settings of each functional module in the entire processing pipeline. This configuration file supports online modification and has a certain degree of hot-update capability: when backend operations or development personnel modify configuration items, and the operation only involves disabling an already enabled module (i.e., "from enabled to disabled"), the changes take effect immediately without restarting the service, thus ensuring service continuity and stability. If the modification involves enabling a previously disabled module (i.e., "from disabled to enabled"), because new processing logic or related components need to be loaded or initialized, the processing pipeline needs to be rebuilt to ensure that the new module is correctly injected and executed.
[0184] This mechanism ensures system flexibility and maintainability while also taking into account operational efficiency and reasonable resource management, and supports dynamic adjustment of the question-and-answer process's behavioral logic without interrupting core services.
[0185] In some alternative implementations, steps 207-212 may be included before step 201.
[0186] Step 207: Obtain the target domain corpus.
[0187] In this embodiment, the target domain corpus includes multiple corpus data related to the target domain.
[0188] The corpus data typically includes plain text documents, PDF documents, doc / docx documents, xlsx / csv documents, and markdown documents, etc., and there are no restrictions here.
[0189] In this embodiment, after acquiring the corpus data related to the target domain, the expected data can also be processed in a structured manner.
[0190] Specifically, for PDF documents, the corresponding text can be extracted directly using the pyMuPDF library, while for image data in PDF documents, the source file and page number are marked.
[0191] For doc / docx documents, since doc is an older document format of Microsoft Word, while docx is the default document format used by Microsoft Word 2007 and above based on the open XML standard, existing libraries such as pypandoc, LangChain, and python-docx all have information loss problems in recognizing the docx format and are incompatible with doc files. Therefore, these error-prone files should be converted into PDF documents before processing.
[0192] For XLSX / CSV documents, the merged cells are first split, and the contents of the original cells are copied to all the corresponding sub-cells. Then, the text contents of each cell are concatenated on a row-by-row basis to form structured corpus data. Column name filters can be set to specify which columns to keep or exclude, thereby filtering out irrelevant or redundant data fields and retaining only valid information relevant to the target domain, improving the accuracy and efficiency of subsequent processing.
[0193] For Markdown files, since Markdown itself already has good formatting information, the text can be extracted directly from the formatting information, and its file and level information can be marked.
[0194] Here, after completing the format conversion and content filtering of each document, text segmentation can be performed. This avoids segmentation after injecting named entity subject information, thus preventing the named entity subject information from being truncated or split, ensuring that the named entity subject context is fully integrated into each text fragment, and giving full play to its role in enhancing the retrieval process.
[0195] Specifically, the chunking strategy can be controlled by the chunk_strategy parameter, supporting multiple chunking methods:
[0196] `fixed`: Employs fixed-length chunks, uniformly segmenting the text according to a preset number of characters or words; `sentence`: Segments based on sentence boundaries, prioritizing sentence breaks at the end (e.g., period, line break), while limiting the maximum length of each chunk to `max_chunk_size` to balance semantic integrity and chunk size balance; `adaptive`: Calls a semantic understanding model to intelligently segment the text, dynamically determining the optimal segmentation point based on paragraph themes, semantic coherence, etc., achieving higher-quality context preservation. Thus, through this flexible chunking mechanism, information integrity and retrieval efficiency can be balanced in different scenarios, improving overall question-answering performance.
[0197] Step 208: Perform entity recognition on each corpus data, extract at least one first candidate named entity from each corpus data, and generate a first candidate named entity set.
[0198] In this embodiment, for each piece of corpus data (such as a description or a document paragraph), natural language processing techniques, such as named entity recognition techniques, are used to identify at least one first candidate named entity contained therein to form a first candidate named entity set.
[0199] In some optional implementations, for each corpus data, at least one second candidate named entity is extracted from each corpus data using the N-gram candidate named entity extraction method to generate a second candidate named entity set, and at least one third candidate named entity is extracted from each corpus data using a preset candidate named entity extraction model to generate a third candidate named entity set; the intersection of the second candidate named entity set and the third candidate named entity set is calculated to extract the common candidate named entities, and the common candidate named entities are determined as at least one first candidate named entity for each corpus data, and a first candidate named entity set is generated.
[0200] In this embodiment, each piece of corpus data can be segmented into fine-grained text based on the N-gram algorithm of characters to extract at least one potential second candidate named entity, forming a set of second candidate named entities.
[0201] This method splits each piece of corpus data into a continuous substring (i.e., gram) of length n using a sliding window of characters. The value of n can be a positive integer from 2 to 10, for example, without any restriction. In this way, character combinations of different lengths can be formed, covering various possible named entity expressions from short words to long terms.
[0202] Specifically, for each value of n, the set of grams G is extracted. n Let the i-th gram be denoted as G. n (i), and calculate its frequency of occurrence in the corpus data of the current target domain, defined as f. n (G n (i)). Finally, all identified grams are used as the second candidate named entity set E. n =(G n ,f n ).
[0203] Simultaneously, pre-defined candidate named entity extraction models (such as Large Language Models, LLM) can be utilized. By designing prompt word templates, the model can be guided to semantically identify at least one third candidate named entity in each piece of corpus data, forming a set of third candidate named entities. The candidate named entity extraction model possesses contextual understanding capabilities, accurately identifying complex expressions, abbreviations, aliases, etc., generating semantically reasonable and structurally complete named entities. The set of third candidate named entities can be represented, for example, as E.entity .
[0204] A prompt template could be as follows:
[0205] Task Description: You are an intelligent assistant tasked with helping human analysts analyze potential entity definitions in text. Following the provided entity definition rules, extract all possible named entities from the input sentence, outputting them line by line. Do not output any information other than the entity names. Entity Definition Rules: 1. Technical terms with specific meaning; 2. The executor of a certain action; 3. The object affected by a certain report / processing / action. Input: {Text (corpus data)}
[0206] Here, the entity candidate set proposed by the N-gram method is more comprehensive, but it contains a large number of duplicates and redundancies, resulting in lower accuracy. The entity candidate set extracted by the LLM method, on the other hand, has higher accuracy in semantic understanding and performs better in handling long contextual dependencies. However, the semantic alignment of different candidate named entity extraction models varies, which can introduce problems of missed selections and misjudgments. These two methods can complement each other to some extent; therefore, a second candidate named entity set E can be synthesized. n and the third candidate named entity set E entity The two extraction results ultimately yield a high-quality set of named entities.
[0207] Specifically, the intersection of the second and third candidate named entity sets can be found to extract the common candidate named entities. These common candidate named entities are then identified as at least one first candidate named entity for each corpus data, and a first candidate named entity set is generated, which can be denoted as E. c .
[0208] In some alternative implementations, the first candidate named entity set can also be obtained in the following ways.
[0209] First, you can select E. n and E entity The intersection represents the set of entities selected by both extraction methods, indicating a higher probability of them being the correct named entities. Therefore, this set is initially designated as the first candidate named entity set, denoted as […].
[0210] Next, the difference set can be selected. This section contains phrases that were hit by the candidate named entity extraction model but not selected by the N-gram method. These phrases may fall into two categories: those containing redundant information such as named entity names and non-named entities. For this first difference set, it can be denoted as... Awaiting further separation processing.
[0211] Select difference set This section contains phrases that were hit by the N-gram method but not selected by the candidate named entity extraction model. These items may fall into three categories: named entities that the candidate named entity extraction model failed to identify from the expected data, redundant information in the named entity name and non-named entity. Similarly, this difference set can be merged with the first difference set, denoted as...
[0212] For the first difference set The content in the text can be further used to determine E based on the candidate named entity extraction model combined with prompt words. c2 Can each item in the set form a named entity? To exclude items that are not named entities, add the remaining items that may be named entities to the first difference set E. c2 .
[0213] Here, the prompt words could be, for example, as shown below:
[0214] Task Description: You are an intelligent assistant tasked with helping human analysts analyze potential entity definitions within text. Entities can be: 1. Technical terms with specific meaning; 2. Performers of certain actions; 3. Objects affected by certain reports / processes / behaviors; 4. Punctuation marks are not negligible and must also be considered as evidence of entity status. For example, a URL does not constitute an entity. I will provide a phrase; please determine if it is a possible entity. If so, output "Yes"; if not, output "No". Do not output anything other than "Yes" or "No". Input {E} c2 The various projected data in the data.
[0215] Next, E can be further improved through the following methods. c2 The accuracy mainly involves separating valid named entities from redundant information.
[0216] Here, the Longest Common Subsequence (LCS) filtering mechanism can be used to identify and extract semantically complete and recurring named entities.
[0217] It should be noted that the subsequences here are not character sequences, but token sequences. In real-world corpora in vertical domains, text often mixes Chinese, English, numbers, and technical symbols. If segmented by character, it would lead to unreasonable truncation across language or symbol boundaries, which would seriously affect the matching results. Therefore, this solution adopts a tokenization strategy for sequence segmentation, that is, each Chinese character is treated as an independent token, and non-Chinese content is treated as a whole as a token or common delimiters (such as spaces, newlines, punctuation, etc.) are skipped according to the predefined skip_token rule.
[0218] The core idea of the longest common subsequence algorithm is that real named entities often appear multiple times in different contexts in the same or similar form, while redundant terms usually exist in isolation. By calculating the longest common subsequence among candidate terms, frequently co-occurring semantic units can be identified. For E c2 Any term in, if it is related to E c1 There exists a longest common subsequence in a certain term, or it is related to E. c2 If other items in the sequence have a longest common subsequence, it indicates that they have a high probability of becoming named entities.
[0219] When the longest common subsequence is the candidate itself, it indicates that the candidate has been hit completely multiple times, demonstrating strong stability and a very high probability of being a valid named entity. Therefore, it should be added to the first candidate named entity set E. c When the longest common subsequence is part of the candidate entity rather than itself, it indicates that the candidate entity may be a combination of entity and modifiers, symbols, etc., and the longest common subsequence is closer to the actual named entity expression. Therefore, the longest common subsequence should be added as a simplified named entity to the first candidate named entity set E. c When a candidate does not have a significantly longest common subsequence with other candidates, there may be two scenarios: either the candidate is a potential new named entity that has not been identified by the candidate named entity extraction model, or the candidate is merely a noise fragment. Such candidates are not eliminated and can be added to the first candidate named entity set E. c The validity of the candidate named entities is further evaluated and its retention is determined through subsequent semantic verification, frequency thresholding, or contextual consistency analysis. This method effectively removes fragmented candidates caused by N-gram segmentation, achieves term normalization, and has a certain tolerance for spelling differences and prefix / suffix interference, significantly improving the first candidate named entity set E. c Its accuracy and robustness provide more accurate and reliable structured input for subsequent topic modeling, retrieval matching, and knowledge construction.
[0220] Additionally, the initial first candidate named entity set can be... Merge into the first candidate named entity set E c .
[0221] The pseudocode for the longest common subsequence algorithm described above can be, for example, as shown below:
[0222]
[0223] The first candidate named entity set E obtained through the above steps c There may still be some redundancy, and it cannot be directly used to construct a knowledge dictionary, for the first candidate named entity set E. cThe following step 209 can also be performed to further perform semantic analysis in conjunction with the global target domain corpus, excluding the first candidate named entity set E. c Domain-independent terms in the text.
[0224] Step 209: For each first candidate named entity, generate the named entity description information of the first candidate named entity.
[0225] In this embodiment, the named entity description information may refer to the semantic attributes and contextual explanations related to the identified first candidate named entity, which are used to more comprehensively characterize the meaning, function and domain characteristics of the first candidate named entity.
[0226] In some optional implementations, target statements associated with the first candidate named entity are retrieved from the target domain corpus, and context statements adjacent to the target statements are identified to form a set of context statements; named entity description information of the first candidate named entity is generated based on the first candidate named entity and the set of context statements.
[0227] Here, the first candidate named entity, the set of context statements, and the corresponding prompt words can be input into the pre-trained named entity description information generation model to output the named entity description information of each first candidate named entity.
[0228] Specifically, a set of tuples containing each first candidate named entity and its corresponding named entity description information can be output. This set of tuples can be denoted, for example, as D0 = (E c (Caption), where E c , indicating E c Each first candidate named entity in the list has a Caption that represents the named entity description information of the first candidate named entity.
[0229] The naming entity description information generation model can be any known large language model, and there are no restrictions here.
[0230] Here, the prompts for the named entity description information generation model can be as follows:
[0231] Task: I will give you a first candidate named entity and a collection of context statements for the first candidate named entity. Please synthesize all the context statement information to generate a dictionary definition for the first candidate named entity.
[0232] Input format: First candidate named entity: {entity}, Context statement set: {context} Output format: {entity name}: {named entity description information}, Notes: 1. Only output the named entity description information of the given first candidate named entity, do not output any other information or symbols, 2. The length of the named entity description information is less than or equal to {max_length} characters.
[0233] Step 210: Based on the description information of each named entity, perform topic division on each first candidate named entity to obtain at least one named entity topic.
[0234] In this embodiment, each named entity topic includes at least one semantically related first candidate named entity.
[0235] Further deduplication and optimization of useless items can be performed by combining named entity description information.
[0236] Specifically, a pre-trained named entity description information judgment model (e.g., various known large language models) can be used to compare the named entity description information of any two items in D0 to see if they describe the same first candidate named entity.
[0237] For example, the prompt words used by the named entity description information judgment model can be as follows:
[0238] Task: You are an intelligent assistant helping human analysts perform semantic analysis. You will be given two lines, each containing a first-choice named entity and its corresponding description. Based on the description of the first-choice named entity, determine: 1. Whether the two descriptions describe the same first-choice named entity; 2. Whether the two descriptions describe similar first-choice named entities, such as synonyms, abbreviations, or aliases; 3. If they are the same or similar, output "Yes"; otherwise, output "No". Do not output any other information besides "Yes" or "No". Input: {word1}: {caption1}; {word2}: {caption2}.
[0239] In some alternative implementations, if the named entity description information of any two items describes the same or similar first candidate named entity.
[0240] Then the two first candidate named entities are placed in the same named entity topic. In this way, for each first candidate named entity in the first candidate named entity set, an integrated named entity topic set can be obtained. Each named entity topic can include at least one semantically related first candidate named entity.
[0241] Step 211: For each named entity topic, generate named entity topic summary information of the named entity topic based on the named entity description information of each first candidate named entity in the named entity topic, and use each first candidate named entity included in the named entity topic as the named entity topic alias of the named entity topic.
[0242] In this embodiment, although multiple candidate named entities may be identified as belonging to the same named entity topic (i.e., their core descriptive subjects are consistent), there may still be subtle differences between them, such as representing different versions, subclasses or application scenarios of the topic.
[0243] For example, operating systems can be divided into personal, professional, and community editions, which may be represented by different names or numbers in different documents. For instance, operating system V1 refers to the personal edition, operating system V2 refers to the professional edition, and operating system V3 refers to the community edition. These expressions are all closely related to the operating system in the context, so they may be judged as the same named entity subject by the named entity description information judgment model. However, they differ in specific functional positioning, applicable scenarios, and business support, and are not completely equivalent synonyms, requiring further fine-grained differentiation.
[0244] To achieve fine-grained segmentation of named entity topics, after the initial extraction of named entity topics, semantic clustering can be further performed on the named entity description information of each first candidate named entity within a named entity topic. First, the named entity description information can be converted into embedding vectors, and the semantic similarity between the embedding vectors can be calculated based on cosine similarity. Then, the K-Means clustering algorithm is used, combined with the elbow method to automatically determine the optimal number of clusters K, thereby dividing the original named entity topic into K semantically more focused sub-clusters. The cluster center (cluster apex) of each sub-cluster can be selected as the representative name (i.e., named entity topic name) of that sub-topic, while the remaining first candidate named entities serve as aliases for that named entity topic.
[0245] Furthermore, a named entity topic summary information generation model (e.g., various known large language models) is used to semantically integrate and reconstruct the named entity description information of all first candidate named entities within each sub-cluster, generating concise, accurate, and comprehensive named entity topic summary information.
[0246] Step 212: Construct and generate a knowledge dictionary based on each named entity topic, the named entity topic summary information corresponding to each named entity topic, and the named entity topic alias.
[0247] In this embodiment, a knowledge dictionary can be constructed and generated based on each named entity topic, the named entity topic summary information corresponding to each named entity topic, and the named entity topic alias. The knowledge dictionary can be denoted as D = (Topic, Alias, TopicSummary), where D can represent the knowledge dictionary, Topic can represent a named entity topic, Alias can represent the named entity topic alias of the named entity topic, and TopicSummary can represent the named entity topic summary information.
[0248] Thus, by constructing a knowledge dictionary, the semantic interference caused by professional terms in vertical fields to the embedded model can be effectively resolved, provided that the boundaries of named entities are clearly defined.
[0249] The pseudocode for constructing a knowledge dictionary can be shown as follows:
[0250] Input: D0, model
[0251] Output: D
[0252] function DictionaryConstruct(D0,model)->E c
[0253] Topic = []
[0254] D = []
[0255] for entity in D0 do
[0256] if Topic is Null
[0257] entity->Topic['entity']
[0258] continue
[0259] for itemin D0
[0260] if CaptionConsistent(entity,item,model)
[0261] Topic[entity]['alias'].append(item)
[0262] D0-item->D0
[0263] endfor
[0264] endfor
[0265] clusters = []
[0266] for iin Topic:
[0267] KMeans(i.[captions])->clusters
[0268] clusterSummary(clusters,model)->D[topic,alias,summary]
[0269] endfor
[0270] return D
[0271] endfunction
[0272] In some optional implementations, knowledge dictionaries can be used to augment the original corpus data. By matching keywords in the text, the original named entities appearing in the corpus data can be replaced with enhanced expressions of named entity topics that are more semantically representative, thereby improving the semantic consistency and topic recognizability of the corpus data. The augmented corpus data is stored and can also be converted into corresponding vector data as high-quality retrieval corpus data.
[0273] Here, the selection of the database for the vector data of the augmented corpus can be specified by configuring the backend parameter. It supports mainstream vector databases such as Milvus, Faiss, and PgVector, and also supports configuring database connection information, including address, port, authentication credentials, etc.
[0274] Here, PgVector can be used, which combines structured query and vector retrieval capabilities, and has better compatibility and scalability for hybrid retrieval algorithms that fuse keywords and semantics.
[0275] Here, after the pipeline is established and started, the backend will automatically detect at least one large language model that needs to be embedded, and download the corresponding model file from the Hugging Face official repository or a domestic mirror site (such as hf-mirror) to complete the local loading. In addition, to ensure that the corpus data is written smoothly, the target database service needs to be started and configured in advance before performing storage operations, ensuring that it is running normally and connectable on the local or remote server.
[0276] In some optional implementations, the quality of the knowledge dictionary can also be evaluated. Specifically, the evaluation function can be implemented by setting relevant parameters in the configuration file . / config / pipeline_config.yaml to enable the evaluation module. Setting the enabled parameter to True will enable the evaluation module, which will automatically quantify the accuracy of named entity recognition in the knowledge dictionary, calculate and output recall, precision and F1 score.
[0277] This disclosure provides a topic-enhanced retrieval generation method that acquires a pre-defined knowledge dictionary, which includes multiple named entity topics. In response to a user-input query and its business depth and semantic weight, it identifies at least one target named entity in the query. Based on each target named entity and the knowledge dictionary, it determines a set of named entity topics corresponding to the query, where each set includes at least one target named entity topic and each target named entity topic corresponds to one target named entity. Based on the business depth and semantic weight, it determines a target retrieval algorithm corresponding to the set of named entity topics. Based on the set of named entity topics and the target retrieval algorithm, it performs a data retrieval operation to obtain at least one corpus data matching the query. Finally, it inputs the query and at least one corpus data into a pre-defined response generation model to generate a response result for the query. This disclosure effectively solves the problems of existing RAG technologies, such as weak semantic understanding in vertical domains, poor retrieval flexibility, high system coupling, and high fine-tuning costs. By constructing a pre-defined knowledge dictionary containing named entity topics, the accuracy of domain terminology recognition is improved, reducing the low recall precision problem caused by the general base model. By dynamically selecting differentiated retrieval algorithms (such as full retrieval and exact retrieval) based on the business depth and semantic weight of the query statement, a hybrid retrieval strategy oriented towards business needs is realized, overcoming the lack of flexibility caused by the traditional RAG relying solely on vector similarity. At the same time, this method decouples the retrieval logic from model fine-tuning, avoiding the high-cost path of relying on a large amount of labeled data for training in order to improve performance. The overall architecture reduces the coupling between components, enhances the adaptability to multiple types of retrieval needs, and significantly improves the accuracy, flexibility, and reliability of the generated results.
[0278] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a topic-enhanced retrieval enhancement generation device, which is similar to... Figure 2 The method embodiments shown correspond to this. This device can be applied to terminal devices or servers.
[0279] like Figure 3As shown, the topic-enhanced retrieval enhancement generation device 300 of this embodiment includes: a first acquisition unit 301, a first determination unit 302, a second determination unit 303, a third determination unit 304, a second acquisition unit 305, and a first generation unit 306. The system comprises the following components: a first acquisition unit 301, used to acquire a preset knowledge dictionary, wherein the knowledge dictionary includes multiple named entity topics; a first determination unit 302, used to identify at least one target named entity in the query statement in response to receiving a query statement input by a user and the business depth and semantic weight of the query statement; a second determination unit 303, used to determine a set of named entity topics corresponding to the query statement based on each target named entity and the knowledge dictionary, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity; a third determination unit 304, used to determine a target retrieval algorithm corresponding to the set of named entity topics based on the business depth and semantic weight; a second acquisition unit 305, used to perform a data retrieval operation based on the entity named topic set and the target retrieval algorithm to obtain at least one piece of corpus data matching the query statement; and a first generation unit 306, used to input the query statement and at least one piece of corpus data into a preset response result generation model to generate a response result for the query statement.
[0280] In this embodiment, the first acquisition unit 301, the first determination unit 302, the second determination unit 303, the third determination unit 304, the second acquisition unit 305, and the first generation unit 306 are described in detail. The specific processing and the resulting technical effects can be found in the following references: Figure 2 The relevant descriptions of steps 201 to 206 in the corresponding embodiments will not be repeated here.
[0281] In some alternative embodiments, the device 300 further includes:
[0282] Third acquisition unit 307 Figure 3 (Not shown), used to obtain a target domain corpus, wherein the target domain corpus includes multiple corpus data related to the target domain;
[0283] Second generation unit 308 Figure 3 (not shown), used to perform entity recognition on each corpus data, extract at least one first candidate named entity from each corpus data, and generate a first candidate named entity set;
[0284] Third generation unit 309 ( Figure 3 (Not shown), for each first candidate named entity, generate the named entity description information of the first candidate named entity;
[0285] Fourth generation unit 310 ( Figure 3(Not shown), used to divide each first candidate named entity into topics based on the description information of each named entity, to obtain at least one named entity topic, wherein each named entity topic includes at least one semantically related first candidate named entity;
[0286] Fifth generation unit 311 ( Figure 3 (Not shown), used to generate named entity topic summary information for each named entity topic based on the named entity description information of each first candidate named entity in the named entity topic, and to use each first candidate named entity included in the named entity topic as a named entity topic alias for the named entity topic;
[0287] Sixth generating unit 312 ( Figure 3 (Not shown), used to construct and generate a knowledge dictionary based on each named entity topic, the named entity topic summary information corresponding to each named entity topic, and the named entity topic alias.
[0288] In some alternative implementations, the third generation unit 309 may be further used for:
[0289] Retrieve the target statement associated with the first candidate named entity in the target domain corpus, and identify the context statements adjacent to the target statement to form a set of context statements;
[0290] Based on the first candidate named entity and the set of context statements, generate the named entity description information of the first candidate named entity.
[0291] In some alternative implementations, the fourth generation unit 310 may be further used for:
[0292] For each corpus data, the N-gram candidate named entity extraction method is used to extract at least one second candidate named entity from each corpus data to generate a set of second candidate named entities. The preset candidate named entity extraction model is used to extract at least one third candidate named entity from each corpus data to generate a set of third candidate named entities.
[0293] Find the intersection of the second candidate named entity set and the third candidate named entity set, extract the common candidate named entities, determine the common candidate named entities as at least one first candidate named entity for each corpus data, and generate the first candidate named entity set.
[0294] In some optional implementations, the retrieval algorithm includes at least one of a complete retrieval algorithm, a precise retrieval algorithm, a general retrieval algorithm, and a deep retrieval algorithm, and the third determining unit 304 may be further used to:
[0295] If the business depth is the first depth and the semantic weight is the first weight, the target retrieval algorithm corresponding to the named entity topic set is determined to be the complete retrieval algorithm.
[0296] If the business depth is the second depth and the semantic weight is within the second weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the precise retrieval algorithm.
[0297] If the business depth is the third depth and the semantic weight is within the third weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the general retrieval algorithm.
[0298] If the business depth is the fourth depth and the semantic weight is within the fourth weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the deep retrieval algorithm.
[0299] In some optional implementations, the knowledge dictionary also includes at least one named entity topic alias corresponding to each named entity topic, and the second determining unit 303 may be further used to:
[0300] For each target named entity, determine whether there is a named entity topic or named entity topic alias that matches the target named entity in the knowledge dictionary;
[0301] If it exists, generate a first set of named entities based on the matching named entity topic or the named entity topic corresponding to the matching named entity topic alias;
[0302] If it does not exist, perform one of the following operations based on the business depth of the target named entity:
[0303] The query will not be processed; or
[0304] Identify named entity topics that are semantically similar to the target named entity, and generate a second set of named entities based on the semantically similar named entity topics;
[0305] Based on the first and second named entity sets, determine the set of named entity topics corresponding to the query statement.
[0306] It should be noted that the implementation details and technical effects of each unit in the topic-enhanced retrieval enhancement device provided in the embodiments of this disclosure can be found in the descriptions of other embodiments in this disclosure, and will not be repeated here.
[0307] The following is for reference. Figure 4 It shows a schematic diagram of the structure of a computer system 400 suitable for implementing the terminal device of this disclosure. Figure 4 The computer system 400 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0308] like Figure 4 As shown, the computer system 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the computer system 400. The processing device 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0309] Typically, the following devices can be connected to I / O interface 405: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows computer system 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 A computer system 400 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0310] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by a processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.
[0311] It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0312] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0313] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2 The embodiments shown and their alternative implementations illustrate a topic-enhanced retrieval enhancement generation method.
[0314] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and Python, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0315] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0316] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not necessarily limiting in certain circumstances; for example, the first acquisition unit can also be described as "a unit that acquires a preset knowledge dictionary".
[0317] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A topic-enhanced retrieval generation method, characterized in that, The method includes: Obtain a preset knowledge dictionary, wherein the knowledge dictionary includes multiple named entity topics; In response to receiving a query statement input by a user and the business depth and semantic weight for the query statement, at least one target named entity in the query statement is identified; Based on each target named entity and the knowledge dictionary, a set of named entity topics corresponding to the query statement is determined, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity; Based on the business depth and the semantic weight, determine the target retrieval algorithm corresponding to the named entity topic set; Based on the named entity topic set and the target retrieval algorithm, a data retrieval operation is performed to obtain at least one piece of corpus data that matches the query statement; The query statement and at least one piece of the corpus data are input into a preset response generation model to generate a response result for the query statement; The method further includes the following steps before acquiring the preset knowledge dictionary: Obtain a target domain corpus, wherein the target domain corpus includes multiple corpus data related to the target domain; Entity recognition is performed on each of the corpus data, and at least one first candidate named entity is extracted from each of the corpus data to generate a first candidate named entity set. For each of the first candidate named entities, generate named entity description information for the first candidate named entity; Based on the description information of each named entity, each first candidate named entity is divided into topics to obtain at least one named entity topic, wherein each named entity topic includes at least one semantically related first candidate named entity; For each named entity topic, a named entity topic summary is generated based on the named entity description information of each of the first candidate named entities in the named entity topic, and each of the first candidate named entities included in the named entity topic is used as a named entity topic alias for the named entity topic. The knowledge dictionary is constructed and generated based on each named entity topic, the named entity topic summary information corresponding to each named entity topic, and the named entity topic alias.
2. The method according to claim 1, characterized in that, The generated named entity description information for the first candidate named entity includes: Retrieve the target statement associated with the first candidate named entity in the target domain corpus, and identify the context statements adjacent to the target statement to form a context statement set; Based on the first candidate named entity and the set of context statements, generate the named entity description information of the first candidate named entity.
3. The method according to claim 1, characterized in that, The step of performing entity recognition on each of the corpus data, extracting at least one first candidate named entity from each of the corpus data, and generating a first candidate named entity set includes: For each of the corpus data, at least one second candidate named entity is extracted from each of the corpus data using the N-gram candidate named entity extraction method, generating a second candidate named entity set; and at least one third candidate named entity is extracted from each of the corpus data using a preset candidate named entity extraction model, generating a third candidate named entity set. Find the intersection of the second candidate named entity set and the third candidate named entity set, extract the common candidate named entities, determine the common candidate named entities as at least one first candidate named entity of each of the corpus data, and generate a first candidate named entity set.
4. The method according to claim 1, characterized in that, The retrieval algorithm includes at least one of the following: a complete retrieval algorithm, a precise retrieval algorithm, a general retrieval algorithm, and a deep retrieval algorithm. The step of determining the target retrieval algorithm corresponding to the named entity topic set based on the business depth and the semantic weight includes: If the business depth is a first depth and the semantic weight is a first weight, the target retrieval algorithm corresponding to the named entity topic set is determined to be a complete retrieval algorithm. If the business depth is the second depth and the semantic weight is within the second weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be the precise retrieval algorithm. If the business depth is the third depth and the semantic weight is within the third weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a general retrieval algorithm. If the business depth is the fourth depth and the semantic weight is within the fourth weight range, the target retrieval algorithm corresponding to the named entity topic set is determined to be a deep retrieval algorithm.
5. The method according to claim 1, characterized in that, The knowledge dictionary also includes at least one named entity topic alias corresponding to each named entity topic. The step of determining the set of named entity topics corresponding to the query statement based on each target named entity and the knowledge dictionary includes: For each target named entity, determine whether there exists a named entity topic or named entity topic alias that matches the target named entity in the knowledge dictionary; If it exists, a first set of named entities is generated based on the matching named entity topic or the named entity topic corresponding to the matching named entity topic alias; If it does not exist, then one of the following operations is performed based on the business depth of the target named entity: Refuse to process the query statement; or Determine the named entity topics that are semantically similar to the target named entity, and generate a second set of named entities based on the semantically similar named entity topics; Based on the first named entity set and the second named entity set, determine the named entity topic set corresponding to the query statement.
6. A topic-enhanced retrieval generation device, characterized in that, The device includes: The first acquisition unit is used to acquire a preset knowledge dictionary, wherein the knowledge dictionary includes multiple named entity topics; The first determining unit is configured to identify at least one target named entity in the query statement in response to receiving a query statement input by a user and the business depth and semantic weight of the query statement; The second determining unit is configured to determine a set of named entity topics corresponding to the query statement based on each of the target named entities and the knowledge dictionary, wherein the set of named entity topics includes at least one target named entity topic and each target named entity topic corresponds to one target named entity; The third determining unit is used to determine the target retrieval algorithm corresponding to the named entity topic set based on the business depth and the semantic weight. The second acquisition unit is used to perform a data retrieval operation based on the named entity topic set and the target retrieval algorithm to obtain at least one piece of corpus data that matches the query statement; The first generation unit is used to input the query statement and the at least one piece of the corpus data into a preset response result generation model to generate a response result for the query statement; The device also includes: The third acquisition unit is used to acquire a target domain corpus, wherein the target domain corpus includes multiple corpus data related to the target domain; The second generation unit is used to perform entity recognition on each of the corpus data, extract at least one first candidate named entity from each of the corpus data, and generate a first candidate named entity set. The third generation unit generates named entity description information for each of the first candidate named entities. The fourth generation unit is used to perform topic division on each of the first candidate named entities based on the description information of each named entity, to obtain at least one named entity topic, wherein each named entity topic includes at least one semantically related first candidate named entity; The fifth generation unit is configured to generate named entity topic summary information for each named entity topic based on the named entity description information of each first candidate named entity in the named entity topic, and use each first candidate named entity included in the named entity topic as a named entity topic alias for the named entity topic. The sixth generation unit is used to construct and generate the knowledge dictionary based on each of the named entity topics, the named entity topic summary information corresponding to each of the named entity topics, and the named entity topic aliases.
7. An electronic device, characterized in that, include: One or more processors; Storage device, on which one or more programs are stored, When one or more programs are executed by one or more processors, the one or more processors implement the method as claimed in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by one or more processors, implements the method as claimed in any one of claims 1-5.
9. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Document retrieval method and device, equipment and storage medium
CN119903175A
Text retrieval enhancement generation method and device, medium and equipment
CN120104718A