An enterprise knowledge base trusted search enhancement generation system
Patent Information
- Application Number
- CN202610841533.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本发明的目的在于提供一种企业知识库可信检索增强生成系统,用于解决现有企业RAG知识库系统中存在的过期文档进入向量检索、冲突证据导致错误生成、越权知识片段进入提示词上下文以及回答依据难以审计的问题
一、本发明通过企业文档接入与知识单元化处理,将企业制度文件、流程规范文件、合同模板、项目文档、会议纪要、技术规范、产品手册、FAQ文档、历史工单记录、运维手册和合规文件等多源异构文档,转化为具有文档编号、版本号、生效时间、失效时间、权限标识和证据片段哈希的知识单元,并进一步构建时效区间索引、权限位图索引、文本向量索引和关键词索引。通过该处理方式,能够为后续检索、过滤、冲突识别和审计复核提供统一的数据基础,提高企业知识库对动态文档、历史版本文档和多权限文档的管理能力。
Smart Images

Figure CN122594408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing, enterprise knowledge base, vector retrieval, access control, knowledge graph and retrieval enhancement generation technology, and specifically to a trusted retrieval enhancement generation system for enterprise knowledge base. Background Technology
[0002] As enterprises advance their digital transformation, they accumulate a large amount of knowledge resources, including policy documents, process specifications, contract templates, project documents, product manuals, meeting minutes, FAQs, historical work orders, operation and maintenance manuals, and compliance documents. These knowledge resources are typically stored in various systems, such as OA systems, document management systems, knowledge base systems, project management systems, cloud storage, and business systems, leading to problems such as complex document formats, frequent version iterations, complex permission boundaries, inconsistent knowledge timeliness, and cross-departmental rule conflicts.
[0003] Retrieval enhancement generation technology improves the professionalism and interpretability of large language models in enterprise knowledge question answering by retrieving external knowledge fragments before generating answers and using the retrieval results as context input to the model. However, existing enterprise knowledge base retrieval enhancement generation solutions typically rely primarily on semantic vector similarity for candidate document recall, then concatenate the recall results into prompts for the large language model to generate answers. This approach still presents some technical challenges in dynamic enterprise document environments. For example, enterprise knowledge bases contain a large number of expired policies, abolished processes, historical versions of documents, and temporary notices. If retrieval is based solely on semantic similarity, expired documents may be recalled due to their high semantic relevance, leading to increased retrieval noise and affecting the accuracy of the model's answers. Documents issued by different departments and at different times within an enterprise may have conflicting rules. For example, the approval level, reimbursement amount, execution period, or applicable objects may differ between old and new policies for the same matter. If the large language model receives contradictory evidence fragments simultaneously, it is prone to generating compromise, mixed, or incorrect answers. Furthermore, enterprise documents typically have strict access permissions and confidentiality requirements. If unauthorized document fragments are recalled during the retrieval phase and enter the context of prompt words, even if the final answer does not directly display the full text, it may still pose a risk of sensitive knowledge leakage. Existing solutions mostly perform answer verification after retrieval or generation, which is a post-event control and cannot prevent expired, conflicting, or unauthorized knowledge from entering the generation context at the source. Finally, existing enterprise knowledge question-answering systems mostly record the basis for answers at the level of source links or cited fragments, lacking an evidence chain auditing mechanism that can reproduce the retrieval process, conflict resolution process, prompt word construction process, and generation basis. Summary of the Invention
[0004] The purpose of this invention is to provide a trusted retrieval enhancement generation system for enterprise knowledge bases, which solves the problems existing in the current enterprise RAG knowledge base system, such as expired documents entering vector retrieval, conflicting evidence leading to erroneous generation, unauthorized knowledge fragments entering the context of prompt words, and difficulty in auditing the basis of answers.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a trusted retrieval enhancement generation system for enterprise knowledge bases, the system comprising: Enterprise Document Access and Knowledge Unitization Module: Accesses multi-source heterogeneous document data within the enterprise, and performs parsing, segmentation, format unification, metadata annotation, and knowledge unitization processing on the multi-source heterogeneous document data within the enterprise to form a set of enterprise knowledge units.
[0006] Multidimensional Index and Conflict Evidence Graph Construction Module: Based on the enterprise knowledge unit set, construct time interval index, permission bitmap index, text vector index and keyword index, and construct a conflict evidence graph based on the version relationship, scope of application relationship, rule parameter relationship and evidence conflict relationship between knowledge units.
[0007] The user query parsing and pre-retrieval joint pruning module receives user query input, performs semantic parsing, query vector generation, and query constraint extraction on the user query, and obtains query constraint information including query time, user identity, user role, department, and access security level. Before performing vector retrieval, it performs time-period-permission joint pruning on the enterprise knowledge unit set based on the time interval index, permission bitmap index, and conflict evidence graph.
[0008] Controlled Hybrid Retrieval and Consistent Evidence Selection Module: Performs vector retrieval, keyword retrieval, and source authority calculation on the jointly pruned knowledge units to obtain a set of candidate evidence, and selects the largest consistent evidence subgraph from the candidate evidence set based on the conflict evidence graph.
[0009] Controlled prompt word construction and credible answer generation module: Based on the maximum consistency evidence subgraph, controlled prompt words are constructed, the controlled prompt words are input into the large language model, credible answers are generated, and the citation source, document version and validity information corresponding to the credible answer are output.
[0010] The evidence chain hash audit record generation module generates evidence chain hash audit records for user queries, query constraint information, joint pruning results, candidate evidence sets, maximum consistent evidence subgraphs, controlled prompt words, credible answers, and conflict resolution results, enabling traceable recording of the credible answer process.
[0011] Furthermore, in the enterprise document access and knowledge unitization module, the accessed multi-source heterogeneous document data within the enterprise includes one or more of the following: enterprise policy documents, process specification documents, contract templates, project documents, meeting minutes, technical specifications, product manuals, FAQ documents, historical work order records, operation and maintenance manuals, compliance documents, audit documents, announcements and notices, and structured data exported from business systems.
[0012] Furthermore, in the enterprise document access and knowledge unitization module, the specific processing of parsing, segmenting, formatting, metadata annotation, and knowledge unitization of multi-source heterogeneous document data within the enterprise involves: extracting the main text, identifying chapters, parsing tables, identifying clauses, and extracting attachment content from documents of different formats; segmenting the document content according to chapter level, semantic integrity, clause boundaries, and preset text length thresholds; uniformly converting the segmented text fragments into structured knowledge units, and labeling each knowledge unit with document number, knowledge unit number, document name, publishing department, version number, publishing time, effective time, expiration time, applicable objects, security level, access role, main text content, and evidence fragment hash.
[0013] Furthermore, in the multidimensional index and conflict evidence graph construction module, the specific content of constructing the time-limited index, permission bitmap index, text vector index, and keyword index is as follows: The time-limited index is constructed based on the effective time and expiration time of each knowledge unit, used to determine whether the knowledge unit is in a valid state at the time of user query; The permission bitmap index is constructed based on the security level, access role, department, job level, and applicable object of each knowledge unit, used to determine whether the current user has the permission to access the corresponding knowledge unit; The text vector index converts the main text content of the knowledge unit into text vectors through an embedding model, used to support semantic similarity retrieval; The keyword index is constructed based on the title, clause number, business keywords, entity name, and rule parameters in the knowledge unit, used to support exact matching and mixed retrieval.
[0014] Furthermore, in the multidimensional index and conflict evidence graph construction module, the specific content of constructing the conflict evidence graph is as follows: extract rule quintuples from enterprise knowledge units, wherein the rule quintuples include subject, condition, action, parameter, and exception; when the subject, condition, and action of two or more knowledge units are the same or semantically similar, but the parameters, exceptions, scope of application, effective time, issuing department, document version, or permission scope differ, a conflict edge is established between the knowledge units; the conflict edge includes one or more of the following: numerical conflict edge, time conflict edge, version conflict edge, scope of application conflict edge, permission conflict edge, and exception clause conflict edge; the nodes in the conflict evidence graph are knowledge units, and the edges include conflict edges, substitution edges, supporting edges, referencing edges, and repealed edges, which are used to represent the conflict relationship, version substitution relationship, evidence supporting relationship, document referencing relationship, and repealed relationship between knowledge units.
[0015] Furthermore, the specific content of the joint pruning module for user query parsing and retrieval, which performs semantic parsing, query vector generation, and query constraint extraction on user queries, is as follows: The user-input natural language query is segmented, entity-recognized, intent-recognized, and rule slots are extracted to obtain the query topic, business matter, time conditions, applicable objects, and question type; the user query is converted into a query vector through an embedding model; based on user login information, organizational structure information, job information, and access management information, query constraint information including query time, user identity, user role, department, job level, and access security level is generated; wherein, the question type includes one or more of the following: policy query, process query, contract clause query, technical specification query, fault handling query, project document query, and compliance rule query.
[0016] Furthermore, in the user query parsing and retrieval pre-joint pruning module, the specific content of the time-validity-permission joint pruning is as follows: based on the query time, knowledge units that meet the current valid conditions are filtered in the time-validity interval index to obtain a time-valid knowledge set; based on the user role, department, job level, and access security level, knowledge units that the current user can access are filtered in the permission bitmap index to obtain a permission-visible knowledge set; the intersection of the time-valid knowledge set and the permission-visible knowledge set is calculated to obtain an initial controlled knowledge set; based on the replacement edges and obsolescence edges in the conflict evidence graph, knowledge units that have been replaced by new versions, obsolescence, or are not applicable to the current query conditions are removed from the initial controlled knowledge set to obtain a jointly pruned knowledge unit set; wherein, the time-validity-permission joint pruning occurs before vector retrieval to prevent expired knowledge units and unauthorized knowledge units from entering the subsequent retrieval and prompt word construction process.
[0017] Furthermore, in the controlled hybrid retrieval and consistent evidence selection module, the specific content of performing vector retrieval, keyword retrieval, and source authority calculation on the jointly pruned knowledge unit is as follows: calculating semantic similarity based on query vector and knowledge unit text vector; calculating keyword matching degree based on keywords, entity names, clause numbers, and rule parameters in the user query; calculating source authority and timeliness score based on the publishing department, document type, version status, and effective status of the document to which the knowledge unit belongs; and calculating conflict risk score based on the number of conflict edges, conflict type, and conflict intensity related to the knowledge unit in the conflict evidence graph.
[0018] Wherein, let the user query be The first after joint pruning Each knowledge unit is The query vector is The knowledge unit text vector is Then semantic similarity Represented as: Keyword matching degree The term weights are calculated using length-normalized term weights, and are expressed as follows: in, To query terms that are shared with knowledge units, Inverse document frequency of terms, For terms In knowledge unit Frequency of occurrence in For the length of the knowledge unit, The average length of a knowledge unit. and To adjust parameters. Conflict risk score. Represented as: in, In the conflict evidence map and knowledge unit The set of connected conflicting edges. It is a conflict edge type. Weights corresponding to the conflict type, The strength of the conflict side. Overall score of candidate evidence. Represented as: in, For knowledge units The overall score of candidate evidence, The Sigmoid normalization function, This represents the normalized keyword matching score. To ensure the authority of the source, Score based on timeliness. For metadata matching degree, To score the conflict risk, These are the weighting coefficients.
[0019] Furthermore, in the controlled hybrid retrieval and consistent evidence selection module, the specific content of selecting the largest consistent evidence subgraph from the candidate evidence set based on the conflict evidence graph is as follows: using knowledge units in the candidate evidence set as candidate nodes, extracting conflict edges, substitution edges, supporting edges, reference edges, and obsolete edges related to the candidate nodes from the conflict evidence graph to form a candidate evidence subgraph. Let the candidate evidence subgraph be: in, For the set of candidate knowledge unit nodes, For the set of conflicting edges, To support edge sets, For the reference edge set, This is the set of obsolete edges. For each candidate knowledge unit... Set selection variables ,in Representing knowledge units Selected for the largest consensus evidence subgraph This indicates that the sample was not selected; therefore, the maximum consistency evidence subgraph is used. The objective function to be selected is: And it satisfies the following constraints: in, For knowledge units The overall score of candidate evidence, To support edge weights, For reference edge weights, For conflict edge weights, To abolish the penalty weight, For knowledge units The length of the text. The maximum allowed length of evidence for the prompt words. Indicates the current user Knowledge Units The function with the required permissions is visible. Representing knowledge units During the query time The time-effective function is as follows. Among them, the conflict edge weights... Calculated based on conflict type, version differences, applicable scope differences, and parameter differences, and expressed as follows: in, For conflict type intensity, Based on the strength of version conflicts, To determine the scope and intensity of conflict, For the conflict strength of the rule parameters, The weighting coefficient is used. When the maximum consistent evidence subgraph has a consistency score greater than a preset consistency threshold, it is used as the evidence source for the controlled prompt word; otherwise, a conflict prompt or manual review process is triggered.
[0020] Furthermore, in the controlled prompt word construction and credible answer generation module, the specific content of constructing controlled prompt words and generating credible answers is as follows: Based on the maximum consistency evidence subgraph, extract the allowed citations of the knowledge unit's main text, source file, document number, version number, publishing department, effective date, expiration date, applicable objects, security classification level, and evidence fragment hash. Based on the knowledge unit's candidate evidence comprehensive score, conflict risk score, evidence coverage, and prompt word length constraints, allocate prompt word evidence budgets to each knowledge unit in the maximum consistency evidence subgraph. Evidence budget for each knowledge unit Represented as: in, For knowledge units The available length budget in controlled prompt words The maximum evidence length for the prompt words. The overall score for candidate evidence. To score the conflict risk, The evidence coverage of the knowledge unit for the user's question. For the subgraph of the most consistent evidence, To prevent smoothing factors with a denominator of zero, the controlled prompt words include a user question summary, a user permission summary, the content of knowledge units in the maximum consistency evidence subgraph, the citation source, version number, effective date, conflict detection result, the reason for excluding excluded evidence, and answer generation constraints. The answer generation constraints include: generating answers only based on knowledge units in the maximum consistency evidence subgraph; not citing unauthorized knowledge units; not citing invalid knowledge units; not mixing conflicting evidence content; outputting an "indetermined" prompt when evidence is insufficient; and outputting a conflict explanation when historical conflicts exist. The controlled prompt words are input into a large language model to generate a credible answer, and the confidence level of the credible answer is further calculated. The confidence level of the credible answer Represented as: in, Confidence level for a credible answer The Sigmoid normalization function, The average of the comprehensive scores of knowledge units in the subgraph of maximum consistency evidence. For evidence coverage, For consistency of evidence, For the sake of traceability and completeness of evidence, For the risk of residual conflict, The percentage of key slots not covered. is the weighting coefficient. Wherein, the evidence coverage... Represented as: in, This is a set of key slots extracted from user queries. This represents the set of slots covered by evidence in the maximum consistency evidence subgraph. This is a smoothing factor. The consistency of the evidence... Represented as: in, The set of conflicting edges remaining in the subgraph of maximum consistency evidence. The set of all conflict edges corresponding to the candidate evidence set. and Choose variables for knowledge units. The conflict edge weights. The traceability and completeness of the evidence. Represented as: in, The set of evidence actually used to generate a credible answer. The set of evidence hashes for the generated evidence fragments. When , , and When the threshold is reached, output a credible answer and cited sources; when any indicator fails to reach the corresponding threshold, output a message indicating insufficient evidence, a conflict explanation, or a manual review prompt; among these, The confidence threshold for a credible answer. This is the threshold for evidence coverage. The threshold for evidence consistency. The threshold for the traceability and completeness of evidence.
[0021] Further, in the evidence chain hash audit record generation module, the specific content of the generated evidence chain hash audit record is as follows: hash values are calculated for the user query, query constraint information, joint pruning results, candidate evidence set, maximum consistent evidence subgraph, controlled prompt word digest, credible answer, citation source, and conflict resolution result, respectively; the hash values are concatenated in a preset order, and the total hash is calculated again to form an evidence chain hash audit identifier. The evidence chain hash audit record includes the user query hash, permission digest hash, pruning result hash, candidate evidence hash, maximum consistent evidence subgraph hash, prompt word digest hash, answer result hash, conflict resolution result hash, generation timestamp, and system version number. The evidence chain hash audit identifier... Represented as: in, Query hash for user For permission digest hash, For the hash of the joint pruning results, For candidate evidence hash, For the hash of the subgraph of maximum consistency evidence, For controlled prompt word digest hash, To answer the result hash, For the hash of the conflict resolution result, To generate a timestamp, This is the system version number. This indicates string concatenation. This represents a hash function. The evidence chain hash audit record is used to restore the knowledge unit, permission status, timeliness status, joint pruning results, conflict handling process, maximum consistency evidence subgraph, controlled prompt word summary, and answer generation basis on which the credible answer is based during subsequent review, thereby realizing traceable auditing of the enterprise knowledge base's credible retrieval enhancement generation process.
[0022] Compared with existing technologies, a trusted retrieval enhancement generation system for enterprise knowledge bases has the following beneficial effects: I. This invention, through enterprise document access and knowledge unitization processing, transforms heterogeneous documents from multiple sources, such as enterprise policy documents, process specification documents, contract templates, project documents, meeting minutes, technical specifications, product manuals, FAQ documents, historical work order records, operation and maintenance manuals, and compliance documents, into knowledge units with document numbers, version numbers, effective dates, expiration dates, permission identifiers, and evidence fragment hashes. Furthermore, it constructs time-limited indexes, permission bitmap indexes, text vector indexes, and keyword indexes. This processing method provides a unified data foundation for subsequent retrieval, filtering, conflict identification, and audit review, improving the enterprise knowledge base's ability to manage dynamic documents, historical version documents, and documents with multiple permissions.
[0023] Second, before vector retrieval, this invention performs joint pruning of knowledge units based on timeliness and permissions using a timeliness interval index, a permission bitmap index, and a conflict evidence graph. Expired, obsolete, replaced, or unauthorized knowledge units are first removed, and then the pruned knowledge units are subjected to mixed retrieval. This processing method reduces the amount of invalid knowledge entering the vector retrieval stage, lowers the recall rate of expired knowledge and the risk of unauthorized knowledge leakage, while narrowing the scope of retrieval candidates, reducing unnecessary vector similarity calculations, and improving retrieval efficiency and the effectiveness of candidate evidence.
[0024] Third, this invention identifies and resolves numerical conflicts, temporal conflicts, version conflicts, scope of application conflicts, permission conflicts, and exception clause conflicts among candidate evidence before generating prompt words by constructing a conflict evidence graph and a maximum consistency evidence subgraph. Based on consistent evidence, it constructs controlled prompt words, ensuring that the large language model's answer generation is jointly constrained by the evidence scope, permission scope, time frame, and conflict resolution results. Simultaneously, this invention uses evidence chain hash audit records to track user queries, query constraint information, joint pruning results, candidate evidence sets, maximum consistency evidence subgraphs, controlled prompt word summaries, credible answers, and conflict resolution results, thereby improving the credibility, traceability, and auditability of enterprise knowledge-based question-and-answer results.
[0025] In summary, this invention does not simply rely on semantic similarity to recall documents and generate answers. Instead, it controls timeliness, permissions, and version relationships before retrieval, selects consistent conflict evidence before generation, and performs evidence chain hash auditing after generation. This effectively reduces the impact of outdated knowledge, unauthorized knowledge, and conflicting knowledge on the answer results, and improves the accuracy, security, response efficiency, and auditing and review capabilities of the enterprise knowledge base retrieval enhancement generation system. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0027] Figure 1 A flowchart of a trusted retrieval enhancement generation system for enterprise knowledge bases; Figure 2 This is a schematic diagram illustrating the data transmission between modules of a trusted retrieval enhancement system for an enterprise knowledge base. Detailed Implementation
[0028] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, system structure, data transmission relationships, technical features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0029] Example 1: Scenario where company employees conduct credible Q&A consultations based on the company's knowledge base.
[0030] Employees submit business consultation requests through the system's interactive interface, inputting the question, their department, job role, business scenario, urgency of the issue, and desired output format. For example, inputting "Which version of the travel policy should be used to reimburse the transportation and accommodation expenses incurred during this client visit, and is prior approval required?" The system simultaneously obtains the employee's account identifier, permission level, historical search records, and current access terminal information. This information helps the system clarify the user's query intent, permission scope, and business context, laying the foundation for subsequent reliable retrieval and controlled generation. Figure 1 As shown.
[0031] The enterprise document access and knowledge unitization module first accesses multi-source documents from the enterprise knowledge base, including travel reimbursement policies, expense management methods, approval process manuals, financial announcements, departmental supplementary regulations, historical Q&A records, reimbursement system field descriptions, and related attachment templates. The system uniformly parses Word, PDF, web pages, scanned documents, and structured forms, dividing document titles, chapters, clauses, tables, attachment descriptions, and approval process nodes into knowledge units. For each knowledge unit, metadata such as source file, document number, publishing department, version number, effective date, expiration date, applicable objects, security classification, clause number, and evidence fragment hash are generated. For example, clauses such as "High-speed rail second-class seat reimbursement standard," "Accommodation fee city level limit," "Pre-approval requirements for customer visits," and "List of invoice attachments" in the "Travel Reimbursement Management Method V3.2" are treated as independent knowledge units. For situations where the same matter has different expressions, the system maps "travel expenses," "business trip expenses," "client visit expenses," and "transportation and accommodation subsidies" to unified business semantic tags. For situations where the same policy has multiple versions, the system labels them as currently valid, repealed, or historically referenced based on version status and effective date, thus forming a set of enterprise knowledge units. The multi-dimensional index and conflict evidence graph construction module builds a timeliness index, permission index, vector index, and conflict evidence graph based on the enterprise knowledge unit set. The timeliness index is used to determine whether a knowledge unit is valid at the time of query, avoiding referencing repealed policies; the permission index is used to determine whether the current employee has the right to view a knowledge unit, avoiding unauthorized access to internal financial audit rules or management-specific documents; the vector index is used to support semantic retrieval, enabling employees to recall relevant clauses even when using colloquial expressions; the conflict evidence graph is used to record supporting edges, referencing edges, conflicting edges, substitution edges, and repealing edges between knowledge units. For example, substitution and repeal edges are established between the old and new versions of the travel policy; reference edges or differences in scope of application edges are established between the group policy and the business unit supplementary rules; and time-limited relationships are established between the clauses in financial announcements that temporarily adjust accommodation standards and the original standards. Through the above structure, the system can not only retrieve relevant texts, but also identify which evidence can be used simultaneously, which evidence has version conflicts, and which evidence is only applicable to specific departments or specific time periods.
[0032] The user query parsing and pre-retrieval joint pruning module receives employee queries and performs intent recognition and key slot extraction on the query statements to obtain key slot sets such as "customer visit," "business trip," "high-speed rail ticket," "hotel accommodation fee," "local transportation fee," "advance approval," "reimbursement materials," and "this month." Based on user permissions, query time, department / position, and business scenario, the system performs joint pruning on the multi-dimensional index and conflict evidence graph. First, it excludes knowledge units that the current employee is not authorized to access. Then, it excludes knowledge units that are invalid at the time of the query and lack historical explanations. Finally, it retains knowledge units directly related to travel reimbursement, expense standards, approval processes, and invoice materials, outputting the jointly pruned knowledge unit set. This step narrows the scope of subsequent mixed searches, preventing the large language model from accessing unauthorized evidence and obviously invalid evidence, thus reducing the risk of error generation at the retrieval entry point.
[0033] The controlled hybrid retrieval and consistent evidence selection module performs vector retrieval, keyword retrieval, and source authority calculation on the jointly pruned knowledge units. For the first... Knowledge Units The system query vector is With the knowledge unit text vector Calculate semantic similarity Its formula is This formula measures the semantic similarity between employee questions and policy clauses, recalling related knowledge units even if the employee doesn't accurately write the policy name. Subsequently, the system uses term weights with length normalization to calculate keyword matching degree. The system comprehensively considers factors such as the terms, IDF value, term frequency, knowledge unit length, and average length shared by the query and knowledge unit to avoid excessively long clauses being incorrectly ranked due to containing a large number of irrelevant words. Simultaneously, it ensures that key entities such as "high-speed rail tickets," "accommodation fees," "advance approval," and "invoices" improve the scores of their corresponding clauses. Furthermore, the system calculates source authority based on the publishing department, document type, version status, and effective status. Timeliness score For example, the officially issued and currently effective system of the financial center. and All scores were higher than those of typical history questions and answers.
[0034] Meanwhile, the system calculates the conflict risk score based on the conflict evidence map. Its formula is in, The set of conflict edges connected to the knowledge unit. Weights corresponding to the conflict type, This represents the conflict edge strength. The formula quantifies risks such as version conflicts, scope conflicts, and parameter conflicts. If a knowledge unit conflicts with multiple existing rules, or belongs to a historical clause that has been replaced by a new version but remains in the knowledge base, then... An increase in the overall score will result in a penalty in subsequent comprehensive ranking. (Candidate evidence comprehensive score) Represented as ,in Metadata matching score. This formula incorporates semantic relevance, keyword hit, source authority, timeliness, metadata matching, and conflict risk into the score, ensuring that the system does not simply select text that "looks similar," but prioritizes evidence that is consistent with the current user, the current time, and the current business scenario and has a low risk of conflict.
[0035] After obtaining the candidate evidence set, the system selects the largest consistent evidence subgraph based on the conflict evidence graph. The candidate evidence subgraph is represented as follows: , For the set of candidate knowledge unit nodes, For the set of conflicting edges, To support edge sets, For the reference edge set, This is the set of obsolete edges. The system sets selection variables for each knowledge unit. ,in This indicates that it was selected into the subgraph of the most consistent evidence. This indicates that it was not selected and was processed according to the objective function. Make a selection while ensuring that the total length of the evidence does not exceed Functions that are visible to the current user Functions that meet requirements and have a valid query time The objective function aims to encourage the selection of mutually supporting, mutually referencing evidence with a high overall score, while penalizing conflicting, obsolete, or inapplicable evidence to current employees. For example, when both the old and new versions of the travel policy are recalled, the system uses the obsolete edge and version conflict weights to determine which version is being recalled. Excluding older clauses; when group regulations and departmental supplementary rules mutually reference each other and have the same scope of application, the system will simultaneously select both into the maximum consistency evidence subgraph. If the consistency score of the maximum consistency evidence subgraph is higher than a preset threshold, it will be used as the source of evidence for subsequent controlled prompts; otherwise, a conflict warning will be output or the process will be transferred to the finance department for manual review. The controlled prompt construction and credible answer generation module extracts the allowed knowledge unit text, source file, document number, version number, effective date, applicable objects, security classification level, and evidence fragment hash from the maximum consistency evidence subgraph, and then uses a formula... A cue word evidence budget is allocated to each knowledge unit. This formula ensures that evidence with high overall scores, low conflict risk, and coverage of key user slots receives more cue word space. For example, current financial policy clauses directly specifying "accommodation fee limits" receive a larger budget than background information; clauses merely describing historical versions and with high conflict risk are excluded from the formal answer. The system-constructed controlled cue words include a user question summary, a user permission summary, evidence content in the maximum consistency evidence subgraph, citation sources, version number, effective date, conflict detection results, reasons for exclusion of excluded evidence, and answer generation constraints. These constraints require the large language model to answer only based on the maximum consistency evidence subgraph, not to cite unauthorized knowledge units, not to cite invalid knowledge units, not to mix conflicting evidence, and to output an "indetermined" cue when evidence is insufficient.
[0036] The large language model generates credible answers based on controlled prompts. For example, it explicitly states that travel expenses for this client visit should be reimbursed according to the currently effective "Travel Reimbursement Management Measures V3.2" and the Finance Center's supplementary announcement for the month; high-speed rail tickets should be reimbursed according to the employee's job level and corresponding transportation standards; hotel accommodation expenses should be reimbursed according to the city level limit for the business trip; if the client visit is a planned business trip or exceeds the budget, approval must be completed before departure; and when submitting reimbursements, an itinerary approval form, client visit record, transportation tickets, accommodation invoices, and expense details must be submitted. Each conclusion is accompanied by the cited source, clause number, and effective date. The system further calculates the confidence level of the credible answer. The formula is .in, Used to measure the proportion of key slots in a user query that are covered by evidence. Used to measure the consistency of evidence. This is used to measure whether evidence of actual use has hash traces. If , , and If all thresholds are met, the system outputs a credible answer and cited source. If slots such as "Does intra-city transportation cost require prior approval?" are not covered by evidence, the system indicates insufficient evidence and suggests consulting finance personnel. Finally, the evidence chain hash audit record generation module calculates hashes for user queries, permission summaries, pruning results, candidate evidence, the most consistent evidence subgraph, prompt word summaries, answer results, and conflict resolution results, and then... Generate audit identifiers to enable subsequent traceable review of the evidence source, authorization status, conflict resolution process, and basis of the model's response.
[0037] In summary, in the context of credible Q&A for enterprise employee policies and processes, the system employs multi-source document knowledge unitization, multi-dimensional indexing and conflict evidence graph construction, query parsing and joint pruning, controlled hybrid retrieval, selection of the most consistent evidence subgraph, construction of controlled prompt words, calculation of credible answer confidence, and auditing and recording of evidence chain hashes. This ensures that the answers employees receive possess both the convenience of natural language interaction and the credible characteristics of clear evidence sources, correct version timeliness, compliant permission scope, explainable conflict handling, and auditable answering process. This effectively addresses common problems in enterprise knowledge base Q&A, such as misuse of outdated policies, contradictory evidence, untraceable answers, and model illusions.
[0038] Example 2: Enterprise managers generate compliance business plans and audit record reports based on multi-department knowledge bases.
[0039] When enterprise managers are advancing customer data access projects, they submit complex business requests through the system's interactive interface. For example, they might input, "Based on existing information security policies, customer contracts, data classification and grading standards, project delivery standards, and historical audit opinions, generate a data access compliance checklist, risk management recommendations, and a subsequent audit record report for this project." This request differs from a typical Q&A session, usually involving multiple departmental documents, various rule parameters, multiple contractual obligations, and the applicability of different versions of policies. The system simultaneously obtains the manager's user identity, project permissions, organizational level, accessible document scope, project number, customer name, data type, planned launch time, and query time, forming query constraint information. This scenario requires the system not only to identify relevant policy clauses but also to determine whether contractual requirements conflict with internal policies, whether historical audit opinions remain valid, and whether risk management recommendations are supported by sufficient evidence. After generating the final report, it must create a verifiable chain of evidence audit records, such as... Figure 2 As shown.
[0040] The enterprise document access and knowledge unitization module integrates multi-source enterprise documents for this project, including information security management systems, data classification and grading specifications, external data access management methods, customer contracts and supplementary agreements, project implementation plans, interface design specifications, delivery and acceptance standards, historical audit reports, rectification closure records, risk event databases, and structured task data from the project management system. The system parses, segments, and standardizes these documents, converting data usage restrictions in contracts, approval requirements in regulations, interface fields in project plans, problem descriptions in audit reports, and handling measures in rectification records into knowledge units. Each knowledge unit carries the source file, document number, version number, publishing department, effective date, expiration date, applicable objects, security classification, project tag, customer tag, and evidence fragment hash. For example, "Customer data shall not be used for model training other than those stipulated in the contract," "External data access requires approval from the information security department," "Sensitive data transmission must use an encrypted channel," and "Security testing and log retention must be completed before going live" are each treated as an independent knowledge unit. For different expressions such as "customer data access," "third-party data exchange," and "external data transmission," the system unifies them into corresponding business tags through semantic mapping. For situations where multiple versions of the same policy exist or supplementary agreements exist within the same customer contract, the system establishes version substitution and referencing relationships to avoid mixing old and new clauses when generating reports later. The multi-dimensional index and conflict evidence graph construction module builds vector indexes, keyword indexes, timeliness indexes, permission indexes, metadata indexes, and conflict evidence graphs based on knowledge unit sets. Vector indexes are used to recall knowledge units semantically similar to "data access compliance," "customer contract restrictions," and "sensitive data transmission"; keyword indexes are used to accurately target key rules such as "approval," "encryption," "log retention," "usage restrictions," and "online acceptance"; timeliness indexes are used to determine whether the policy is valid at the project's planned launch time; permission indexes are used to ensure that managers can only access contracts, audits, and security documents within their project scope and job level; metadata indexes are used to filter evidence based on customer name, project number, data level, issuing department, and document type. The conflict evidence graph records conflict edges, supporting edges, referencing edges, repeal edges, and substitution edges between knowledge units. For example, when the data retention period stipulated in a customer contract is inconsistent with the company's general policy, the system creates a parameter conflict edge; when a customer's supplementary agreement replaces the original contract appendix, the system creates a replacement edge; when the information security policy cites data classification and grading standards, the system creates a citation edge; when the old version of the access process is abolished by the new version, the system creates an abolishment edge. Through this graph, the system can proactively identify the relationships between evidence before generating complex reports, rather than simply stacking and retrieving fragments.
[0041] The user query parsing and retrieval pre-retrieval joint pruning module breaks down the questions input by managers into multiple sub-tasks, including contractual obligation identification, internal system application, data level confirmation, approval process inspection, technical control requirements, reuse of historical audit risks, generation of rectification suggestions, and audit record keeping. The system extracts a set of key slots. This includes customer name, project number, data type, data level, access method, launch date, applicable policies, approval department, risk category, and output report type. The system then performs a combined time-based and permission-based pruning: first utilizing... Determine if the current user can see the knowledge unit. Exclude unauthorized contract attachments, sensitive audit details, or other project materials; reuse The system determines whether a knowledge unit is valid at the time of query or project launch, excluding obsolete policies and invalid processes. Finally, it combines project metadata to retain knowledge units relevant to the customer, project, data type, and report type, outputting a jointly pruned evidence candidate space. This step ensures that subsequent compliance reports generated by the model will not overstep their authority or include inapplicable or invalid rules in their conclusions. A controlled hybrid retrieval and consistent evidence selection module comprehensively scores the jointly pruned knowledge units. The system first bases its decisions on… Calculate semantic similarity to identify the knowledge unit that is semantically closest to the "Data Access Compliance Checklist" and "Risk Handling Recommendations"; then utilize length-normalized... The formula calculates keyword matching score, giving clauses containing key terms such as "sensitive data," "encrypted transmission," "approval records," "log retention," and "contract usage restrictions" a higher matching score; it also calculates source authority based on the issuing department, document type, version status, and effective status. Timeliness score For example, officially released information security policies, original client contracts, and archived audit opinions have higher authority than historical Q&As or personal experience documents; currently valid documents score higher in timeliness than historical versions. For knowledge units with potential conflicts, the system... Calculate a conflict risk score to quantify parameter conflicts, version conflicts, or scope conflicts between contractual terms and internal regulations. Then, based on... Calculate the composite score of candidate evidence. In this scenario, this formula balances "relevance" and "credibility": While a historical audit opinion may be highly relevant to the issue, if it has been superseded by rectification and closure records or conflicts with the latest regulations, then... A higher score will lower the overall score; while mutually supporting clauses in the original contract, existing systems, and project plan will be lowered. , and Those with higher scores are included in the priority candidate set.
[0042] Based on the candidate evidence set, the system constructs a candidate evidence subgraph. And select through the objective function of the maximum consistency evidence subgraph Objective function synthesis It supports edge weights, reference edge weights, conflict edge penalties, and deprecation penalties, and satisfies... Constraints. Their function is to select a set of evidence from multiple sources that is consistent, can be cited simultaneously, has a controllable length, and is visible to the current user. For example, if a client contract requires "data retention not to exceed six months," while general corporate policy allows "retention within one year," the system will select a set of evidence based on conflict edge weights. Identify parameter conflicts and, in accordance with the principles of contract priority, scope priority, and risk control, use client contract terms as primary evidence and corporate policies as general background or conflict explanation; if the old version of the security approval process and the new version are recalled simultaneously, the process will be abolished and penalized. This will prompt the system to exclude old processes. Conflict edge weights. The system further refines and quantifies conflict types, version differences, scope of application differences, and parameter differences, enabling it to explain the source of conflicts. If the consistency score of the subgraph of the most consistent evidence is insufficient, the system does not directly generate a final report, but instead outputs a manual review prompt: "The contract retention period differs from the company's general policy and requires legal confirmation."
[0043] The controlled cue word construction and credible answer generation module allocates the cue word evidence budget based on the maximum consistency evidence subgraph G. For the ... Each knowledge unit, budget In this embodiment, the formula allocates more space to knowledge units with high evidence scores, low conflict risk, and extensive coverage of key slots. For example, clauses in customer contracts regarding data usage, retention periods, and security measures, as well as clauses in information security policies regarding approval, encryption, logging, and acceptance, will receive a larger budget. Historical audit opinions used only for background information or conflict explanations will receive a smaller budget. The controlled prompts constructed by the system include a user question summary, an administrator permission summary, the content of the most consistent evidence subgraph, the source of citation, version number, effective date, conflict detection results, the reason for excluding excluded evidence, and answer generation constraints. The constraints require the large language model to be based only on... The generated report should not cite materials that exceed authority, expired materials, or conflicting evidence. When evidence is insufficient, it should be marked as "cannot be determined" or "requires manual review".
[0044] The large language model generates compliant business solutions under controlled prompts, including project overview, applicable policy basis, customer contractual obligations, data access checklist, approval material checklist, technical control requirements, risk level, risk handling suggestions, responsible department, completion deadline, and items requiring manual confirmation. For example, the system outputs that data access must be completed before data can be integrated, including data classification and grading confirmation, information security approval, customer authorization scope verification, encrypted transmission configuration, access control, log retention plan, and pre-deployment security testing. For clauses in customer contracts that explicitly restrict data usage, the system generates a risk warning: "Customer data shall not be used for training, analysis, or sublicensing outside of the contractual agreement." For matters where there are parameter differences between the contract and the company's general policies, the system includes them in the conflict explanation and recommends legal review. Each check item in the report is accompanied by the source document, clause number, version number, and evidence fragment hash, enabling managers to trace the basis of each recommendation.
[0045] The system then calculates the confidence level of the credible answer. .in, This represents the average score of the knowledge units in the most consistent evidence subgraph, used to reflect the overall quality of the evidence; Indicates evidence coverage, used to determine whether key areas such as customer name, data type, approval process, contractual obligations, and risk management are covered by evidence; Indicates the consistency of evidence and is used to assess whether any conflicts remain in the most consistent evidence subgraph. This indicates the traceability and completeness of evidence, and is used to confirm whether all the evidence actually used in the report has been hashed. Indicates residual conflict risk; U_miss indicates the proportion of critical slots not covered. If , , and The system outputs a trusted report and cited sources; if the data level cannot be confirmed from the project documentation, resulting in... If the level increases, the system will output a message stating "Insufficient data level evidence; project data list needs to be supplemented." If there are unresolved conflicts between the contract and regulations, leading to... If the report is insufficient, the system will output a conflict explanation and trigger a manual review process. Therefore, the formula is not only used for formal scoring, but also directly determines whether the report is officially output, includes risk warnings, or proceeds to manual review.
[0046] The evidence chain hash audit log generation module tracks the entire process after report generation. The system calculates hash values for user queries, permission summaries, joint pruning results, candidate evidence sets, the most consistent evidence subgraph, controlled prompt word summaries, trusted answers, citation sources, and conflict resolution results, and then processes these values according to... Generate an evidence chain hash audit identifier. Among them, Corresponding to the original query, Summary of corresponding permissions. Corresponding to the combined pruning results, Corresponding candidate evidence, Corresponding to the largest consistent evidence subgraph, Corresponding controlled prompt word summary, Corresponding answer results Corresponding conflict resolution results To generate a timestamp, This is the system version number. This audit identifier, along with the complete audit log, is stored in the evidence chain hash audit database. If the internal audit department, legal department, or project manager needs to review the report subsequently, the system can reconstruct the knowledge unit used, permission status, timeliness status, conflict resolution process, prompt summary, and answer basis based on the audit log, verifying whether the report was generated based on visible, valid, consistent, and traceable evidence.
[0047] In summary, in scenarios where enterprise managers generate compliance business plans and audit log reports, the system organizes enterprise knowledge scattered across systems, contracts, project plans, and audit records into a controllable, searchable, and verifiable chain of evidence through steps such as enterprise document access and knowledge unitization, multi-dimensional indexing and conflict evidence graph construction, query parsing and pre-retrieval joint pruning, controlled hybrid retrieval and selection of maximum consistency evidence, controlled prompt word construction and credible answer generation, and evidence chain hash audit record generation. The relevant formulas respectively perform functions such as semantic relevance measurement, keyword matching calculation, conflict risk quantification, comprehensive ranking of candidate evidence, optimization of consistent evidence subgraphs, prompt word evidence budget allocation, credible answer confidence judgment, and audit identifier generation. This ensures that the compliance reports generated by the system possess both the automated generation capabilities of a large language model and enterprise-level credible characteristics such as evidence consistency, traceable sources, compliant permissions, explainable conflicts, and full-process auditability.
[0048] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A trusted retrieval and enhancement generation system for enterprise knowledge bases, characterized in that, The system includes: The Enterprise Document Access and Knowledge Unitization Module is used to access multi-source heterogeneous document data within an enterprise, and to parse, segment, unify the format, annotate metadata, and process knowledge units for the multi-source heterogeneous document data within the enterprise to form a set of enterprise knowledge units. The multidimensional index and conflict evidence graph construction module is used to construct time interval index, permission bitmap index, text vector index and keyword index based on the enterprise knowledge unit set, and construct conflict evidence graph based on version relationship, scope relationship, rule parameter relationship and evidence conflict relationship between knowledge units; The user query parsing and pre-retrieval joint pruning module is used to receive user query input, perform semantic parsing, query vector generation and query constraint extraction on user query, obtain query constraint information including query time, user identity, user role, department and access level, and perform time-period-permission joint pruning on the enterprise knowledge unit set before performing vector retrieval. The controlled hybrid retrieval and consistent evidence selection module is used to perform vector retrieval, keyword retrieval and source authority calculation on the jointly pruned knowledge units to obtain a set of candidate evidence, and select the largest consistent evidence subgraph from the candidate evidence set based on the conflict evidence graph. The controlled prompt word construction and credible answer generation module is used to construct controlled prompt words based on the maximum consistency evidence subgraph, input the controlled prompt words into the large language model, generate credible answers, and output the citation source, document version and effective information corresponding to the credible answers; The Evidence Chain Hash Audit Record Generation Module is used to generate evidence chain hash audit records for user queries, query constraint information, joint pruning results, candidate evidence sets, maximum consistent evidence subgraphs, controlled prompt words, credible answers, and conflict resolution results.
2. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, The enterprise document access and knowledge unitization module accesses multi-source heterogeneous document data from within the enterprise, including one or more of the following: enterprise policy documents, process specification documents, contract templates, project documents, meeting minutes, technical specifications, product manuals, FAQ documents, historical work order records, operation and maintenance manuals, compliance documents, audit documents, announcements and notices, and structured data exported from business systems. The specific parsing, segmentation, format unification, metadata annotation, and knowledge unitization processing involves: extracting the main text, identifying chapters, parsing tables, identifying clauses, and extracting attachment content from documents of different formats; segmenting the document content according to chapter level, semantic integrity, clause boundaries, and a preset text length threshold; uniformly converting the segmented text fragments into structured knowledge units, and annotating each knowledge unit with document number, knowledge unit number, document name, publishing department, version number, publishing time, effective time, expiration time, applicable objects, security level, access role, main text content, and evidence fragment hash.
3. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, In the multidimensional index and conflict evidence graph construction module, the specific content of constructing the time-limited index, permission bitmap index, text vector index, and keyword index is as follows: The time-limited index is constructed based on the effective time and expiration time of each knowledge unit, and is used to determine whether the knowledge unit is in a valid state at the time of user query; The permission bitmap index is constructed based on the security level, access role, department, job level, and applicable object of each knowledge unit, and is used to determine whether the current user has the permission to access the corresponding knowledge unit; The text vector index converts the main text of knowledge units into text vectors through an embedding model to support semantic similarity retrieval; the keyword index is constructed based on the title, clause number, business keywords, entity name and rule parameters in the knowledge unit to support exact matching and mixed retrieval.
4. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, In the multidimensional index and conflict evidence graph construction module, the specific content of constructing the conflict evidence graph is as follows: extract rule quintuples from enterprise knowledge units, wherein the rule quintuples include subject, condition, action, parameter and exception; The nodes in the conflict evidence graph are knowledge units, and the edges include conflict edges, substitution edges, supporting edges, reference edges, and obsolete edges, which are used to represent conflict relationships, version substitution relationships, evidence supporting relationships, document reference relationships, and obsolete relationships between knowledge units.
5. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, The user query parsing and retrieval pre-joint pruning module specifically performs semantic parsing, query vector generation, and query constraint extraction on user queries as follows: it performs word segmentation, entity recognition, intent recognition, and rule slot extraction on the natural language query input by the user to obtain the query topic, business matter, time conditions, applicable objects, and question type; and it converts the user query into a query vector through an embedding model. Based on user login information, organizational structure information, job information, and access control information, query constraint information is generated; wherein, the question types include one or more of the following: policy query, process query, contract clause query, technical specification query, fault handling query, project document query, and compliance rule query.
6. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 4, characterized in that, In the user query parsing and retrieval pre-joint pruning module, the specific content of the time-permission joint pruning is as follows: based on the query time, filter knowledge units that meet the current valid conditions in the time-permission interval index to obtain a time-permission valid knowledge set; based on the user role, department, job level and access security level, filter knowledge units that the current user can access in the permission bitmap index to obtain a permission-visible knowledge set. The intersection of the time-sensitive valid knowledge set and the permission-visible knowledge set is used to obtain the initial controlled knowledge set; Based on the replacement and obsolescence edges in the conflict evidence graph, knowledge units that have been replaced by new versions, obsolescence, or are not applicable to the current query conditions are removed from the initial controlled knowledge set to obtain a jointly pruned knowledge unit set; wherein, the time-sensitivity-permission joint pruning occurs before vector retrieval to prevent expired knowledge units and unauthorized knowledge units from entering the subsequent retrieval and prompt word construction process.
7. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, In the controlled hybrid retrieval and consistent evidence selection module, the specific content of performing vector retrieval, keyword retrieval, and source authority calculation on the jointly pruned knowledge units is as follows: Semantic similarity is calculated based on the query vector and the knowledge unit text vector; keyword matching degree is calculated based on keywords, entity names, clause numbers, and rule parameters in the user query; source authority and timeliness scores are calculated based on the publishing department, document type, version status, and effective status of the document to which the knowledge unit belongs; and conflict risk scores are calculated based on the number of conflict edges, conflict type, and conflict intensity related to the knowledge unit in the conflict evidence graph. Wherein, let the user query be... The first after joint pruning Each knowledge unit is The query vector is The knowledge unit text vector is Then semantic similarity Represented as: Keyword matching degree The term weights are calculated using length-normalized term weights, and are expressed as follows: in, To query terms that are shared with knowledge units, Inverse document frequency of terms, For terms In knowledge unit Frequency of occurrence in For the length of the knowledge unit, The average length of a knowledge unit. and To adjust parameters; conflict risk score Represented as: in, In the conflict evidence map and knowledge unit The set of connected conflicting edges. It is a conflict edge type. Weights corresponding to the conflict type, The strength of the conflict edge; the overall score of candidate evidence. Represented as: in, For knowledge units The overall score of candidate evidence, The Sigmoid normalization function, This represents the normalized keyword matching score. To ensure the authority of the source, Score based on timeliness. For metadata matching degree, To score the conflict risk, These are the weighting coefficients.
8. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, In the controlled hybrid retrieval and consistent evidence selection module, the specific content of selecting the largest consistent evidence subgraph from the candidate evidence set based on the conflict evidence graph is as follows: using knowledge units in the candidate evidence set as candidate nodes, extracting conflict edges, substitution edges, supporting edges, reference edges, and obsolete edges related to the candidate nodes from the conflict evidence graph to form a candidate evidence subgraph; let the candidate evidence subgraph be: in, For the set of candidate knowledge unit nodes, For the set of conflicting edges, To support edge sets, For the reference edge set, For the set of obsolete edges; for each candidate knowledge unit Set selection variables ,in Representing knowledge units Selected for the largest consensus evidence subgraph This indicates that the sample was not selected; therefore, the maximum consistency evidence subgraph is used. The objective function to be selected is: And satisfy the constraints: in, For knowledge units The overall score of candidate evidence, To support edge weights, For reference edge weights, For conflict edge weights, To abolish the penalty weight, For knowledge units The length of the text. The maximum allowed length of evidence for the prompt words. Indicates the current user Knowledge Units The function with the required permissions is visible. Representing knowledge units During the query time The following is a time-efficiency function; where the conflict edge weights are... Calculated based on conflict type, version differences, applicable scope differences, and parameter differences, and expressed as follows: in, For conflict type intensity, Based on the strength of version conflicts, To determine the scope and intensity of conflict, For the conflict strength of the rule parameters, The weighting coefficient is used; when the maximum consistent evidence subgraph satisfies the consistency score being greater than the preset consistency threshold, it is used as the evidence source for the controlled prompt word; otherwise, a conflict prompt or manual review process is triggered.
9. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, In the controlled prompt word construction and credible answer generation module, the specific content of constructing controlled prompt words and generating credible answers is as follows: Based on the maximum consistency evidence subgraph, extract the allowed citations of knowledge unit text, source file, document number, version number, publishing department, effective date, expiration date, applicable objects, security classification level, and evidence fragment hash; according to the comprehensive candidate evidence score, conflict risk score, evidence coverage, and prompt word length constraints of the knowledge unit, allocate prompt word evidence budgets to each knowledge unit in the maximum consistency evidence subgraph, wherein the... Evidence budget for each knowledge unit Represented as: in, For knowledge units The available length budget in controlled prompt words The maximum evidence length for the prompt words. The overall score for candidate evidence. To score the conflict risk, The evidence coverage of the knowledge unit for the user's question. For the subgraph of the most consistent evidence, To prevent smoothing factors with zero denominators, the controlled prompt words include a user question summary, a user permission summary, the content of knowledge units in the maximum consistency evidence subgraph, the citation source, version number, effective time, conflict detection result, the reason for excluding excluded evidence, and answer generation constraints. The answer generation constraints include: generating answers only based on knowledge units in the maximum consistency evidence subgraph, not citing unauthorized knowledge units, not citing invalid knowledge units, not mixing conflicting evidence content, outputting an "indetermined" prompt when evidence is insufficient, and outputting a conflict explanation when historical conflicts exist. The controlled prompt words are input into a large language model to generate a credible answer, and the confidence level of the credible answer is further calculated. The confidence level of the credible answer Represented as: in, Confidence level for a credible answer The Sigmoid normalization function, The average of the comprehensive scores of knowledge units in the subgraph of maximum consistency evidence. For evidence coverage, For consistency of evidence, For the sake of traceability and completeness of evidence, For the risk of residual conflict, The percentage of key slots not covered. For weighting coefficients; where the evidence coverage is... Represented as: in, This is a set of key slots extracted from user queries. This represents the set of slots covered by evidence in the maximum consistency evidence subgraph. As a smoothing factor; the consistency of the evidence Represented as: in, The set of conflicting edges remaining in the subgraph of maximum consistency evidence. The set of all conflict edges corresponding to the candidate evidence set. and Choose variables for knowledge units. The conflict edge weights; the traceability and completeness of the evidence. Represented as: in, The set of evidence actually used to generate a credible answer. The set of evidence for which evidence fragments have been generated and hashed; when , , and When the threshold is reached, output a credible answer and cited sources; when any indicator fails to reach the corresponding threshold, output a message indicating insufficient evidence, a conflict explanation, or a manual review prompt; among these, The confidence threshold for a credible answer. This is the threshold for evidence coverage. The threshold for evidence consistency. The threshold for the traceability and completeness of evidence.
10. The enterprise knowledge base trusted retrieval enhancement generation system according to claim 1, characterized in that, The evidence chain hash audit record generation module generates the following specific content for each evidence chain hash audit record: calculating hash values for user queries, query constraint information, joint pruning results, candidate evidence sets, maximum consistent evidence subgraphs, controlled prompt word digests, credible answers, citation sources, and conflict resolution results; concatenating these hash values in a preset order and recalculating the total hash to form an evidence chain hash audit identifier; the evidence chain hash audit record includes user query hash, permission digest hash, pruning result hash, candidate evidence hash, maximum consistent evidence subgraph hash, prompt word digest hash, answer result hash, conflict resolution result hash, generation timestamp, and system version number; wherein, the evidence chain hash audit identifier... Represented as: in, Query hash for user For permission digest hash, For the hash of the joint pruning results, For candidate evidence hash, For the hash of the subgraph of maximum consistency evidence, For controlled prompt word digest hash, To answer the result hash, For the hash of the conflict resolution result, To generate a timestamp, This is the system version number. This indicates string concatenation. The hash function is represented; the evidence chain hash audit record is used to restore the knowledge unit, permission status, timeliness status, joint pruning results, conflict handling process, maximum consistency evidence subgraph, controlled prompt word summary and answer generation basis of the credible answer in the subsequent review process.