Enterprise knowledge question and answer analysis method and system based on large model
Patent Information
- Application Number
- CN202610492389.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2046-04-15
AI Technical Summary
[0005]本申请实施例通过提供基于大模型的企业知识问答分析方法及系统,解决了现有技术中文档固定切割方式导致检索结果内容不完整、大语言模型在无法感知材料缺失的情况下调用自身通用知识填补空白从而生成与企业实际业务规定不符的答案、且现有质量检验机制无法识别此类错误的问题,实现了对检索结果语义覆盖完整性的自动评估与定向补全,并在内容仍存在缺口时约束大语言模型如实告知用户而非推断填补,从而提升企业知识问答答案的准确性与可信度
[0055]通过在初步检索完成后、答案生成前引入独立的语义覆盖评估与定向补全处理流程,能够主动识别检索结果在内容上存在的信息空缺,并针对空缺部分发起定向补充检索,使最终送入大语言模型的参考材料在内容覆盖上更为完整,从而改善了现有技术中因文档切割方式固化而导致检索结果遗漏关键内容的问题,避免大语言模型在信息不足的情况下被迫依赖自身储备知识填补空白、生成与企业实际业务规定不符的答案内容。
Smart Images

Figure CN122364388B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for enterprise knowledge question answering analysis based on large models. Background Technology
[0002] Enterprises accumulate a large amount of business knowledge scattered across various documents such as contracts, operating procedures, approval systems, and product manuals during their daily operations. Employees often need to repeatedly consult multiple documents to obtain complete information when dealing with actual business problems, resulting in low information retrieval efficiency. The emergence of enterprise knowledge question-answering technology based on large language models offers a new approach to solving this problem. This technology segments enterprise documents into text blocks and creates vector indexes. When a user asks a question, relevant text blocks are retrieved and fed into a large language model to generate the answer, achieving automated question-answering processing of internal enterprise knowledge.
[0003] However, existing enterprise knowledge question-answering methods have significant shortcomings in practical implementation. When building knowledge indexes, existing technologies use fixed character lengths or natural paragraph boundaries to segment documents. For cross-paragraph content commonly found in enterprise business documents—such as the correlation between payment terms and liability for breach of contract scattered across multiple clauses in a purchase contract, or the complete operation process description spanning several paragraphs in equipment operation specifications—the fixed segmentation method forcibly splits semantically dependent content into different text blocks.
[0004] When employees ask questions about the above content, the retrieval process can only hit some text blocks based on vector similarity, missing other related content that is equally relevant to the question. This results in incomplete reference materials being sent to the large language model. More seriously, after receiving incomplete reference materials, the large language model cannot perceive the missing information itself and tends to use its general knowledge developed during training to fill in the gaps. This leads to the generated answers containing content inconsistent with the company's actual business regulations. Existing answer quality inspection mechanisms cannot distinguish between these "reasonable inferences based on incomplete materials" and normal answers. As a result, incorrect answers are presented to users without being noticed, causing misleading situations in sensitive business scenarios involving approval authority, reimbursement standards, and operational procedures, and affecting the accuracy of business decisions. Summary of the Invention
[0005] This application provides a method and system for enterprise knowledge question answering based on a large model. It solves the problems in the prior art where fixed document segmentation methods lead to incomplete search results, large language models cannot detect missing materials and call on their own general knowledge to fill in the gaps, thus generating answers that do not conform to the actual business requirements of enterprises, and existing quality inspection mechanisms cannot identify such errors. It realizes automatic evaluation and targeted completion of the semantic coverage of search results, and when there are still gaps in the content, it constrains the large language model to truthfully inform the user rather than inferring to fill in the gaps, thereby improving the accuracy and credibility of enterprise knowledge question answering answers.
[0006] This application provides an enterprise knowledge question answering analysis method based on a large model, including: receiving query text and performing preliminary vector retrieval to obtain a set of candidate text blocks;
[0007] The query text is subjected to semantic structure analysis to construct a list of semantic dimensions;
[0008] Based on the semantic dimension list, obtain the dimension query vector, perform similarity calculation, and distinguish between the covered dimension set and the uncovered dimension set in the semantic dimension list;
[0009] If the set of uncovered dimensions is not empty, use the description of the uncovered dimensions as the query input to obtain the new text block;
[0010] The newly added text block is appended to the candidate text block set, and the similarity calculation is re-executed until the uncovered dimension set is empty or the preset iteration stop condition is reached, to obtain the final candidate text block set;
[0011] Based on the final candidate text block set and the current state of the uncovered dimension set, construct reasoning hint text with integrity status annotation, and perform reasoning to generate structured answer text.
[0012] Furthermore, the steps of receiving the query text and performing preliminary vector retrieval to obtain a set of candidate text blocks include:
[0013] Receive the original query request submitted;
[0014] Perform normalization preprocessing on the original query request;
[0015] Call the pre-configured text embedding encoding interface to encode the query text after normalization preprocessing and generate the corresponding high-dimensional query vector representation;
[0016] The high-dimensional query vector representation is used as the retrieval input and submitted to the vector database to perform a similarity retrieval operation.
[0017] During the execution of the similarity retrieval operation, a similarity score is calculated;
[0018] Result filtering is performed during the calculation of similarity scores;
[0019] The filtered search results list is sorted in descending order based on the calculated similarity scores from highest to lowest.
[0020] According to the descending order, a preset number of search results are extracted sequentially from the first one and merged to form the candidate text block set.
[0021] Furthermore, the steps of performing semantic structure analysis on the query text and constructing a list of semantic dimensions include:
[0022] Construct dedicated semantic dimension recognition prompt text data;
[0023] The assembled semantic dimension recognition prompt text data is sent to the language model to perform inference operations;
[0024] Obtain the set of semantic dimension description entries from the language model inference output;
[0025] A parsing operation is performed on the set of semantic dimension description entries to extract the text of each semantic dimension description and store it as the semantic dimension list corresponding to the current query request.
[0026] Furthermore, the steps for performing similarity calculations to distinguish between the covered and uncovered dimension sets in the semantic dimension list include:
[0027] For each independent semantic dimension description text in the semantic dimension list, the currently processed independent semantic dimension description text is calculated and transformed to generate dimension query vector data.
[0028] Perform similarity calculation to obtain a list of similarity scores between the currently processed independent semantic dimension description text and each candidate text block in the candidate text block set;
[0029] Extract the highest score value from the similarity score record list, and compare the highest score value with the pre-configured dimension matching threshold.
[0030] If the highest score value is higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has been effectively covered by the candidate text block set;
[0031] If the highest score value is not higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has an information coverage gap in the candidate text block set.
[0032] Furthermore, the steps of obtaining new text blocks by using the description of the uncovered dimensions as query input and appending the new text blocks to the candidate text block set include:
[0033] Extract the description text of the uncovered dimensions from the set of uncovered dimensions and use it as input for an independent search query.
[0034] Call the text embedding encoding processing interface to encode and calculate the independent retrieval query input content, and generate complete query vector data;
[0035] The completion query vector data is sent to the vector database, a search operation is performed, and a list of candidate completion text blocks with the highest similarity values is extracted.
[0036] Perform identifier screening and deduplication on the extracted candidate supplementary text block data list, and define the remaining text block data after screening and deduplication as the new text block;
[0037] Perform a set append operation to write the newly added text blocks one by one into the current candidate text block set.
[0038] Furthermore, the steps for constructing reasoning prompt text with integrity status annotations include:
[0039] For each text block data within the final candidate text block set, perform comprehensive matching and sorting score calculation processing logic;
[0040] Retrieve the final comprehensive matching and sorting score record corresponding to each text block data;
[0041] Based on the final comprehensive matching and sorting score results, records are arranged in descending order from largest to smallest. All text block data within the final candidate text block set are then rearranged and recalculated.
[0042] According to the sorted sequence, the text blocks with the highest scores and the preset truncation number are selected and assembled into the final screened text material combination block;
[0043] The final filtered text material combination block and the coverage detection status data of the current uncovered dimension set are formatted and concatenated to generate inference hint text information object data with integrity status annotation.
[0044] Furthermore, the reasoning hint text information object data with integrity status annotations includes:
[0045] The reasoning prompt text information object data includes: role definition control area data, context integrity status annotation area data, context material area data, original query user question area data, and output format specification guidance area data.
[0046] This application provides an enterprise knowledge question-answering analysis system based on a large model, used to implement an enterprise knowledge question-answering analysis method based on a large model, including:
[0047] The module includes: a collection acquisition module, a semantic structure analysis module, a similarity calculation module, a new text block acquisition module, a text block collection acquisition module, and an answer text generation module.
[0048] The set acquisition module is used to receive the query text and perform preliminary vector retrieval to obtain a set of candidate text blocks;
[0049] The semantic structure analysis module is used to perform semantic structure analysis on the query text and construct a list of semantic dimensions;
[0050] The similarity calculation module is used to obtain dimension query vectors based on the semantic dimension list, perform similarity calculation, and distinguish between the covered dimension set and the uncovered dimension set in the semantic dimension list.
[0051] The newly added text block acquisition module is used to acquire newly added text blocks by using the description of the uncovered dimension as query input when the set of uncovered dimensions is not empty;
[0052] The text block set acquisition module is used to append the newly added text block to the candidate text block set and re-execute the similarity calculation until the uncovered dimension set is empty or the preset iteration stop condition is reached, so as to obtain the final candidate text block set.
[0053] The answer text generation module is used to construct reasoning prompt text with integrity status annotation based on the final candidate text block set and the current state of the uncovered dimension set, and to perform reasoning to generate structured answer text.
[0054] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0055] By introducing an independent semantic coverage assessment and targeted completion process after the initial retrieval is completed and before the answer is generated, the system can proactively identify information gaps in the retrieval results and initiate targeted supplementary retrievals for the gaps. This makes the reference materials sent to the large language model more complete in terms of content coverage, thereby improving the problem of missing key content in retrieval results due to the fixed document segmentation method in the existing technology. It also avoids the large language model being forced to rely on its own reserve knowledge to fill the gaps and generate answer content that does not conform to the actual business requirements of the enterprise when there is insufficient information.
[0056] Furthermore, in assessing whether the search results fully cover the user's question, by first analyzing the various independent information needs involved in the user's question itself, and then checking whether the current search results cover each need item by item, the originally general question of whether the search is accurate is transformed into a coverage check process that can be quantified item by item. This allows the existence of information gaps to be clearly determined, rather than relying on manual post-review, thus reducing the probability of inaccurate answers due to content omissions.
[0057] Furthermore, when constructing the input material for the large language model, the coverage status of the current reference material is passed in as explicit information. When there is an information item that cannot be found even after multiple rounds of completion, the large language model is required to truthfully inform the user in the answer that there is currently no reference material available for that part of the information, rather than making inferences about the missing content. This changes the output behavior of the large language model from passively filling in information to actively explaining it when the information is incomplete. This solves the dilemma in the existing technology where the quality control mechanism cannot distinguish between reasonable inferences based on incomplete content and arbitrary generation, which leads to the inability to identify incorrect answers and improves the credibility and traceability of the question-and-answer results. Attached Figure Description
[0058] Figure 1 A flowchart of an enterprise knowledge question-answering analysis method based on a large model provided in this application embodiment;
[0059] Figure 2 This is a schematic diagram of the structure of an enterprise knowledge question-answering analysis system based on a large model, provided in an embodiment of this application. Detailed Implementation
[0060] This application provides a method and system for enterprise knowledge question answering analysis based on a large model. It addresses the problems in existing technologies, such as fixed document segmentation leading to gaps in search results, the inability of large language models to perceive incomplete materials and thus filling in gaps with their own general knowledge, resulting in answers inconsistent with actual business requirements, and the inability of existing quality inspection mechanisms to identify such errors. By analyzing the required information categories item by item based on the user's query after the initial search, verifying the coverage status of each search result, initiating targeted supplementary searches for gaps, and explicitly transmitting the final coverage status to the large language model to constrain its generation behavior, this method achieves automatic identification and on-demand completion of the semantic integrity of search results. It also ensures that when information gaps remain, the large language model fills in the gaps by providing truthful information instead of inferring, thereby improving the accuracy and traceability of answers in enterprise knowledge question answering scenarios.
[0061] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0062] like Figure 1 The diagram shown is a flowchart of an enterprise knowledge question answering analysis method based on a large model provided in this application embodiment. The method is applied to an enterprise knowledge question answering analysis system based on a large model and includes the following steps: receiving query text and performing preliminary vector retrieval to obtain a set of candidate text blocks;
[0063] The query text is input into a language model for semantic structure analysis, and the output is a list of semantic dimensions required to answer the query text.
[0064] Based on the semantic dimension list, vector encoding is performed on each independent semantic dimension description in the semantic dimension list to obtain the dimension query vector. Similarity calculation is performed to calculate the similarity between the dimension query vector and each text block vector in the candidate text block set. Based on the similarity, the covered dimension set and the uncovered dimension set in the semantic dimension list are distinguished.
[0065] If the set of uncovered dimensions is not empty, use the description of the uncovered dimensions in the set of uncovered dimensions as the query input to perform a targeted secondary search to obtain the new text block;
[0066] The newly added text block is appended to the candidate text block set, and the similarity calculation is re-executed. The step of calculating the similarity between the dimension query vector and each text block vector in the candidate text block set is repeated until the uncovered dimension set is empty or the preset iteration stop condition is reached, so as to obtain the final candidate text block set.
[0067] Based on the final candidate text block set and the current state of the uncovered dimension set, a reasoning hint text with integrity status annotation is constructed. The reasoning hint text with integrity status annotation is input into the language model to perform reasoning and generate a structured answer text.
[0068] In this embodiment, the core logic lies in embedding an independent semantic integrity assessment and closed-loop completion mechanism into the conventional retrieval-generation chain. Specifically, after receiving the natural language query text, the server program first performs a preliminary vector retrieval through a vector database to retrieve the first batch of candidate text blocks.
[0069] Subsequently, instead of assembling the context, the original query text is input into the language model (Large Language Model, LLM), and its logical decomposition capability is used to output multiple independent semantic dimensions that are necessary to answer the question (i.e., constructing a list of semantic dimensions).
[0070] Next, the similarity between these decomposed dimensional query vectors and the first batch of candidate text block vectors is calculated in the vector space to measure the completeness of the semantic coverage of the first batch of search results, and automatically divide them into a set of covered dimensions and a set of uncovered dimensions.
[0071] If an uncovered dimension (i.e. a semantic gap) is found, the gap is proactively used as an independent query term to trigger a targeted secondary search, extract the new text block to expand the set, and repeat this evaluation and completion verification process until the semantic gap is closed or the preset circuit breaker mechanism is reached.
[0072] Finally, the final set of candidate text blocks, rigorously verified for completeness, is combined with the current gap state to form reasoning hint text labeled with completeness status. This text is then fed into the language model to generate a structured answer text free of illusions. This end-to-end design fundamentally avoids the problem of missing sexual context caused by document segmentation.
[0073] Furthermore, the steps of receiving the query text and performing preliminary vector retrieval to obtain a set of candidate text blocks include:
[0074] Receive the original query request submitted by the interactive interface;
[0075] The original query request is subjected to normalization preprocessing. The normalization preprocessing process includes removing whitespace characters from the beginning and end of the original query request and extracting filter condition fields containing time range constraints, business category constraints, and document department constraints from the original query request.
[0076] Call the pre-configured text embedding encoding interface to encode the query text after normalization preprocessing and generate the corresponding high-dimensional query vector representation;
[0077] The high-dimensional query vector representation is used as the retrieval input and submitted to the vector database. A similarity retrieval operation is then performed using the approximate nearest neighbor algorithm.
[0078] During the execution of similarity retrieval operations using the approximate nearest neighbor algorithm, the similarity score between the high-dimensional query vector representation and all indexed text block vectors in the knowledge base is calculated.
[0079] During the calculation of similarity scores, the structured metadata constraints indicated by the filtering condition fields are simultaneously applied to the search results to filter the results.
[0080] The filtered search results list is sorted in descending order based on the calculated similarity scores from highest to lowest.
[0081] According to the descending order, a preset number of search results are extracted sequentially from the first one and merged to form the candidate text block set. Each candidate text block in the candidate text block set records the original text content and metadata content data containing source file name information.
[0082] In this embodiment, the process of receiving query text and performing preliminary retrieval is as follows: The front-end interactive interface submits the original query request to the server via the HTTP / HTTPS protocol. After receiving the request, the server calls the string processing function to perform normalization preprocessing, including constructing a candidate text block set using the retrieval results from regular expressions.
[0083] Furthermore, the steps of performing semantic structure analysis on the query text and constructing a list of semantic dimensions include:
[0084] Construct dedicated semantic dimension recognition prompt text data;
[0085] The semantic dimension recognition prompt text data includes a role definition and task description block, a raw query text block, and a structured output format instruction block. The role definition and task description block is used to instruct the language model to perform semantic structure analysis and decomposition of the given query question. The raw query text block is used to present the original content text of the query text without reasoning guidance. The structured output format instruction block is used to instruct the language model to analyze all the independent semantic dimension information that must be present to answer the query text, and requires the language model to output a brief description text of each independent semantic dimension in an enumerated form. Each brief description text is constrained to represent an independent information category branch, and there is no overlap or intersection of text content between the brief description texts. All output items together constitute a complete semantic scope coverage of the query text.
[0086] The assembled semantic dimension recognition prompt text data is sent to the language model to perform inference operations;
[0087] Obtain the set of semantic dimension description entries from the language model inference output;
[0088] A parsing operation is performed on the set of semantic dimension description entries to extract the text of each semantic dimension description and store it as the semantic dimension list corresponding to the current query request. The semantic dimension list serves as the benchmark reference data set for subsequent coverage matching steps.
[0089] In this embodiment, for the construction of the semantic dimension list, the server constructs dedicated semantic dimension recognition prompt text data using string concatenation technology. Specifically, it includes three blocks: the first block is the role definition and task description, injecting instructions through hard-coded strings, such as "You are now a logic analysis expert, and your task is to break down the knowledge dimensions required for the problem; please do not answer the question directly."
[0090] The second block inserts the user query text exactly as it appears, and uses special delimiters (such as ###) for isolation to prevent suggestion injection attacks;
[0091] The third block is the structured output format instruction, which requires the model to be output in the standard JSON array format, defines constraint fields, and declares in the instruction that the dimensions must be mutually exclusive and jointly exhaustive (MECE principle).
[0092] After the prompt text is submitted to the language model via the API, the server receives the string returned by the model and calls a JSON parsing library (such as FastJSON or Jackson) to perform deserialization, extracting an array object containing each independent description. This array is then persistently stored in memory or a Redis cache as the semantic dimension list for the current session. If the language model output does not conform to the JSON format, the server will trigger a regular expression extraction fallback strategy or initiate a single retry.
[0093] Furthermore, the steps for performing similarity calculations to distinguish between the covered and uncovered dimension sets in the semantic dimension list include:
[0094] For each independent semantic dimension description text in the semantic dimension list, the text embedding encoding interface is called sequentially to calculate and transform the currently processed independent semantic dimension description text, generating dimension query vector data corresponding to the independent semantic dimension description text.
[0095] The similarity calculation operation is performed between the dimension query vector data and the stored vector representation of each candidate text block in the candidate text block set, and the similarity score record list between the currently processed independent semantic dimension description text and each candidate text block in the candidate text block set is obtained.
[0096] Extract the highest score value from the similarity score record list, and compare the highest score value with the pre-configured dimension matching threshold.
[0097] If the highest score value is higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has been effectively covered by the candidate text block set, and the currently processed independent semantic dimension description text is added to the covered dimension set for recording.
[0098] If the highest score value is not higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has an information coverage gap in the candidate text block set, and the currently processed independent semantic dimension description text is added to the uncovered dimension set for key marking and recording.
[0099] In this embodiment, the server iterates through the list of semantic dimensions and calls the same text embedding encoding interface to translate the current independent semantic dimension description text into a dimension query vector. .
[0100] Subsequently, calculation The vector of each text block in the candidate text block set The cosine similarity between them is calculated using the following formula:
[0101] ;
[0102] in, This represents a high-dimensional dense vector describing the text after transformation, representing the independent semantic dimensions of the currently processed text. The first one in the candidate text block set The high-dimensional dense vector corresponding to each text block This represents the dot product of two vectors. and These represent the L2 norm (i.e., vector length) of the two vectors. The formula outputs a similarity score. The interval is Since text embedding vectors are usually distributed in the forward space, their actual values are mostly between [0,1].
[0103] After calculating each similarity score, extract the maximum value. and match it with a preset dimension matching threshold. Compare them. To initialize the floating-point parameters in the configuration file (the recommended value range is 0.65 to 0.85, depending on the feature space density of the embedded model).
[0104] like If the dimension is not covered, it is determined that the dimension has been covered and recorded in the covered dimension set; otherwise, it is determined that a semantic gap exists and recorded in the uncovered dimension set. (Reserved) The adjustable space allows for flexible adaptation to different companies' knowledge bases based on their level of expertise.
[0105] Furthermore, the steps of obtaining new text blocks by using the description of the uncovered dimensions as query input and appending the new text blocks to the candidate text block set include:
[0106] Extract the description text of the uncovered dimensions from the set of uncovered dimensions and use it as input for an independent search query.
[0107] Call the text embedding encoding processing interface to encode and calculate the independent retrieval query input content, and generate complete query vector data;
[0108] The completion query vector data is sent to the vector database, a search operation is performed, and a list of candidate completion text blocks with the highest similarity values is extracted.
[0109] Perform identifier screening and deduplication on the extracted candidate supplementary text block data list, identify and delete data entries in the candidate supplementary text block data list that have duplicate identifiers with existing text block identifiers in the current candidate text block set, and define the remaining text block data after screening and deduplication as new text blocks.
[0110] The set append operation is performed to write the newly added text blocks one by one into the current candidate text block set, thereby completing the targeted data expansion and completion processing logic task of the context material set.
[0111] In this embodiment, when an uncovered dimension exists, the server initiates a targeted secondary search. The text of the uncovered dimension (since its description is usually highly focused, such as a list of materials required for reimbursement) is extracted, encoded into a completion query vector, and a Top-down query is initiated in the vector database. ( The preferred method is to search using 3 to 5 methods.
[0112] To prevent data redundancy from wasting large model context tokens, a strict identifier deduplication process must be performed. Specifically, the server maintains a hash set (HashSet) containing the unique identifiers (UUIDs or MD5 hashes of document content) of currently retrieved text blocks. For each candidate supplementary text block returned by the secondary retrieval, its identifier is extracted and compared in the HashSet. If a match is found (i.e., it already exists), it is discarded; if no match is found, it is considered a new text block, and it is not only appended to the end of the candidate text block set but its identifier is also updated in the HashSet. This logic ensures the efficiency of the completion operation and the inefficient use of memory.
[0113] Furthermore, the steps for constructing reasoning prompt text with integrity status annotations include:
[0114] For each text block data within the final candidate text block set, a comprehensive matching and ranking score calculation processing logic is executed. The comprehensive matching and ranking score calculation processing logic combines the preliminary search cosine similarity score between each text block data and the original query vector data, as well as the dimension matching similarity score when each text block data is marked as covering a certain independent semantic dimension.
[0115] Based on the initial search cosine similarity score and dimension matching similarity score, a weighted summation calculation is performed according to the pre-configured weighting parameters to obtain the final comprehensive matching ranking score record for each text block data.
[0116] Based on the final comprehensive matching and sorting score results, records are arranged in descending order from largest to smallest. All text block data within the final candidate text block set are then rearranged and recalculated.
[0117] According to the sorted sequence, the text blocks with the highest scores and the preset truncation number are selected and assembled into the final screened text material combination block;
[0118] The final filtered text material combination block and the coverage detection status data of the current uncovered dimension set are formatted and concatenated to generate inference hint text information object data with integrity status annotation.
[0119] In this embodiment, after iterative completion (typically the maximum number of iterations is set to 2 to 3 to prevent infinite loops), to ensure that the most critical information input to the large model is ranked first, a comprehensive matching and ranking score is calculated. The comprehensive score calculation formula is as follows:
[0120] ;
[0121] in, This represents the final comprehensive matching and ranking score for a certain text block. The cosine similarity score between this text block and the user's original query text vector. This is the highest cosine similarity score between the text block and a semantic dimension vector that it covers during the previous coverage matching process (if no specific dimension is covered, this value is 0 or a basic minimum value). and These are weighted parameters, and they satisfy... In typical scenarios, to balance the overall relevance of the problem with the accuracy of the missing segments, the preferred parameter setting is... , .
[0122] After the calculation is complete, apply the following to all text blocks: Reorder in descending order and truncate the first few digits. One (e.g.) The materials are assembled into a final selection of text materials and sent to the subsequent assembly stage.
[0123] Furthermore, the reasoning hint text information object data with integrity status annotations includes:
[0124] The reasoning prompt text information object data includes: role definition control area data, which is used to constrain the instruction language model to strictly follow the content range provided by the context material and to prohibit the generation of answers from referencing external parameterized knowledge;
[0125] Context integrity status annotation region data is used to explicitly declare to the language model the semantic scope coverage status of the currently provided contextual material;
[0126] Contextual material area data is used to fully present the original text string content of each text block data in the final filtered text material combination block, and to attach the corresponding source file name identifier and the chapter title identifier information to each text block data;
[0127] The original query user question area data is used to present the original, unmodified query text request content data submitted by the user;
[0128] The output format specification guides the data area and is used to specify the organization, layout, and presentation of the final output answer content of the language model.
[0129] like Figure 2The diagram shown is a structural schematic of the enterprise knowledge question answering analysis system based on a large model provided in this application embodiment. The enterprise knowledge question answering analysis system based on a large model provided in this application embodiment includes: a set acquisition module, a semantic structure analysis module, a similarity calculation module, a new text block acquisition module, a text block set acquisition module, and an answer text generation module.
[0130] The set acquisition module is used to receive the query text and perform preliminary vector retrieval to obtain a set of candidate text blocks;
[0131] The semantic structure analysis module is used to perform semantic structure analysis on the query text and construct a list of semantic dimensions;
[0132] The similarity calculation module is used to obtain dimension query vectors based on the semantic dimension list, perform similarity calculation, and distinguish between the covered dimension set and the uncovered dimension set in the semantic dimension list.
[0133] The newly added text block acquisition module is used to acquire newly added text blocks by using the description of the uncovered dimension as query input when the set of uncovered dimensions is not empty;
[0134] The text block set acquisition module is used to append the newly added text block to the candidate text block set and re-execute the similarity calculation until the uncovered dimension set is empty or the preset iteration stop condition is reached, so as to obtain the final candidate text block set.
[0135] The answer text generation module is used to construct reasoning prompt text with integrity status annotation based on the final candidate text block set and the current state of the uncovered dimension set, and to perform reasoning to generate structured answer text.
[0136] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0137] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0138] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0139] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0141] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A large-scale enterprise knowledge question-answering analysis method, characterized in that, Includes the following steps: Receive the query text and perform preliminary vector retrieval to obtain a set of candidate text blocks; The query text is subjected to semantic structure analysis to construct a list of semantic dimensions; Based on the semantic dimension list, obtain the dimension query vector, perform similarity calculation, and distinguish between the covered dimension set and the uncovered dimension set in the semantic dimension list; If the set of uncovered dimensions is not empty, use the description of the uncovered dimensions as the query input to obtain the new text block; The newly added text block is appended to the candidate text block set, and the similarity calculation is re-executed until the uncovered dimension set is empty or the preset iteration stop condition is reached, to obtain the final candidate text block set; Based on the final candidate text block set and the current state of the uncovered dimension set, construct reasoning hint text with integrity status annotation, and perform reasoning to generate structured answer text; The steps to construct reasoning hint text with integrity status annotations include: For each text block data within the final candidate text block set, perform comprehensive matching and sorting score calculation processing logic; Retrieve the final comprehensive matching and sorting score record corresponding to each text block data; Based on the final comprehensive matching and sorting score results, records are arranged in descending order from largest to smallest. All text block data within the final candidate text block set are then rearranged and recalculated. According to the sorted sequence, the text blocks with the highest scores and the preset truncation number are selected and assembled into the final screened text material combination block; The final filtered text material combination block and the coverage detection status data of the current uncovered dimension set are formatted and concatenated to generate inference hint text information object data with integrity status annotation.
2. The enterprise knowledge question-answering analysis method based on a large model as described in claim 1, characterized in that, The steps for receiving the query text and performing preliminary vector retrieval to obtain a set of candidate text blocks include: Receive the submitted original query request; Perform normalization preprocessing on the original query request; Call the pre-configured text embedding encoding interface to encode the query text after normalization preprocessing and generate the corresponding high-dimensional query vector representation; The high-dimensional query vector representation is used as the retrieval input and submitted to the vector database to perform a similarity retrieval operation. During the execution of the similarity retrieval operation, a similarity score is calculated; Result filtering is performed during the calculation of similarity scores; The filtered search results list is sorted in descending order based on the calculated similarity scores from highest to lowest. According to the descending order, a preset number of search results are extracted sequentially from the first one and merged to form the candidate text block set.
3. The enterprise knowledge question-answering analysis method based on a large model as described in claim 1, characterized in that, The steps for performing semantic structure analysis on the query text and constructing a list of semantic dimensions include: Construct dedicated semantic dimension recognition prompt text data; The assembled semantic dimension recognition prompt text data is sent to the language model to perform inference operations; Obtain the set of semantic dimension description entries from the language model inference output; A parsing operation is performed on the set of semantic dimension description entries to extract the text of each semantic dimension description and store it as the semantic dimension list corresponding to the current query request.
4. The enterprise knowledge question-answering analysis method based on a large model as described in claim 1, characterized in that, The steps for performing similarity calculations to distinguish between the covered and uncovered dimension sets in the semantic dimension list include: For each independent semantic dimension description text in the semantic dimension list, the currently processed independent semantic dimension description text is calculated and transformed to generate dimension query vector data. Perform similarity calculation to obtain a list of similarity scores between the currently processed independent semantic dimension description text and each candidate text block in the candidate text block set; Extract the highest score value from the similarity score record list, and compare the highest score value with the pre-configured dimension matching threshold. If the highest score value is higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has been effectively covered by the candidate text block set; If the highest score value is not higher than the dimension matching threshold, it is determined that the currently processed independent semantic dimension description text has an information coverage gap in the candidate text block set.
5. The enterprise knowledge question-answering analysis method based on a large model as described in claim 1, characterized in that, The steps for obtaining newly added text blocks and appending them to the candidate text block set, using the description of the uncovered dimension as query input, include: Extract the description text of the uncovered dimensions from the set of uncovered dimensions and use it as input for an independent search query. Call the text embedding encoding processing interface to encode and calculate the independent retrieval query input content, and generate complete query vector data; The completion query vector data is sent to the vector database, a search operation is performed, and a list of candidate completion text blocks with the highest similarity values is extracted. Perform identifier screening and deduplication on the extracted candidate supplementary text block data list, and define the remaining text block data after screening and deduplication as the new text block; Perform a set append operation to write the newly added text blocks one by one into the current candidate text block set.
6. The enterprise knowledge question-answering analysis method based on a large model as described in claim 1, characterized in that, The reasoning hint text information object data with integrity status annotations includes: The reasoning prompt text information object data includes: role definition control area data, context integrity status annotation area data, context material area data, original query user question area data, and output format specification guidance area data.
7. A large-model-based enterprise knowledge question-answering analysis system, used to implement the large-model-based enterprise knowledge question-answering analysis method according to any one of claims 1-6, characterized in that, include: The module includes: a collection acquisition module, a semantic structure analysis module, a similarity calculation module, a new text block acquisition module, a text block collection acquisition module, and an answer text generation module. The set acquisition module is used to receive the query text and perform preliminary vector retrieval to obtain a set of candidate text blocks; The semantic structure analysis module is used to perform semantic structure analysis on the query text and construct a list of semantic dimensions; The similarity calculation module is used to obtain dimension query vectors based on the semantic dimension list, perform similarity calculation, and distinguish between the covered dimension set and the uncovered dimension set in the semantic dimension list. The newly added text block acquisition module is used to acquire newly added text blocks by using the description of the uncovered dimension as query input when the set of uncovered dimensions is not empty; The text block set acquisition module is used to append the newly added text block to the candidate text block set and re-execute the similarity calculation until the uncovered dimension set is empty or the preset iteration stop condition is reached, so as to obtain the final candidate text block set. The answer text generation module is used to construct reasoning prompt text with integrity status annotation based on the final candidate text block set and the current state of the uncovered dimension set, and to perform reasoning to generate structured answer text. The steps to construct reasoning hint text with integrity status annotations include: For each text block data within the final candidate text block set, perform comprehensive matching and sorting score calculation processing logic; Retrieve the final comprehensive matching and sorting score record corresponding to each text block data; Based on the final comprehensive matching and sorting score results, records are arranged in descending order from largest to smallest. All text block data within the final candidate text block set are then rearranged and recalculated. According to the sorted sequence, the text blocks with the highest scores and the preset truncation number are selected and assembled into the final screened text material combination block; The final filtered text material combination block and the coverage detection status data of the current uncovered dimension set are formatted and concatenated to generate inference hint text information object data with integrity status annotation.
Citation Information
Patent Citations
Knowledge graph-based traffic engineering large model intelligent question-answering system and method
CN120407752A
Power plant operation and maintenance knowledge intelligent query method based on large language model and RAG technology
CN121029784A