Batch testing method and device for session analysis task of large language model and medium

By conducting batch testing of conversation analysis tasks on large language models, and calculating label accuracy and scene template availability, this solves the problem that traditional tools cannot intuitively reflect the accuracy of conversation analysis, and achieves a comprehensive evaluation of model performance.

CN118760871APending Publication Date: 2024-10-11SHENZHEN ZHUIYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919973.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Batch testing tools for traditional NLP models cannot intuitively reflect the accuracy of conversation analysis, and cannot effectively evaluate the performance of large language models in conversation analysis tasks.

Method used

By obtaining the session information in the test set, calling the pre-trained large language model to generate session summary information, and conducting batch testing based on the expected information and session summary information, calculating the label accuracy and scene template availability, and finally obtaining a comprehensive summary of the large language model Availability.

Benefits of technology

It provides an intuitive and concise method to evaluate the performance of large language models. Through the integrated indicators of label accuracy and scene template availability, it fully reflects the comprehensive performance of the model and improves the accuracy and reliability of the evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760871A_ABST
    Figure CN118760871A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, and discloses a batch testing method and equipment for a large language model to perform a session analysis task, and a medium. The method comprises the following steps: acquiring session information in a test set; calling a pre-trained large language model to generate session settlement information corresponding to the session information; expectation information in the test set is obtained, batch test operation is carried out on the large language model according to the expectation information and the session settlement information, a batch test result corresponding to the large language model is obtained, and the batch test result comprises the label accuracy rate and the scene template availability rate; and calculating the comprehensive availability rate of the large language model according to the label accuracy rate and the scene template availability rate. In the embodiment of the invention, the label accuracy rate and the scene template availability rate which can fully reflect the model batch test result are integrated, and a concise and clear comprehensive availability rate is provided, so that the performance of the large language model is conveniently and intuitively reflected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a batch testing method, device and medium for performing conversation analysis tasks on a large language model. Background Art

[0002] For conversation analysis, intelligent assistant robots can only perform batch testing on the conversation summaries generated by traditional NLP models. This cannot directly reflect the accuracy of the model's conversation analysis. A new technical solution is needed to solve the above technical problems. Summary of the invention

[0003] The main purpose of the present invention is to solve the technical problem that batch testing tools based on traditional NLP models cannot intuitively reflect the accuracy of conversation analysis.

[0004] A first aspect of the present invention provides a batch testing method for a large language model to perform a conversation analysis task, the batch testing method for a large language model to perform a conversation analysis task comprising:

[0005] Get the session information in the test set;

[0006] Calling a pre-trained large language model to generate session summary information corresponding to the session information;

[0007] Acquire expected information in the test set, and perform a batch test operation on the large language model according to the expected information and the conversation summary information to obtain a batch test result corresponding to the large language model, wherein the batch test result includes a label accuracy rate and a scene template availability rate;

[0008] The comprehensive availability of the large language model is calculated according to the label accuracy and the scene template availability.

[0009] Optionally, in a first implementation manner of the first aspect of the present invention, the step of performing a batch test operation on the large language model according to the expected information and the conversation summary information to obtain a batch test result corresponding to the large language model includes:

[0010] Counting the actual number of hit tags corresponding to the session summary information;

[0011] According to the actual number of hit labels and the expected number of hit labels corresponding to the expected information, the label accuracy and the scene template availability are calculated to obtain a batch test result.

[0012] Optionally, in a second implementation of the first aspect of the present invention, the step of calculating the label accuracy and the scene template availability based on the actual number of hit labels and the expected number of hit labels corresponding to the expected information to obtain the batch test results includes:

[0013] Counting the number of first information of the session information, and screening out qualified session information from the session information according to the batch test result;

[0014] The number of second information of the qualified session information is counted, and the label accuracy and the availability of the scene template are calculated according to the first number of information and the second number of information to obtain a batch test result.

[0015] Optionally, in a third implementation manner of the first aspect of the present invention, before the step of obtaining session information in the test set, the method further includes:

[0016] Generate a neural network model to be trained;

[0017] According to the preset training set, a model training operation is performed on the neural network model to obtain a large language model.

[0018] Optionally, in a fourth implementation of the first aspect of the present invention, the neural network model is a GPT model.

[0019] Optionally, in a fifth implementation of the first aspect of the present invention, the step of calling a pre-trained large language model to generate session summary information corresponding to the session information includes:

[0020] Acquire test scenario information corresponding to the session information in the test set;

[0021] Determining whether the new information of the preset scenario includes the test scenario information;

[0022] If the preset scenario information includes the test scenario information, a pre-trained large language model is called to generate session summary information corresponding to the session information.

[0023] Optionally, in a sixth implementation of the first aspect of the present invention, the step of obtaining session information in the test set includes:

[0024] When a test set is detected, it is determined whether the text contents in the test set all meet the preset requirements;

[0025] If the text content in the test set contains abnormal text content that does not meet the preset requirements, the test set is determined to be unqualified;

[0026] If the text content in the test set meets the preset requirement, the session information in the test set is obtained.

[0027] Optionally, in a seventh implementation manner of the first aspect of the present invention, after the step of determining that the test set is unqualified if the text content in the test set does not meet the preset requirement, the method further includes:

[0028] Generate failure description information corresponding to the abnormal text content;

[0029] Output the failure description information.

[0030] A second aspect of the present invention provides a batch testing device for performing conversation analysis tasks using a large language model, comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via lines; the at least one processor calling the instructions in the memory so that the batch testing device for performing conversation analysis tasks using a large language model executes the above-mentioned batch testing method for performing conversation analysis tasks using a large language model.

[0031] A third aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the batch testing method for performing conversation analysis tasks using a large language model.

[0032] In an embodiment of the present invention, the session information in the test set is obtained; the pre-trained large language model is called to generate the session summary information corresponding to the session information; the expected information in the test set is obtained, and the large language model is subjected to batch testing according to the expected information and the session summary information to obtain the batch testing results corresponding to the large language model, the batch testing results including the label accuracy and the scene template availability; the comprehensive availability of the large language model is calculated according to the label accuracy and the scene template availability. The label accuracy and the scene template availability that can fully reflect the model batch testing results are integrated to provide a concise and clear comprehensive availability, so as to conveniently and intuitively reflect the performance of the large language model. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of an embodiment of a method for batch testing a conversation analysis task using a large language model in an embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of a specific embodiment of step 101 of the batch testing method for performing conversation analysis tasks on a large language model in an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of a specific embodiment of step 102 of the batch testing method for performing conversation analysis tasks on a large language model in an embodiment of the present invention;

[0036] Figure 4 This is a schematic diagram of a specific embodiment of step 1032 of the batch testing method for performing conversation analysis tasks on a large language model in an embodiment of the present invention;

[0037] Figure 5 A schematic diagram of an embodiment of a batch testing device for performing conversation analysis tasks on a large language model in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] Embodiments of the present invention provide a batch testing method, device, and medium for performing conversation analysis tasks using a large language model.

[0039] The embodiments disclosed in the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments disclosed in the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments disclosed in the present invention are only for exemplary purposes and are not intended to limit the scope of protection disclosed in the present invention.

[0040] In the description of the embodiments disclosed in the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0041] Patent terms involved in the batch testing method for conversation analysis tasks using a large language model include but are not limited to:

[0042] Test set: A set of data used to evaluate model performance. It does not participate in model training and is only used to test the accuracy and effectiveness of the model.

[0043] Conversation information: text data generated during a conversation.

[0044] Conversation summary information: A conversation summary or conclusion generated by a large language model that briefly summarizes the main content and key information of the conversation.

[0045] Expected information: pre-defined expected results of the conversation summary, usually annotated by humans, used to evaluate the accuracy of the model output.

[0046] Label accuracy: The degree of consistency between the labels (key points or summary content) generated by the model and the expected labels, which is used to measure the accuracy of the model.

[0047] Scenario template availability: The ratio of whether the conversation summaries generated by the model conform to the preset scenario templates, which is used to evaluate the applicability and effectiveness of the model in different scenarios.

[0048] Comprehensive availability: A comprehensive indicator calculated by combining label accuracy and scene template availability, used to comprehensively evaluate the overall performance of the large language model.

[0049] Actual hit tag count: The number of tags correctly identified and hit in the session summary generated by the model.

[0050] Expected number of hit labels: the number of correct labels pre-defined in the expected information.

[0051] First message quantity: the quantity of all data in the session message.

[0052] Second, the number of messages: the number of qualified session messages screened out through batch testing.

[0053] Neural network models: computational models that mimic biological neural networks.

[0054] GPT model: Generative Pre-trained Transformer model, a generative pre-trained model based on the Transformer architecture, widely used in natural language processing tasks.

[0055] Test scenario information: specific scenario or context information corresponding to the session information in the test set.

[0056] Preset scenario information: scenario or context information predefined before model testing, used to determine whether the conversation summary generated by the model meets expectations.

[0057] Abnormal text content: text data in the test set that does not meet the preset requirements, which may be caused by formatting, grammar, or semantic errors.

[0058] Failure description information: Description information generated for abnormal text content, explaining the reason for test failure.

[0059] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of a batch testing method for a large language model to perform a conversation analysis task in an embodiment of the present invention includes:

[0060] 101. Obtain session information in the test set;

[0061] Specifically, the session information is extracted from the preset test set, including but not limited to all text content in the session, information of the dialogue participants, session timestamp, etc.

[0062] By calling the trained large language model, the extracted session information is input into the model to generate the session summary information corresponding to the session information. The large language model can be a GPT model, which is trained with data from a specific field.

[0063] Specifically, refer to Figure 2 , Figure 2 This is a schematic diagram of a specific embodiment of step 101 of the batch testing method for a large language model to perform a conversation analysis task in an embodiment of the present invention. Step 101 includes the following specific implementation methods:

[0064] 1011. When a test set is detected, determining whether the text contents in the test set all meet preset requirements;

[0065] 1012. If the text content in the test set contains abnormal text content that does not meet the preset requirement, the test set is determined to be unqualified;

[0066] Specifically, when the test set is determined to be unqualified, the failure description information corresponding to the abnormal text content is generated; and the failure description information is output. Among them, when the test set is unqualified, the failure description information corresponding to the abnormal text content is generated and output, which provides intuitive and specific feedback for scientific researchers.

[0067] 1013. If the text content in the test set meets the preset requirement, obtain the session information in the test set.

[0068] In steps 1011-1013, the text content in the test set is screened by preset requirements to ensure that only session information that meets specific conditions is used for model batch testing, which can improve the accuracy and reliability of test data. Excluding abnormal text content that does not meet preset requirements can reduce test errors and deviations caused by data problems, so that the test results can more accurately reflect the performance of the model. By performing a pre-quality check on the test set, the batch test method can better cope with various complex test scenarios and enhance the robustness and stability of the test.

[0069] Optimize the test process: Checking the quality of test sets as part of the batch testing process helps optimize the test process and improve test efficiency.

[0070] 102. Calling a pre-trained large language model to generate session summary information corresponding to the session information;

[0071] Specifically, the extracted conversation data is input into a pre-trained large language model, and the model generates summary information corresponding to each conversation.

[0072] Specifically, refer to Figure 3 , Figure 3 This is a schematic diagram of a specific embodiment of step 102 of the batch testing method for a large language model to perform a conversation analysis task in an embodiment of the present invention. Step 102 includes the following specific implementation methods:

[0073] 1021. Acquire test scenario information corresponding to the session information in a test set;

[0074] 1022. Determine whether the new preset scenario information includes the test scenario information;

[0075] 1023. If the preset scenario information includes the test scenario information, call a pre-trained large language model to generate session summary information corresponding to the session information.

[0076] In steps 1021-1023, by presetting the preset requirements for text content and making a judgment before obtaining the session information, abnormal text content that does not meet the requirements can be effectively excluded, thereby improving the overall quality of the test set. Since the test set has been strictly screened and verified, it can more accurately reflect the performance of the large language model in actual applications and avoid evaluation bias caused by test data quality issues.

[0077] 103. Obtain expected information in the test set, and perform a batch test operation on the large language model according to the expected information and the conversation summary information to obtain a batch test result corresponding to the large language model, wherein the batch test result includes a label accuracy rate and a scene template availability rate;

[0078] Specifically, the proportion of correctly hit session information in the summary generated by the statistical model to the expected information. The applicability of the summary generated by the statistical model in the preset scenario template.

[0079] Optionally, step 103 also includes the following specific implementations:

[0080] 1031. Count the actual number of hit tags corresponding to the session summary information;

[0081] 1032. Calculate the label accuracy and the scene template availability based on the actual number of hit labels and the expected number of hit labels corresponding to the expected information to obtain a batch test result.

[0082] Specifically, the expected summary information (gold standard) corresponding to each session in the test set is extracted, and the summary information generated by the model is compared with the expected summary information to evaluate the accuracy and completeness of the generated summary.

[0083] Label accuracy = the number of labels whose actual hit label values ​​in the entire test set are consistent with the expected hit label values ​​ / the number of expected hit labels in the entire test set * 100%,

[0084] Label accuracy = number of correct labels / total number of expected hit labels.

[0085] For example, label accuracy: 88.75%.

[0086] Specifically, the availability rate of scene templates = the number of templates with all correct labels in the entire test set / the number of expected hit templates in the entire test set * 100%

[0087] The availability rate of scene templates = templates with accuracy > 100% / total number of templates.

[0088] For example, the availability rate of scene templates is 88.75%.

[0089] In steps 1031-1032, by counting the actual number of hit labels and comparing them with the expected number of hit labels, the correctness of the summary information generated by the model can be accurately evaluated. This helps to discover the performance differences of the model in specific scenarios, thereby providing more detailed feedback for model optimization. The label accuracy and the scene template availability provide performance evaluation indicators in two different dimensions. The former focuses on the accuracy of details (the hits of the labels), and the latter focuses on the correctness of the overall scene. The quantification of indicators makes the model performance evaluation more objective.

[0090] Optional, see Figure 4 , Figure 4 This is a schematic diagram of a specific embodiment of step 1032 of the batch testing method for a large language model to perform conversation analysis tasks in an embodiment of the present invention. Step 1032 includes the following specific implementation methods:

[0091] 10321. Count the number of first information of the session information, and filter out qualified session information from the session information according to the batch test result;

[0092] 10322. Count the number of second information of the qualified session information, and calculate the label accuracy and the availability of the scene template according to the first number of information and the second number of information to obtain a batch test result.

[0093] In steps 10321-10322, by counting the total number of session information (the first number of information) and the number of qualified session information screened out (the second number of information), the label accuracy and scene template availability can be calculated more accurately. This reduces errors and makes the evaluation results more reliable. By distinguishing between qualified and unqualified session information, you can intuitively understand which sessions the model performs well on and which sessions have problems. Visualization helps developers quickly locate the direction in which the model needs to be optimized.

[0094] 104. Calculate the comprehensive availability of the large language model according to the label accuracy and the availability of the scene template;

[0095] Specifically, the comprehensive availability of the model is calculated based on the label accuracy and the availability of the scene template.

[0096] Optionally, before step 101, the method further includes:

[0097] 201. Generate a neural network model to be trained;

[0098] Optionally, the neural network model is a GPT model, such as a ChatGPT 4o model.

[0099] 202. According to a preset training set, perform a model training operation on the neural network model to obtain a large language model.

[0100] In steps 201-202, through a clear model training and generation process, it is ensured that the large language model used for batch testing is fully learned and verified, thereby improving the effectiveness and reliability of the model in subsequent batch testing processes.

[0101] In an embodiment of the present invention, the session information in the test set is obtained; the pre-trained large language model is called to generate the session summary information corresponding to the session information; the expected information in the test set is obtained, and the large language model is subjected to batch testing according to the expected information and the session summary information to obtain the batch testing results corresponding to the large language model, the batch testing results including the label accuracy and the scene template availability; the comprehensive availability of the large language model is calculated according to the label accuracy and the scene template availability. The label accuracy and the scene template availability that can fully reflect the model batch testing results are integrated to provide a concise and clear comprehensive availability, so as to conveniently and intuitively reflect the performance of the large language model.

[0102] Figure 5 1 is a structural diagram of a batch test device for performing conversation analysis tasks on a large language model provided by an embodiment of the present invention. The batch test device 500 for performing conversation analysis tasks on a large language model may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the batch test device 500 for performing conversation analysis tasks on a large language model. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the batch test device 500 for performing conversation analysis tasks on a large language model.

[0103] The batch testing device 500 for performing conversation analysis tasks based on a large language model may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will appreciate that Figure 5 The structure of the batch test device for performing conversation analysis tasks based on a large language model shown does not constitute a limitation on the batch test device for performing conversation analysis tasks based on a large language model, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0104] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the batch testing method for performing conversation analysis tasks using the large language model.

[0105] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0106] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.

[0107] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A batch testing method for large language models for conversation analysis tasks, It is characterized in that The batch testing method of the large language model for conversation analysis tasks includes: Get the session information in the test set; Calling a pre-trained large language model to generate session summary information corresponding to the session information; Acquire expected information in the test set, and perform a batch test operation on the large language model according to the expected information and the conversation summary information to obtain a batch test result corresponding to the large language model, wherein the batch test result includes a label accuracy rate and a scene template availability rate; The comprehensive availability of the large language model is calculated according to the label accuracy and the scene template availability.

2. The batch testing method for performing conversation analysis tasks using a large language model according to claim 1, It is characterized in that The step of performing a batch test operation on the large language model according to the expectation information and the conversation summary information to obtain a batch test result corresponding to the large language model comprises: Counting the actual number of hit tags corresponding to the session summary information; According to the actual number of hit labels and the expected number of hit labels corresponding to the expected information, the label accuracy and the scene template availability are calculated to obtain a batch test result.

3. The batch testing method for performing conversation analysis tasks using a large language model according to claim 2, It is characterized in that The step of calculating the label accuracy and the scene template availability according to the actual number of hit labels and the expected number of hit labels corresponding to the expected information to obtain the batch test result includes: Counting the number of first information of the session information, and screening out qualified session information from the session information according to the batch test result; The number of second information of the qualified session information is counted, and the label accuracy and the availability of the scene template are calculated according to the first number of information and the second number of information to obtain a batch test result.

4. The batch testing method for performing conversation analysis tasks using a large language model according to claim 1, It is characterized in that Before the step of obtaining the session information in the test set, the method further includes: Generate a neural network model to be trained; According to the preset training set, a model training operation is performed on the neural network model to obtain a large language model.

5. The batch testing method for performing conversation analysis tasks using a large language model according to claim 1, It is characterized in that The neural network model is a GPT model.

6. The batch testing method for performing conversation analysis tasks using a large language model according to claim 1, It is characterized in that The step of calling the pre-trained large language model to generate the session summary information corresponding to the session information includes: Acquire test scenario information corresponding to the session information in the test set; Determining whether the new information of the preset scenario includes the test scenario information; If the preset scenario information includes the test scenario information, a pre-trained large language model is called to generate session summary information corresponding to the session information.

7. The batch testing method for performing conversation analysis tasks using a large language model according to claim 1, It is characterized in that The step of obtaining session information in the test set includes: When a test set is detected, it is determined whether the text contents in the test set all meet the preset requirements; If the text content in the test set contains abnormal text content that does not meet the preset requirements, the test set is determined to be unqualified; If the text content in the test set meets the preset requirement, the session information in the test set is obtained.

8. The batch testing method for performing conversation analysis tasks using a large language model according to claim 7, It is characterized in that After the step of determining that the test set is unqualified if the text content in the test set does not meet the preset requirement, the method further includes: Generate failure description information corresponding to the abnormal text content; Output the failure description information.

9. A batch testing device for large language models to perform conversation analysis tasks, It is characterized in that The batch testing device for performing conversation analysis tasks with a large language model comprises: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via a line; The at least one processor calls the instructions in the memory to enable the batch testing device for performing conversation analysis tasks with a large language model to execute the batch testing method for performing conversation analysis tasks with a large language model as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the batch testing method for performing conversation analysis tasks using a large language model as described in any one of claims 1 to 8 is implemented.