A performance evaluation method and system for an intelligent question-answering system
By extracting test documents from the knowledge base and generating test cases using a sliding window, combined with semantic analysis using a large language model, the problems of low efficiency and insufficient reliability in the performance evaluation of question-answering systems are solved, achieving efficient and comprehensive performance evaluation.
Patent Information
- Application Number
- CN202611228112.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-24
AI Technical Summary
Existing performance evaluation methods for question-answering systems are inefficient, costly, and difficult to implement large-scale, high-frequency regression testing. Furthermore, existing evaluation methods cannot understand the semantic consistency of answers, resulting in unreliable test results.
By extracting test documents from the target knowledge base, using a sliding window to segment text into blocks to generate test cases, and leveraging a large language model for semantic analysis, the performance of the question-answering system is automatically evaluated.
It achieves fully automated performance evaluation, comprehensively covers the knowledge base, provides evaluation results with high coverage and high reliability, overcomes the misjudgment problem of traditional methods, and improves the accuracy and reliability of evaluation.
Smart Images

Figure CN123157553A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, specifically relating to a performance evaluation method and system for intelligent question-answering systems. Background Technology
[0002] Retrieval-Augmented Generation (RAG) is a technique that combines large language models with external knowledge bases to effectively improve the accuracy and reliability of generated content. RAG technology is currently widely used in scenarios such as question answering and document analysis. As the complexity of RAG-based question answering systems increases, the efficient evaluation of the accuracy, reliability, and consistency of their answers becomes a crucial aspect of ensuring system quality.
[0003] Currently, the evaluation and testing of RAG-based question-answering systems mainly faces these technical bottlenecks. For example, existing testing methods largely rely on test engineers manually reading knowledge base documents and designing test questions and standard answers. This method is inefficient, costly, and struggles to ensure that test cases effectively cover the large and dynamically updated knowledge base. Furthermore, test execution typically requires manual interface operation or writing one-off scripts, making it unsuitable for large-scale, high-frequency regression testing and difficult to integrate into continuous integration / continuous deployment processes. Moreover, existing performance evaluation methods often employ string matching or shallow text similarity comparisons, which fail to understand the semantic consistency of answers, resulting in superficial evaluation results and affecting their reliability. Summary of the Invention
[0004] This application proposes a performance evaluation method and system for intelligent question-answering systems, which can solve the problem that the test results obtained when performing performance testing on question-answering systems in the prior art are not comprehensive enough and cannot reliably evaluate the question-answering systems.
[0005] The first aspect of this application provides a performance evaluation method for intelligent question-answering systems, the method comprising: Several test documents are extracted from a preset target knowledge base. The test documents are then divided into text blocks using a preset sliding window to generate several test cases. Each test case contains a test question and its corresponding expected answer. The intelligent question-answering system under test reads all the test questions in the test set and outputs the actual answer of the intelligent question-answering system to each test question to obtain the system response set; wherein, the test set consists of the test cases; The test question, the expected answer, and the actual answer are combined to obtain a set of triples. A preset large language model is used to perform semantic analysis on the set of triples to obtain a performance evaluation report of the intelligent question answering system.
[0006] The above solution extracts several test documents from the target knowledge base related to the intelligent question-answering system as test generation sources. This generates multiple comprehensive test cases for testing system performance. Each test case contains a unique test question and an expected answer that accurately addresses the test question, ensuring sufficient test coverage for key, difficult, or error-prone knowledge points. All test questions are then input into the intelligent question-answering system for automated question answering, enabling batch testing of the system and obtaining the system's actual answer for each test question. Combining the test set and the system response set, an intelligent performance evaluation of the intelligent question-answering system under test is performed. Semantic analysis is used to determine the consistency between the expected answer and the actual answer, thereby determining whether the actual answer accurately answers the corresponding test question. Finally, based on the consistency judgment results, the accuracy of the intelligent question-answering system's answers in knowledge-based question answering is analyzed, resulting in a performance evaluation report that accurately reflects the actual performance of the intelligent question-answering system. Furthermore, this testing process is fully automated, obtaining accurate test results through comprehensive test cases.
[0007] In one possible implementation of the first aspect, several test documents are extracted from a preset target knowledge base, and the test documents are divided into text blocks using a preset sliding window to generate several test cases, specifically: Randomly extract several test documents from the target knowledge base, and set the total number of question-answer pairs and the question-answer pair density according to the test requirements; Based on the total number of question-answer pairs and the density of question-answer pairs, the length of the sliding window and the size of the text blocks are set to construct an adaptive block segmentation strategy; Based on the adaptive segmentation strategy, the test document is segmented into text blocks using the sliding window to obtain several question-answer pairs, and a corresponding test case is generated based on each question-answer pair.
[0008] The above scheme provides a foundation for obtaining comprehensive test cases by setting the total number and density of question-answer pairs. The total number of question-answer pairs, as a global constraint, specifies the expected number of test cases to be generated in this test, determining the overall time consumption and upper limit of computational resources required. The question-answer pair density, as a local constraint, ensures uniform coverage of the automated test within the target knowledge base, avoids test bias caused by differences in document length, and guarantees that even the smallest knowledge updates can be adequately tested and verified.
[0009] In one possible implementation of the first aspect, based on the adaptive chunking strategy, the test document is chunked using the sliding window to obtain several question-answer pairs, specifically: The test document is divided into text blocks using the sliding window to obtain several text blocks and the number of question-answer pairs to be generated for each text block; The text block and the number of question-answer pairs are input into a preset model for content segmentation, and the test question and its expected answer are extracted from the text block; The test question and the expected answer are combined into a question-answer pair to construct the corresponding test case.
[0010] The above scheme segments and extracts content from all text blocks using a pre-defined sliding window, generating a specified number of question-answer pairs in various formats. These question-answer pairs cover the target knowledge base, comprehensively covering the question-answering scenarios of the intelligent question-answering system, and providing a comprehensive test scenario for subsequent performance testing.
[0011] In one possible implementation of the first aspect, the total number of question-answer pairs and the question-answer pair density are set according to the testing requirements, specifically as follows: Set the total number of question-answer pairs based on the overall time consumption and computing resource consumption limit set according to the testing requirements; The question-answer pair density is set according to the number of question-answer pairs that must be generated within a unit text length as required by the testing requirements.
[0012] In one possible implementation of the first aspect, the intelligent question-answering system under test reads all test questions in the test set, outputs the actual answer of the intelligent question-answering system to each test question, and obtains the system response set, specifically as follows: Connect to and configure the access endpoint of the intelligent question-answering system, wherein the access endpoint includes a question-answering interface, an access address, an authentication key, and access request parameters; The intelligent question-answering system is controlled by a preset automated program to read all the test questions in the test set, and the question-answering interface is called sequentially according to the reading order to perform batch execution of the test questions; During the execution of the test questions by the intelligent question-answering system, the actual answer corresponding to each test question is recorded. The test question and its corresponding actual answer are treated as an entry, and all the entries are integrated to construct the system response set.
[0013] The above solution uses an intelligent question-answering system to automatically schedule and answer all test questions, obtaining the actual answers based on the current performance of the system, thus providing data support for subsequent consistency comparisons.
[0014] In one possible implementation of the first aspect, the test question, the expected answer, and the actual answer are combined to obtain a set of triples. A preset large language model is used to perform semantic analysis on the set of triples to obtain a performance evaluation report of the intelligent question-answering system, specifically: According to the test question, the test set is aligned with the system response set to obtain the pairing results of the expected answer and the actual answer; Based on the pairing results, a triplet is constructed consisting of the test question, the expected answer, and the actual answer that have a pairing relationship. All triplets are then integrated to obtain a set of triplets. The set of triples is input into the large language model, and semantic analysis and consistency determination are performed according to the preset prompt word instructions to obtain the consistency decision result of the triples; Based on the consistency judgment results, the correctness rate of all test questions and the reasons for the judgment are calculated, and the performance evaluation report is generated.
[0015] The above scheme uses a single test question to pair and combine the expected answer, representing the correct answer, with the actual answer generated by the system. Semantic analysis is used to evaluate the consistency between the expected answer and the actual answer, thereby determining whether the actual answer can accurately answer the test question and indirectly evaluating the performance of the intelligent question answering system.
[0016] In one possible implementation of the first aspect, semantic analysis and consistency determination are performed based on preset prompt words to obtain the consistency decision result of the triple, specifically as follows: The semantic analysis of the actual answer is performed based on the prompt word instruction to determine whether the semantics of the actual answer is consistent with the expected answer, thereby obtaining the consistency decision result of the triple and its confidence level.
[0017] The above approach not only needs to determine the semantic consistency between the two answers, but also needs to output the confidence score of the model's own decision. This effectively overcomes the bias that a single model may have or the analytical shortcomings in a specific domain, making the resulting performance evaluation report more robust, objective and accurate.
[0018] In one possible implementation of the first aspect, based on the consistency decision result, the correctness rate of answers to all the test questions and the reasons for the decision are statistically analyzed to generate the performance evaluation report, specifically as follows: Based on the consistency decision, the results of the test questions on consistency and inconsistency are statistically analyzed to obtain the answer accuracy rate; When outputting the consistency decision results for each triple, the reasoning for the consistency decision results is output through the analysis process of the large language model. The performance evaluation report is generated by integrating the triplet, the consistency decision result, the answer accuracy rate, and the decision reason.
[0019] In one possible implementation of the first aspect, the large language model is trained based on GPT or Qwen.
[0020] A second aspect of this application provides a performance evaluation system for intelligent question-answering systems, the system comprising: a test case generation module, a response set generation module, and a performance testing module; The test case generation module is used to extract several test documents from a preset target knowledge base, and to perform text segmentation on the test documents using a preset sliding window to generate several test cases; wherein, each test case contains a test question and its corresponding expected answer; The response set generation module is used to read all the test questions in the test set using the intelligent question-answering system under test, and output the actual answer of the intelligent question-answering system to each test question to obtain the system response set; wherein, the test set consists of the test cases; The performance testing module is used to combine the test question, the expected answer, and the actual answer to obtain a set of triples. The set of triples is then used to perform semantic analysis on the set of triples using a preset large language model to obtain a performance evaluation report of the intelligent question answering system. Attached Figure Description
[0021] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1 This is a schematic flowchart illustrating a performance evaluation method for an intelligent question-answering system provided in one embodiment of this application; Figure 2 This is a structural diagram of a performance evaluation method for an intelligent question-answering system provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0025] First Embodiment Retrieval-enhanced generation (REGG) is a popular cutting-edge technology in large-scale modeling. REGG-based question-answering systems combine language models and information retrieval techniques, retrieving relevant information from a vast question-and-answer set when a question needs answering. This retrieved information then guides text generation, improving the quality and accuracy of the answers. Existing performance testing methods for such systems rely heavily on manual data construction, which is inefficient, costly, and fails to guarantee effective coverage of the large and dynamically updated knowledge base. Furthermore, current performance evaluations often rely on string matching (e.g., keyword matching) or shallow text similarity to determine the accuracy of the model's output. However, this can lead to misclassification of answers with different expressions but the same meaning, and conversely, seemingly similar but contradictory answers, resulting in unreliable performance evaluation results.
[0026] To address the aforementioned deficiencies, this application provides a method that can automatically generate test cases covering a knowledge base and perform deeper semantic evaluation of the answers output by the question-and-answer system. This achieves end-to-end full automation of the testing process and enables efficient, high-coverage, and high-reliability evaluation of the accuracy of the questions-and-answer system's answers.
[0027] like Figure 1 As shown, to address the problem in existing technologies where performance testing of question-answering systems yields insufficient test results, making reliable evaluation of the systems impossible, the first embodiment of this application provides a detailed flowchart of a performance evaluation method for intelligent question-answering systems. This embodiment's performance evaluation method for intelligent question-answering systems includes steps S1 to S3, detailed below: Step S1: Extract several test documents from the preset target knowledge base, and use a preset sliding window to divide the test documents into text blocks to generate several test cases.
[0028] The purpose of this step is to create a test benchmark that is highly relevant to the content of the question-answering system and the knowledge base. Therefore, documents are sampled from the target knowledge base associated with the question-answering system to extract several test documents in order to build test cases containing question-answer pairs.
[0029] Specifically, original documents are automatically extracted from the target knowledge base according to a preset strategy as the test generation source, achieving seamless integration with the enterprise's existing knowledge management process and end-to-end automation from the "data source" to the "evaluation result". The preset strategy is determined according to actual needs. In this embodiment, test documents are randomly selected, while in other embodiments, documents can be extracted according to a directory.
[0030] After randomly extracting several test documents from the target knowledge base, a sliding window is set up based on the total number and density of question-answer pairs to segment the test documents into text blocks, thereby obtaining several question-answer pairs.
[0031] The total number of question-answer pairs is a global constraint metric used to limit the number of question-answer pairs expected to be generated in this performance test task. Therefore, it can be set according to the overall time consumption and upper limit of computing resource consumption set according to the test requirements. The question-answer pair density is a local constraint metric used to limit the number of question-answer pairs that must be generated within a unit text length. For example, 3 question-answer pairs are generated within every 5000 characters. Therefore, the question-answer pair density is set according to the number of question-answer pairs that must be generated within a unit text length set according to the test requirements.
[0032] Existing technologies typically only set the total number of question-answer pairs when generating test cases, without specifying the question-answer pair density. This leads to a high probability of uneven coverage in the resulting test cases. However, the embodiments of this application calculate the question-answer pair density based on the total number of question-answer pairs and the total length of the test documents, ensuring that the generated question-answer pairs uniformly cover the target knowledge base. This avoids test bias caused by differences in document length and guarantees that even the smallest knowledge updates can be adequately tested and verified.
[0033] Therefore, based on the total number of question-answer pairs and the question-answer pair density, the length of the sliding window and the size of the text blocks are set to construct an adaptive segmentation strategy. Then, based on the adaptive segmentation strategy, the test document is segmented into text blocks through the sliding window to obtain several question-answer pairs.
[0034] First, the text content of the test document is read piece by piece. To adapt to the context window limitations of the large language model, a sliding window with an overlapping area is used to segment the text content of the test document into blocks. For example, the text block size is set to 25,000 characters, and the overlapping area is 5,000 characters to ensure the semantic coherence of the context. After performing text segmentation, several text blocks and the number of question-answer pairs to be generated for each text block are obtained. Then, the text blocks and the number of question-answer pairs are input into a preset model for content partitioning, and the test questions and their expected answers are extracted from the text blocks.
[0035] Specifically, based on the prompts provided by the pre-defined model and strictly according to the content of the text block, a specified number of question-answer pairs in various formats are generated. Each test question and its expected answer constitute a question-answer pair, and corresponding test cases are constructed. Then, all test cases are combined into a test set.
[0036] Each test question is unique and different from the others; therefore, the semantics of the corresponding expected answers are also different.
[0037] Step S2: The intelligent question-answering system under test reads all the test questions in the test set and outputs the actual answer of the intelligent question-answering system to each test question to obtain the system response set.
[0038] This step involves using the test set generated in step S1 to perform batch testing on the intelligent question-answering system under test.
[0039] First, connect to and configure the access endpoint of the intelligent question-answering system, including the question-answering interface, access address, authentication key, and access request parameters.
[0040] Then, a preset automated program is used to control the intelligent question-answering system to read all the test questions in the test set, and the question-answering interface is called sequentially according to the reading order to perform batch execution of the test questions.
[0041] Next, during the execution of the test questions by the intelligent question-answering system, the actual answer output by the intelligent question-answering system for each test question is recorded, and the test question and its corresponding actual answer are treated as an entry. All entries are then integrated into a system response set.
[0042] Unlike the test set, the system response set consists of the responses made by the intelligent question-answering system under the current performance constraints.
[0043] Step S3: Combine the test question, the expected answer, and the actual answer to obtain a set of triples. Use a preset large language model to perform semantic analysis on the set of triples to obtain a performance evaluation report of the intelligent question answering system.
[0044] This step compares the test set and the system response set to match the expected answers with the actual answers. It then uses a pre-set large language model to perform semantic analysis on whether the actual answers correctly answer the test questions, in order to determine the performance of the intelligent question answering system and output a detailed performance evaluation report.
[0045] First, the test set and the system response set are aligned according to the common test questions to complete the pairing of expected answers and actual answers, so as to establish the association between expected answers and actual answers.
[0046] Based on the pairing results (i.e. the association between the expected answer and the actual answer), test questions, expected answers and actual answers that have a corresponding relationship are grouped into a triple, and all triples are integrated into a set of triples.
[0047] Then, the set of triples is input into the trained large language model, and the actual answer is semantically analyzed and consistency is determined by preset prompt words to obtain the consistency judgment result of the triples.
[0048] Specifically, multiple large language models are invoked in parallel, meaning a pre-configured set of large language models is called. These models can be of different types or different versions of the same type, as long as each model can independently receive the same prompt words and the same triples. After parallel invocation, the large language models, based on the prompt word instructions, analyze from a semantic perspective whether the actual answer correctly responds to the corresponding test question and whether its core meaning is consistent with the expected answer. The large language models need to output a binary decision of "consistent" or "inconsistent" (i.e., a consistency decision result), and may optionally provide a brief reason for the decision.
[0049] Optionally, the large language model in this application is obtained based on Qwen, while in other embodiments, GPT or Llama may also be used to obtain the large language model.
[0050] As an improvement to the above scheme, this application embodiment also calculates the confidence level of the consistency decision result. First, all outputs of the large language model are collected, and the total confidence levels of the "consistent" and "inconsistent" decisions are calculated separately. The decision with the higher confidence level is selected as the final decision result. This method effectively overcomes the potential "bias" or "shortcomings" in specific domains that may exist with a single model. By integrating the "wisdom" of multiple models and weighting their confidence levels, the final decision result obtained is more robust, objective, and accurate than the judgment of any single model, thus enhancing the reference value of the performance evaluation report.
[0051] Then, based on the consistency judgment results of each test question, the results of each test question on consistency and inconsistency are statistically analyzed to determine the number of questions the system answered correctly, and the correct answer rate of the intelligent question answering system on all test questions is obtained.
[0052] Integrate the triples, the consistency decision results, the correctness of the answers, and the reasoning behind the decisions to generate a performance evaluation report.
[0053] The above scheme introduces a large language model for deep semantic understanding and comparison. Its judgment logic is closer to that of human experts, effectively overcoming the misjudgment problem of traditional lexical or shallow semantic similarity methods, and making the performance evaluation results more valuable.
[0054] Implementing the embodiments of this application has the following beneficial effects: This application extracts several test documents from a target knowledge base related to the intelligent question-answering system as test generation sources. Multiple comprehensive test cases are generated to test the system's performance. Each test case contains a unique test question and an expected answer that accurately addresses the test question, ensuring sufficient test coverage for key, difficult, or error-prone knowledge points. All test questions are then input into the intelligent question-answering system for automated question answering, enabling batch testing of the system and obtaining the system's actual answer for each test question. Combining the test set and the system response set, an intelligent performance evaluation of the intelligent question-answering system under test is performed. Semantic analysis is used to determine the consistency between the expected answer and the actual answer, thereby determining whether the actual answer accurately answers the corresponding test question. Finally, based on the consistency judgment results, the accuracy of the intelligent question-answering system's answers in knowledge-based question answering is analyzed, resulting in a performance evaluation report that accurately reflects the actual performance of the intelligent question-answering system. Furthermore, this testing process is fully automated, obtaining accurate test results through comprehensive test cases.
[0055] Second Embodiment Furthermore, in order to implement the performance evaluation system for intelligent question-answering systems corresponding to the above method embodiments, and to achieve the corresponding functions and technical effects, Figure 2 A specific structural diagram of a performance evaluation system for intelligent question-answering systems is provided. For ease of explanation, only the parts relevant to this embodiment are shown. The performance evaluation system for intelligent question-answering systems provided in this application embodiment includes: The test case generation module 201 is used to extract several test documents from a preset target knowledge base, divide the test documents into text blocks using a preset sliding window, and generate several test cases; wherein, each test case contains a test question and its corresponding expected answer.
[0056] Randomly extract several test documents from the target knowledge base, and set the total number of question-answer pairs and the question-answer pair density according to the test requirements; Based on the total number of question-answer pairs and the density of question-answer pairs, the length of the sliding window and the size of the text blocks are set to construct an adaptive block segmentation strategy; Based on the adaptive segmentation strategy, the test document is segmented into text blocks using the sliding window to obtain several question-answer pairs, and a corresponding test case is generated based on each question-answer pair.
[0057] The response set generation module 202 is used to read all the test questions in the test set using the intelligent question answering system under test, and output the actual answer of the intelligent question answering system to each test question to obtain the system response set; wherein, the test set is composed of the test cases.
[0058] Connect to and configure the access endpoint of the intelligent question-answering system, wherein the access endpoint includes a question-answering interface, an access address, an authentication key, and access request parameters; The intelligent question-answering system is controlled by a preset automated program to read all the test questions in the test set, and the question-answering interface is called sequentially according to the reading order to perform batch execution of the test questions; During the execution of the test questions by the intelligent question-answering system, the actual answer corresponding to each test question is recorded. The test question and its corresponding actual answer are treated as an entry, and all the entries are integrated to construct the system response set.
[0059] The performance testing module 203 is used to combine the test question, the expected answer, and the actual answer to obtain a set of triples, and to perform semantic analysis on the set of triples using a preset large language model to obtain a performance evaluation report of the intelligent question answering system.
[0060] According to the test question, the test set is aligned with the system response set to obtain the pairing results of the expected answer and the actual answer; Based on the pairing results, a triplet is constructed consisting of the test question, the expected answer, and the actual answer that have a pairing relationship. All triplets are then integrated to obtain a set of triplets. The set of triples is input into the large language model, and semantic analysis and consistency determination are performed according to the preset prompt word instructions to obtain the consistency decision result of the triples; Based on the consistency judgment results, the correctness rate of all test questions and the reasons for the judgment are calculated, and the performance evaluation report is generated.
[0061] Third Embodiment This application embodiment takes the internal testing of a knowledge question-answering robot based on RAG architecture within a company as an example. The above method embodiment is implemented to perform performance testing on the knowledge question-answering robot. The specific testing process includes steps S100~S200: Step S100: Generate test data.
[0062] Operators use the front-end interface provided by the knowledge-based Q&A robot to select the 100 latest product manuals and FAQ documents (FAQ stands for Frequently Asked Questions) from the company's product knowledge base. The total number of question-and-answer pairs is set to 2000.
[0063] The system automatically divides these product manuals and FAQ documents into text blocks, each block being 25,000 characters in size, with an overlap area of 5,000 characters.
[0064] The model is invoked to generate corresponding questions and answers based on the following prompts: You are a rigorous test data generator. Please generate 5 question-and-answer pairs strictly based on the following text enclosed in triple quotes. Questions should be diverse, covering key concepts, steps, parameters, and scenarios. Answers must be precisely derived from the text blocks.
[0065] After generation, the benchmark test set containing 2000 question-answer pairs is organized and stored in JSON format.
[0066] Step S200: Automated testing.
[0067] Configure the production environment API of the intelligent question-answering application on the knowledge question-answering robot, then read 2000 test questions from the benchmark set and concurrently call the API at a rate of 10 per second. Obtain all actual answers. Collect all actual answers and build a system response set.
[0068] Step S300: Semantic analysis and report generation.
[0069] Align the benchmark test set with the system response set, and then call the large language model for semantic analysis based on the alignment results. The semantic analysis uses the following prompts for consistency judgment: Determine whether the 'actual answer' accurately answers the 'question' and whether its semantic core is consistent with the 'expected answer'. Output only 'consistent' or 'inconsistent', along with a brief explanation. Question: [Test Question]. Expected Answer: [Expected Answer]. Actual Answer: [Actual Answer].
[0070] The final analysis showed that 1,880 out of 2,000 question-answer pairs were judged to be consistent.
[0071] The generated performance evaluation report shows that the knowledge-answering robot has an overall accuracy rate of 94.0%, and lists detailed comparisons and judgment reasons for 120 inconsistent cases (such as: "The actual answer mentions 'restarting the service', but omits the key prerequisite step of 'backing up the configuration file', so the semantics are incomplete, judgment: inconsistent").
[0072] The parameters of the models used in this application embodiment can be adjusted. For example, the text block size can be adjusted according to the context window of different large models; the overlap area size can be set to 10%-30% of the block size to optimize contextual coherence; different types or sizes of models can be used for question-answer pair generation and semantic determination to balance cost and effect.
[0073] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, or improvements made by those skilled in the art within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A performance evaluation method for intelligent question-answering systems, characterized in that, include: Several test documents are extracted from a preset target knowledge base. The test documents are then divided into text blocks using a preset sliding window to generate several test cases. Each test case contains a test question and its corresponding expected answer. The intelligent question-answering system under test reads all the test questions in the test set and outputs the actual answer of the intelligent question-answering system to each test question to obtain the system response set; wherein, the test set consists of the test cases; The test question, the expected answer, and the actual answer are combined to obtain a set of triples. A preset large language model is used to perform semantic analysis on the set of triples to obtain a performance evaluation report of the intelligent question answering system.
2. The performance evaluation method for intelligent question-answering systems according to claim 1, characterized in that, Several test documents are extracted from a preset target knowledge base. A preset sliding window is used to segment the test documents into text blocks, generating several test cases. Specifically: Randomly extract several test documents from the target knowledge base, and set the total number of question-answer pairs and the question-answer pair density according to the test requirements; Based on the total number of question-answer pairs and the density of question-answer pairs, the length of the sliding window and the size of the text blocks are set to construct an adaptive block segmentation strategy; Based on the adaptive segmentation strategy, the test document is segmented into text blocks using the sliding window to obtain several question-answer pairs, and a corresponding test case is generated based on each question-answer pair.
3. The performance evaluation method for intelligent question-answering systems according to claim 2, characterized in that, Based on the aforementioned adaptive segmentation strategy, the test document is segmented into text blocks using the sliding window to obtain several question-answer pairs, specifically: The test document is divided into text blocks using the sliding window to obtain several text blocks and the number of question-answer pairs to be generated for each text block; The text block and the number of question-answer pairs are input into a preset model for content segmentation, and the test question and its expected answer are extracted from the text block; The test question and the expected answer are combined into a question-answer pair to construct the corresponding test case.
4. The performance evaluation method for intelligent question-answering systems according to claim 2, characterized in that, The total number of question-answer pairs and the density of question-answer pairs are set according to the testing requirements, specifically as follows: Set the total number of question-answer pairs based on the overall time consumption and computing resource consumption limit set according to the testing requirements; The question-answer pair density is set according to the number of question-answer pairs that must be generated within a unit text length as required by the testing requirements.
5. The performance evaluation method for intelligent question-answering systems according to claim 1, characterized in that, The intelligent question-answering system under test reads all test questions from the test set and outputs the actual answer of the intelligent question-answering system for each test question, thus obtaining the system response set, specifically: Connect to and configure the access endpoint of the intelligent question-answering system, wherein the access endpoint includes a question-answering interface, an access address, an authentication key, and access request parameters; The intelligent question-answering system is controlled by a preset automated program to read all the test questions in the test set, and the question-answering interface is called sequentially according to the reading order to perform batch execution of the test questions; During the execution of the test questions by the intelligent question-answering system, the actual answer corresponding to each test question is recorded. The test question and its corresponding actual answer are treated as an entry, and all the entries are integrated to construct the system response set.
6. The performance evaluation method for intelligent question-answering systems according to claim 1, characterized in that, The test question, the expected answer, and the actual answer are combined to obtain a set of triples. A preset large language model is used to perform semantic analysis on the set of triples to obtain a performance evaluation report of the intelligent question-answering system, specifically: According to the test question, the test set is aligned with the system response set to obtain the pairing results of the expected answer and the actual answer; Based on the pairing results, a triplet is constructed consisting of the test question, the expected answer, and the actual answer that have a pairing relationship. All triplets are then integrated to obtain a set of triplets. The set of triples is input into the large language model, and semantic analysis and consistency determination are performed according to the preset prompt word instructions to obtain the consistency decision result of the triples; Based on the consistency judgment results, the correctness rate of all test questions and the reasons for the judgment are calculated, and the performance evaluation report is generated.
7. The performance evaluation method for intelligent question-answering systems according to claim 6, characterized in that, Based on preset prompt words, semantic analysis and consistency determination are performed to obtain the consistency decision result of the triple, specifically: The semantic analysis of the actual answer is performed based on the prompt word instruction to determine whether the semantics of the actual answer is consistent with the expected answer, thereby obtaining the consistency decision result of the triple and its confidence level.
8. The performance evaluation method for intelligent question-answering systems according to claim 7, characterized in that, Based on the consistency decision results, the correctness rate of all test questions and the reasons for the decision are calculated, and the performance evaluation report is generated, specifically as follows: Based on the consistency decision, the results of the test questions on consistency and inconsistency are statistically analyzed to obtain the answer accuracy rate; When outputting the consistency decision results for each triple, the reasoning for the consistency decision results is output through the analysis process of the large language model. The performance evaluation report is generated by integrating the triplet, the consistency decision result, the answer accuracy rate, and the decision reason.
9. The performance evaluation method for intelligent question-answering systems according to claim 6, characterized in that, The large language model is trained based on GPT or Qwen.
10. A performance evaluation system for intelligent question-answering systems, characterized in that, include: Test case generation module, response set generation module, and performance testing module; The test case generation module is used to extract several test documents from a preset target knowledge base, and to perform text segmentation on the test documents using a preset sliding window to generate several test cases; wherein, each test case contains a test question and its corresponding expected answer; The response set generation module is used to read all the test questions in the test set using the intelligent question-answering system under test, and output the actual answer of the intelligent question-answering system to each test question to obtain the system response set; wherein, the test set consists of the test cases; The performance testing module is used to combine the test question, the expected answer, and the actual answer to obtain a set of triples. The set of triples is then used to perform semantic analysis on the set of triples using a preset large language model to obtain a performance evaluation report of the intelligent question answering system.
