Text data classification method and related device

By calling multiple large language models in text data classification, and using the coordinator model to summarize and provide feedback on the classification reasons, the problem of low accuracy of text data classification in the existing technology is solved, and more efficient and accurate text data is achieved. Classification.

CN119336912APending Publication Date: 2025-01-21ALI HEALTH TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411463168.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, text data classification accuracy is low, and traditional methods rely on a large number of annotation training samples, and the acquisition and annotation process is time-consuming and costly.

Method used

By calling multiple large language models, including the large language model as an expert and the large language model as a coordinator, the text data is independently classified and the reasons for the classification are given. The coordinator model summarizes and gives feedback on the classification reasons, allowing the large language model of the expert role to optimize the classification results in subsequent rounds.

Benefits of technology

It effectively improves the accuracy of text data classification, reduces the dependence on manual annotation, and improves the robustness of the classification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336912A_ABST
    Figure CN119336912A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text data classification method and a related device. The text data classification method comprises the steps of receiving text data and a category set; calling a plurality of large language models, and selecting alternative categories corresponding to the text data in the category set; wherein the plurality of large language models comprise large language models serving as expert roles and large language models serving as coordinator roles; in each round of prediction classification process, the large language model as an expert role is used for assigning a corresponding alternative category and a classification reason for the text data in a category set; the big language model serving as the coordinator role is used for summarizing the classification reason of the big language model serving as the expert role to obtain a summarizing reason, and the summarizing reason is used for being fed back to the big language model serving as the expert role to serve as reference information of a next prediction classification process; and determining a target category of the text data in the alternative categories. The accuracy of text data classification can be improved to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a text data classification method and related devices. Background Art

[0002] In the field of text data classification, traditional machine learning and deep learning methods require a large number of training samples to build and train classification models. In order to improve the classification accuracy of the classification model, it is usually necessary to use a large number of labeled training samples for model training. However, the acquisition and labeling process of training samples is often time-consuming and costly, especially in specific fields (such as medicine, law, etc.), the cost of expert labeling will be further increased. In addition, the subjectivity of different personnel in the sample labeling process may lead to inconsistent classification, which in turn affects the classification accuracy of the classification model.

[0003] In addition, traditional text classification methods usually rely on the prediction of a single classification model, whose performance is often limited by the coverage of the training data and the limitations of the classification model itself.

[0004] In summary, the existing technology still has the problem of low accuracy in text data classification. Summary of the invention

[0005] In view of this, multiple embodiments of the present application are dedicated to providing a text data classification method and related devices, which can improve the accuracy of text data classification to a certain extent.

[0006] One embodiment of the present application provides a text data classification method, comprising: receiving text data and a category set; wherein the category set includes multiple categories; calling multiple large language models, and selecting candidate categories corresponding to the text data in the category set; wherein the multiple large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as the expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as the expert role after each round of prediction and classification process to obtain summarized reasons, and the summarized reasons are used to feed back to the large language model as the expert role as reference information for the next round of prediction and classification process; and determining the target category of the text data in the candidate categories.

[0007] One embodiment of the present application provides a text data classification device, comprising: a receiving module, used to receive text data and a category set; wherein the category set includes multiple categories; a calling module, used to call multiple large language models, and specify candidate categories corresponding to the text data in the category set; wherein the multiple large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as the expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as the expert role after each round of prediction and classification process to obtain summarized reasons, and the summarized reasons are used to feed back to the large language model as the expert role as reference information for the next round of prediction and classification process; a category determination module is used to determine the target category of the text data in the candidate categories.

[0008] One embodiment of the present application provides a computer device, which includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the text data classification method as described above.

[0009] One embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the text data classification method as described above can be implemented.

[0010] One embodiment of the present application provides a computer program product, which is used to implement the text data classification method as described above.

[0011] In the multiple implementations provided in this specification, multiple large language models are called, including a large language model as an expert role and a large language model as a coordinator role. The large language model as an expert role independently classifies text data and gives classification reasons, and the coordinator model summarizes and summarizes the classification reasons in each round of classification, so that the large language model as an expert role can continuously optimize the classification results in subsequent rounds. In this way, the accuracy of text data classification can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of the interaction between a text data classification device and a large language model provided for one embodiment of the present application.

[0013] Figure 2 A schematic diagram of the interaction between a text data classification device and a large language model provided for one embodiment of the present application.

[0014] Figure 3 A flowchart of a method for classifying text data provided for one embodiment of the present application.

[0015] Figure 4 A schematic diagram of a module of a text data classification device provided in one embodiment of the present application.

[0016] Figure 5 A schematic diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0018] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0019] In the related art, in the field of text data classification, traditional classification methods usually rely on a large number of manually annotated training samples to build and train a single classification model. Specifically, first, a large amount of text data needs to be manually annotated to correspond to predefined category labels, and then these annotated training samples are used to train the classification model. Although this method can meet the basic text classification needs to a certain extent, the process of annotating training samples is often time-consuming and costly, especially when it comes to complex or specific fields (such as medicine, law, etc.), the annotation work requires the participation of domain experts, which results in excessive manpower costs. Furthermore, the classification accuracy of traditional classification models is highly dependent on the coverage and quality of training data. When faced with diverse or complex text data, the classification accuracy is often insufficient.

[0020] With the rapid development of natural language processing technology, large language models (LLMs) have gradually been widely used. Before being put into use on the market, large language models have often been trained with ultra-large-scale training data and have strong text understanding capabilities. Therefore, in some text classification scenarios, large language models can be used directly and conveniently. The widespread application of large language models allows classification tasks to be performed on larger-scale text data and reduces reliance on manual annotation.

[0021] However, although large language models have demonstrated great capabilities in text processing, they still face the problem of classification accuracy in classification tasks, especially the AI ​​hallucination phenomenon. AI hallucination refers to the fact that when a large language model generates classification results, it may generate some untrue or factually inconsistent information out of thin air, resulting in a decrease in the accuracy of the classification results. Specifically, the large language model may not have an accurate understanding of certain categories, especially when the boundaries between categories are not clear, and may mistakenly infer that a certain text data belongs to a certain category. This inference may not be based on real semantics or facts, but is the result of AI hallucinations.

[0022] In summary, the existing technology still has the problem of low accuracy in text data classification, which needs further improvement.

[0023] See also Figure 1 . In multiple implementations provided in this specification, the text data classification method can be applied to electronic devices with certain computing capabilities and network access capabilities. The electronic device can be a desktop computer, a laptop computer, a tablet computer, a smart phone, or a server. The electronic device can call a large language model through a network connection to perform text data classification tasks. Specifically, the electronic device includes a processor, a memory, and a network access module for network communication. The processor is used to perform data scheduling and feedback processing in text classification tasks, and the memory is used to store received text data, category sets, and classification results of each round. The network access module is used to connect to a remotely deployed large language model server.

[0024] See also Figure 1 and Figure 2 . One embodiment of the present application provides an example of an application scenario of a text data classification device. The classification device can predict and classify the input text data by calling multiple large language models, and finally determine the target category to which the text data belongs. In this scenario example, the medical field is taken as an example. Specifically, the doctor-patient communication content generated by the doctor and the patient is used as the text data. The classification device determines the target category of the text data by calling multiple large language models.

[0025] For example, when a doctor is communicating with a patient, he receives the following inquiry: "I have been feeling chest tightness, often accompanied by headaches and fatigue recently. What is the reason?" The doctor replies via instant messaging: "These symptoms may be related to stress or heart problems, but further examination is needed." This communication data forms the text data to be classified.

[0026] The classification device can receive the text data and the corresponding category set. The category set can include multiple categories such as "internal medicine", "neurology", "cardiovascular medicine", and "gastroenterology". The classification device can call five large language models, including one large language model as the main expert role and four large language models as auxiliary expert roles. Specifically, large language model 1 is good at the medical field and serves as the main expert role. Large language model 2 is good at general fields and serves as an auxiliary expert role. Large language model 3 is good at general fields and serves as an auxiliary expert role. Large language model 5 is good at general fields and serves as an auxiliary expert role. Large language model 7 is good at the legal field and serves as an auxiliary expert role.

[0027] During the first round of prediction and classification, the classification device can send the text data and category set to each large language model through the classification prompt instruction. Each large language model independently analyzes and feedbacks the alternative categories and classification reasons. For example, large language model 1: the alternative category selects "cardiovascular department", and the classification reason is "the chest tightness symptoms described by the patient are highly related to cardiovascular problems, especially considering heart problems.". Large language model 2: The alternative category selects "internal medicine", and the classification reason is "headache and fatigue can be symptoms of a variety of internal medicine problems, which are relatively broad and should be classified as internal medicine.". Large language model 3: The alternative category selects "internal medicine", and the classification reason is "the symptoms are vague and may involve a variety of internal medicine diseases. The preliminary judgment is internal medicine.". Large language model 5: The alternative category selects "neurology", and the classification reason is "headache may be related to nervous system diseases, and neurology should be considered.". Large language model 7: The alternative category selects "gastroenterology", and the classification reason is "fatigue symptoms may be related to digestive system dysfunction, and gastroenterology may be more suitable.".

[0028] Since the candidate categories of the large language model as an expert role were not consistent in the first round of prediction classification, the classification device will not immediately determine the target category, but can call the large language model of the coordinator role through the inductive prompt instruction. The inductive prompt instruction includes the classification reasons of all large language models, and the large language model of the coordinator role will analyze and summarize these classification reasons. Furthermore, after analyzing the classification reasons of the major language models, the large language model of the coordinator role fed back the following inductive reason: "Chest tightness symptoms are more consistent with the manifestation of cardiovascular problems. Although other symptoms can belong to different departments, the possibility of cardiovascular department is higher, and it is recommended to further consider the cardiovascular department."

[0029] The classification device can use the inductive reasons fed back by the coordinator role to reconstruct the classification prompt instruction and send it again to the major language models for the second round of prediction and classification. In the second round of prediction and classification, the feedback of the large language model as an expert role can be: Large language model 1: The alternative category selects "cardiovascular department", and the classification reason is "chest tightness is still the most critical symptom, and the original judgment is maintained." Large language model 2: The alternative category selects "cardiovascular department", and the classification reason is "according to the inductive reasons, the chest tightness symptoms are more directional, and it is adjusted to cardiovascular department." Large language model 3: The alternative category selects "internal medicine", and the classification reason is "considering other non-specific symptoms, it is still considered safe to classify it as internal medicine." Large language model 5: The alternative category selects "cardiovascular department", and the classification reason is "under the influence of the inductive reasons, it is believed that the chest tightness symptoms point to heart problems." Large language model 7: The alternative category selects "gastroenterology department", and the classification reason is "fatigue symptoms are strongly correlated with digestive problems, and the original judgment is maintained."

[0030] After the second round of prediction and classification, the candidate categories of multiple large language models as experts still cannot reach a consensus. At this time, the classification device can determine the target category among the candidate categories according to the votes of different large language models. Specifically, the classification device counts the votes as follows:

[0031] Cardiology Department: Large language model 1 (2 votes) + large language model 2 (1 vote) + large language model 5 (1 vote) = 4 votes.

[0032] Internal Medicine: Large Language Model 3 (1 vote).

[0033] Gastroenterology: Large Language Model 7 (1 vote).

[0034] Among them, the number of votes of the large language model 1 as the main expert role is greater than the number of votes of the auxiliary expert role. In this scenario example, the number of votes of the large language model 1 is 2, and the large language models of the other auxiliary expert roles each have 1 vote.

[0035] Since "Cardiovascular Department" received 4 votes, the classification device will use "Cardiovascular Department" as the target category corresponding to the text data.

[0036] In this scenario example, the classification device optimizes the classification process of text data through two rounds of prediction classification and the inductive reasoning of the large language model of the coordinator role. When the candidate categories of the first round of prediction classification are inconsistent, the classification range is further narrowed through the inductive analysis of the coordinator role. Finally, the classification device determines the target category through vote counting in the second round. In this way, the classification device can effectively improve the accuracy of classification through multiple rounds of prediction classification process.

[0037] See also Figure 3. The embodiment of the present application provides a method for classifying text data. The method for classifying text data can be applied to a classification device. The classification device can be an electronic device with certain computing power and network access capabilities. Of course, the classification device can also refer to a software program running in an electronic device. The method for classifying text data can include the following steps.

[0038] Step S110: receiving text data and a category set; wherein the category set includes a plurality of categories.

[0039] Step S120: calling multiple large language models, and selecting candidate categories corresponding to the text data in the category set; wherein the multiple large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as the expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as the expert role after each round of prediction and classification process to obtain summarized reasons, and the summarized reasons are used to feed back to the large language model as the expert role as reference information for the next round of prediction and classification process.

[0040] Step S130: determining a target category of the text data among the candidate categories.

[0041] In this embodiment, the classification device starts to perform the text classification task by receiving text data and a category set. The text data may include multiple text units, such as sentences, paragraphs, or documents. The category set may be a set containing multiple predefined categories, which is used to identify the category to which the text data may belong. After the classification device selects a target category for the text data, the text data and the target category can form a training sample as a whole. The training sample can be used to train a machine learning model. Specifically, the text data and the category set can be provided by a client. For example, in a medical information management system, a doctor can upload medical records as text data through a doctor client, and the category set may include medical department categories such as "internal medicine", "surgery", and "cardiovascular department". The classification device receives these medical record data and category sets and calls multiple large language models to classify these text data. After the text data is labeled with the corresponding medical field category, the formed training sample can be used to train the machine learning model in the medical field. In some cases, the classification device can also be called by a service in a server. For example, in a customer feedback processing system of an enterprise, an information collection service that automatically collects user feedback information is running on the server side. The information collection service can call the classification device, and can use the customer feedback information as text data and provide a category set to call the classification device. The category set may include categories such as "product quality", "technical support", and "return processing". After receiving the text data and the category set, the classification device calls multiple large language models to classify the text data. The training samples formed by the classification results can be further used to train the customer service system so that it can handle subsequent customer feedback more accurately. Of course, in some cases, the information collection device can also collect a large amount of text data and have a corresponding category set, and call the classification device multiple times. In summary, the classification device can provide an external calling interface so that the classification device can be used as the called party. The caller only needs to provide text data and a category set to obtain the target category selected by the text data in the category set.

[0042] In this embodiment, the classification device analyzes the text data and selects alternative categories in the category set by calling multiple large language models. Multiple large language models serve as expert roles and coordinator roles respectively. The large language model of the expert role can be called using the same classification prompt instruction. The classification prompt instruction is based on the construction of the text data and the category set, ensuring that the large language model of each expert role can independently analyze and give alternative categories based on the same input information. Further, the large language model of the expert role can independently select alternative categories for the text data and provide classification reasons. The classification reasons can be used to express the reasoning logic of the large language model of the corresponding expert role for the corresponding text data to select alternative categories. The large language model as the coordinator role can summarize the classification reasons provided by the large language model of the expert role to generate a summary reason. The summary reason can be used as summary information for the classification reasons of the large language model as the expert role. Of course, the number of large language models as expert roles can be multiple, and the number of large language models as the coordinator role can be one. Of course, in some embodiments, the number of large language models as expert roles and large language models as the coordinator role can also be multiple.

[0043] In this embodiment, by using the same classification prompt instruction to call the large language models of multiple expert roles, each large language model can classify and judge the text data based on the same input information. Because different large language models may have different training backgrounds or parameter settings, although the classification prompt instruction is the same, the large language model of each expert role may provide different classification reasons and alternative categories, and through the inductive feedback of the classification reasons by the large language model of the coordinator role, the large language model as an expert role can receive the inductive reasons in the subsequent rounds of prediction and classification, realize multiple rounds of prediction and classification, and improve the accuracy of text data classification.

[0044] In this embodiment, each round of prediction and classification may refer to a process in which the large language models of multiple expert roles analyze text data independently and provide alternative categories and classification reasons for the text data. Specifically, in a round of prediction and classification, the classification device will input the classification prompt instruction into the large language model of each expert role, and obtain the alternative categories and classification reasons independently generated by each large language model. After obtaining the alternative categories and classification reasons in each round, the classification device can summarize the classification reasons and the alternative categories, and construct a summary prompt instruction to call the coordinator role model to summarize the classification reasons to obtain the summary reasons. The classification device will use the summary reasons to construct the classification prompt instruction of the large language model of the expert role in the next round of prediction and classification. In this embodiment, through multiple rounds of prediction and classification, the large language model of the expert role can continuously optimize the classification judgment according to the summary reasons provided by the large language model of the coordinator role, so that the large language models of multiple expert roles can reach a consistent judgment to the greatest extent. For example, if the large language models of multiple expert roles give the same alternative categories, the classification device can determine the alternative category as the target category. Alternatively, most of the candidate categories given by the large language models of multiple expert roles are the same, so the classification device can determine the candidate category with the most votes as the target category.

[0045] In the multiple implementations provided in this specification, multiple large language models are called, including a large language model as an expert role and a large language model as a coordinator role. The large language model as an expert role independently classifies text data and gives classification reasons, and the coordinator model summarizes and feeds back the classification reasons in each round of classification, so that the large language model as an expert role can continuously optimize the classification results in subsequent rounds. In this way, the accuracy of text data classification can be effectively improved.

[0046] In some embodiments, the classification device can construct a classification prompt instruction including text data and a category set during the first round of prediction and classification; send the classification prompt instruction to the large language model acting as an expert role respectively to instruct the corresponding large language model to feedback alternative categories and classification reasons corresponding to the text data; when the alternative categories fed back by the large language model acting as an expert role are inconsistent, construct a summary prompt instruction including all classification reasons; send the summary prompt instruction to the large language model acting as a coordinator role to instruct the large language model acting as a coordinator to feedback the summary reasons corresponding to all classification reasons; wherein the summary reasons serve as part of the classification prompt instruction in the next round of prediction and classification.

[0047] In this embodiment, the classification device can construct a classification prompt instruction during the first round of prediction and classification, and the classification prompt instruction is used to provide text data and a category set to the large language model as an expert role, so as to instruct the large language model of each expert role to classify the text data, select alternative categories for it and provide corresponding classification reasons. Specifically, the classification prompt instruction can be based on the content of the text data and the construction of the category set to ensure that the large language model of each expert role can be independently analyzed based on the same input information. In this embodiment, the number of large language models as expert roles is not specifically limited. For example, in some cases, the number of large language models of expert roles can be 2, 3, 4, 5, 6...10, etc.

[0048] In a specific example, an example of a classification prompt instruction can be: "You are a medical classification expert. Please select a most appropriate medical department category based on the following text data and provide a classification reason. Text data: <Medical record content>, category set: 'Internal medicine, surgery, cardiovascular department', etc." The large language model of each expert role will independently analyze the text data and give alternative categories and classification reasons according to this classification prompt instruction. Taking the number of large language models of expert roles as 5 as an example, "expert" is used in the example to represent the large language model of the expert role for ease of expression. Feedback from expert 1 "The patient's symptoms such as cough and shortness of breath are consistent with respiratory diseases, so it is recommended to classify it as 'respiratory department'." Feedback from expert 2 "The unstable heart rate in the medical record suggests that it may be related to cardiovascular disease, so 'cardiovascular department' is selected." Feedback from expert 3 "Although the medical record mentions respiratory problems, the larger symptoms indicate that it may be an infectious disease, so 'internal medicine' is selected." Feedback from expert 4 "I think the symptoms are similar to digestive system problems. Combined with the patient's medical history, 'gastroenterology' is recommended." Expert 5's feedback: "The patient's symptoms are complex. Although he has breathing problems, based on the overall analysis, I prefer the respiratory department."

[0049] In this embodiment, during the first round of prediction and classification, if the candidate categories fed back by the large language model as an expert role are inconsistent, the classification device will construct a summary prompt instruction, which includes the classification reasons fed back by the large language model of all expert roles. Alternatively, the summary prompt instruction may include the classification reasons and alternative categories fed back by the large language model of all expert roles, so that the large language model of the coordinator role can conduct a comprehensive analysis of all expert opinions. The summary prompt instruction is used to instruct the large language model as a coordinator role to summarize all classification reasons and generate summary reasons. For example, the inductive prompt instruction may be: "You are now an expert conclusion summary analyst. Please analyze and summarize the data annotation results and corresponding reasoning reasons of multiple experts, and provide the final inductive conclusion. Expert 1 Conclusion: Respiratory Department, Reason: The patient's symptoms such as cough and shortness of breath are consistent with respiratory diseases, so it is recommended to be classified as 'Respiratory Department'. Expert 2 Conclusion: Cardiovascular Department, Reason: The unstable heart rate in the medical record suggests that it may be related to cardiovascular disease, so choose 'Cardiovascular Department'. Expert 3 Conclusion: Internal Medicine, Reason: Although the medical record mentions respiratory problems, the greater symptoms indicate that it may be an infectious disease, so choose 'Internal Medicine'. Expert 4 Conclusion: Gastroenterology, Reason: I think the symptoms are similar to digestive system problems. Combined with the patient's medical history, I recommend 'Gastroenterology'. Expert 5 Conclusion: Respiratory Department, Reason: The patient's symptoms are more complicated. Although there are respiratory problems, based on the overall analysis, I tend to 'Respiratory Department'. Please generate an inductive conclusion based on these classification reasons."

[0050] In this embodiment, the classification device sends a summary prompt instruction to the large language model acting as the coordinator role, instructing it to summarize the classification reasons of the large language model of the expert role and provide corresponding summary reasons. The large language model of the coordinator role analyzes the judgment of the large language model of each expert role based on the classification reasons in the summary prompt instruction, and generates a summary reason. Therefore, the summary reason can be a comprehensive feedback on the reasoning results of the large language models of all expert roles. For example, the summary reason feedback from the large language model of the coordinator role may be "The symptoms of respiratory diseases dominate. Despite the presence of other symptoms such as heart rate problems and digestive problems related to medical history, the main symptoms still point to respiratory problems. Therefore, it is recommended to classify the text data as 'Respiratory Department'."

[0051] In this embodiment, the classification device may use the inductive reasons fed back by the large language model of the coordinator role as part of the classification prompt instructions in the next round of prediction and classification process. By incorporating the inductive reasons into the classification prompt instructions of the next round of classification prediction, the large language model of the expert role can further adjust or optimize its judgment according to the inductive reasons provided by the coordinator in the next round of prediction and classification process. For example, in the next round of prediction and classification, the prompt instructions of the large language model of the expert role can be: "You are a medical data classification expert. Please select a medical department category based on the following text data and the classification opinions of other experts. The inductive reasons of other experts are: Symptoms of respiratory diseases dominate. Although there are other symptoms such as heart rate problems and digestive problems related to medical history, the main symptoms still point to respiratory problems. Therefore, it is recommended to classify the text data as 'Respiratory Department'. Text data: <Medical record content>, category set: 'Internal Medicine, Surgery, Respiratory Department', etc. "The large language model of each expert role will re-analyze the text data according to the new classification prompt instructions and provide updated alternative categories and classification reasons. Example of the next round of feedback from the large language model of the expert role:

[0052] Expert 1’s feedback: “According to the coordinator’s feedback, I still think that respiratory diseases are the most obvious, and I maintain the original judgment as ‘respiratory department’.” Expert 2’s feedback: “Combined with the opinions of other experts, I adjusted my previous judgment. Respiratory problems are more prominent, so I suggest classifying it as ‘respiratory department’.” Expert 3’s feedback: “Although it was previously judged as an infectious disease, based on feedback, respiratory problems are dominant, so it is revised to ‘respiratory department’.” Expert 4’s feedback: “Although digestive problems exist, after further analysis, respiratory symptoms are more representative, and it is recommended to be classified as ‘respiratory department’.” Expert 5’s feedback: “My analysis is consistent with the first time. Respiratory system problems are the dominant factor, and the ‘respiratory department’ classification is maintained.”

[0053] In this embodiment, the classification device can effectively optimize the classification results in multiple rounds of prediction and classification. The large language model of the coordinator role summarizes the classification reasons of the large language model of the expert role, so that the large language model of the expert role can optimize the judgment according to the summarized reasons in the subsequent rounds of prediction and classification, so that the candidate categories provided by the large language models of multiple expert roles are close to the accurate classification results as a whole. Finally, the classification device can determine the target category of the text data according to the candidate categories of the large language models of multiple expert roles to ensure the accuracy of classification.

[0054] In some embodiments, the classification device can use the alternative category as the target category when the categories represented by all alternative categories are consistent; or, when the categories represented by all alternative categories are at least partially different and the number of rounds of executing the prediction classification process reaches a specified number, the alternative category with the largest cumulative votes among the alternative categories is determined as the target category; wherein the large language models serving as expert roles have corresponding votes respectively; and the cumulative votes are the sum of the votes of the large language models that output the same alternative category.

[0055] In this embodiment, the classification device can directly use the candidate category as the target category of the text data when the candidate categories of all the large language models that serve as expert roles are consistent. Specifically, when the large language models of each expert role finally give the same candidate category after multiple rounds of prediction and classification, that is, the candidate categories are consistent, the classification device determines the candidate category as the target category and no longer performs subsequent rounds of prediction and classification.

[0056] In some embodiments, the large language models serving as expert roles have corresponding votes respectively. The large language model of each expert role provides an alternative category in each round of prediction and classification. The votes corresponding to the large language model of the expert role are used as the votes of the corresponding alternative category in this round of prediction and classification. The sum of the number of votes for the same alternative category is the cumulative votes. The number of votes of the large language model of each expert role is equivalent to its weight in each round of prediction and classification. When the target category is finally determined, the classification device can decide which alternative category has the most consensus based on the cumulative votes of each alternative category.

[0057] In this embodiment, if the categories represented by all candidate categories are inconsistent, that is, there are differences in the candidate categories given by the large language model of the expert role, the classification device can perform the next round of prediction classification. If the rounds of performing prediction classification reach a specified number. For example, the specified number can be 5 rounds, 6 rounds, 7 rounds... 20 rounds, etc. However, the candidate categories of the large language model of the expert role have not yet reached a consensus, then the classification device can determine the target category based on the accumulated votes obtained by different candidate categories. Specifically, the classification device can determine the target category based on the accumulated votes obtained by the candidate category during multiple rounds of prediction classification. For example, the classification device will count the votes of the candidate category after each round, and accumulate the votes of the candidate category during multiple rounds of prediction classification to obtain the accumulated votes. When the rounds of prediction classification reach a specified number, if the candidate category still does not reach a consensus, the classification device can use the candidate category with the most accumulated votes as the target category of the text data. In some embodiments, the classification device can also determine the target category based only on the accumulated votes obtained by different candidate categories during the last round of prediction classification. For example, if in the last round of prediction classification, the large language model of the five expert roles respectively gives the following candidate categories: Expert 1 and Expert 5 choose "Respiratory Department", Expert 2 chooses "Cardiovascular Department", Expert 3 chooses "Internal Medicine", and Expert 4 chooses "Gastroenterology", then the cumulative votes for "Respiratory Department" are 2, and the cumulative votes for "Cardiovascular Department", "Internal Medicine", and "Gastroenterology" are all 1. Therefore, the classification device determines the candidate category "Respiratory Department" with the most cumulative votes as the target category of the text data.

[0058] In some embodiments, the expert role includes a main expert role and an auxiliary expert role; the large language model of the main expert role is a medical large language model that is good at medical field knowledge, and the large language model of the auxiliary expert role is a large language model in a non-medical field; wherein the number of votes of the main expert role is greater than the number of votes of the auxiliary expert role.

[0059] In this embodiment, the big language model of the expert role can be divided into the big language model of the main expert role and the big language model of the auxiliary expert role. The big language model of the main expert role can be a big language model that is good at knowledge in a specific field, such as a medical big language model that is good at knowledge in the medical field. The big language model of the auxiliary expert role is a general big language model that is not exclusive to a certain field or a big language model that is good at knowledge in other fields. When the classification device calls the big language models of the main expert role and the auxiliary expert role, the big language model of the main expert role can have more weight in votes, while the big language model of the auxiliary expert role has relatively fewer votes.

[0060] In this embodiment, the classification device can construct a classification prompt instruction by receiving text data and a category set. The prompt instruction is used to simultaneously call the large language model of the main expert role and the large language model of the auxiliary expert role, and instruct them to select alternative categories and classification reasons for the text data. The large language model of the main expert role can be more proficient in the technical field to which this classification task belongs, and can serve as the main classification judge, while the large language model of the auxiliary expert role provides alternative categories and classification reasons as a reference role. When the alternative categories of the large language model of the expert role and the large language model of the auxiliary expert role are consistent, the alternative category is used as the target category. When the alternative categories of the large language model of the main expert role and the large language model of the auxiliary expert role are different, the classification device can obtain the accumulated votes of different alternative categories as the votes of the large language model of the main expert role, which is greater than the votes of the large language model of the auxiliary expert role. For example, the votes of the large language model of the main expert role can be 3 votes, and the votes of the large language model of the auxiliary expert role can be 1 vote. The candidate category output by the large language model of the main expert role can be "respiratory department", the candidate category output by the large language model of 1 auxiliary expert role is also "respiratory department", and the candidate category output by the large language model of 3 auxiliary expert roles is "cardiovascular department". At this time, the cumulative votes for "respiratory department" are 4 votes, and the cumulative votes for "cardiovascular department" are 3 votes. The classification device can use "respiratory department" as the target category. The main expert model can have more votes, which can improve the classification accuracy of the final text data.

[0061] In some implementations, the classification device may receive text data, a category set, and knowledge domain data corresponding to the text data; accordingly, the classification device may determine a large language model that serves as an expert role among multiple large language models based on the knowledge domain data.

[0062] In this embodiment, when receiving a classification task, the classification device may receive the knowledge domain data corresponding to the text data corresponding to the received text data and category set. In this way, the classification device may more accurately select an appropriate large language model to perform the classification task based on the knowledge domain data. Specifically, the knowledge domain data may be used to characterize the professional field to which the text data belongs, such as medical, legal, financial, etc. After receiving the knowledge domain data, the classification device may determine a suitable expert role large language model from multiple large language models based on the knowledge domain data to ensure that these models have higher professionalism in the corresponding fields. For example, in a medical scenario, the knowledge domain data may be professional field names such as "medicine", "cardiology", and "respiratory". Based on these knowledge domain data, the classification device may give priority to selecting a medical large language model as an expert role from multiple large language models to ensure the accuracy of the classification results.

[0063] In some implementations, the classification device may obtain knowledge domain data that expresses the technical field to which the text data belongs; and determine a large language model that serves as an expert role from among a plurality of large language models based on the knowledge domain data.

[0064] In this embodiment, the classification device can obtain the knowledge domain data to which the text data belongs, thereby further determining a suitable large language model as an expert role to improve the accuracy of classification.

[0065] In this embodiment, the classification device can obtain knowledge domain data in a variety of ways, which may include: automatic analysis and extraction from text data, user input, or domain labels preset by the system. For example, in the case where the text data is a professional document or report, the classification device can pre-process the text through natural language processing technology, extract keywords or domain terms in the document, and automatically identify the knowledge domain data of the text. In some embodiments, the classification device can also automatically match knowledge domain data to text data based on historical data or predefined rules.

[0066] In some implementations, the multiple large language models have capability evaluations corresponding to different technical fields; the classification device can select a specified number of large language models as large language models for expert roles according to the capability evaluations of the technical fields represented by the knowledge domain data from high to low.

[0067] In this embodiment, the classification device can select the large language model as the expert role based on the ability evaluation of multiple large language models. Specifically, the corresponding ability evaluation can be performed according to the accuracy of multiple large language models in classification in different technical fields. The ability evaluation can be a comprehensive score based on the accuracy, professionalism or experience of the large language model in a certain technical field. In this embodiment, the specified number can be 3, 4, 5, 6...10, etc. The specified number can be a relatively fixed number. Of course, the specified number can also be dynamically specified by the classification device.

[0068] When the classification device receives the text data and the category set, the classification device can identify the technical field to which the text data belongs through the knowledge domain data. After determining the technical field of the text data, the classification device can sort the large language models from high to low according to the ability evaluation based on the knowledge domain data, and give priority to the large language model with a higher ability evaluation as the expert role for this classification task. Specifically, the classification device can select multiple large language models with expert roles and higher ability evaluations to improve the accuracy of the classification results. For example, the classification device can select a specified number of large language models, such as 5 or more, from high to low according to the ability evaluation. By selecting a large language model with a higher ability evaluation, the large language model as an expert role can be more proficient in the technical field to which the text data belongs, and has better processing efficiency and classification accuracy.

[0069] In some embodiments, the classification device can dynamically adjust the number of large language models selected as expert roles to meet the needs of different classification tasks. For example, in some complex technical fields, the classification device can select more large language models with higher ability evaluations as expert roles to participate in the classification task, while in relatively simple fields, the number of large language models required as expert roles can be reduced. In this way, the execution efficiency of the classification task can be effectively improved, and the accuracy of the classification results can be improved.

[0070] In some implementations, the large language model corresponds to an expert knowledge domain. The classification device may match the large language model whose expert knowledge domain matches the technical field represented by the knowledge domain data as the large language model of the expert role.

[0071] In this embodiment, each large language model corresponds to a technical field in which it is good at, which can indicate that the large language model has a strong classification ability in the technical field in which it is good at. The classification device can match the large language model with the knowledge field data of the text data according to the knowledge field in which it is good at, so as to ensure that the large language model selected as an expert role can perform the classification task more accurately.

[0072] For example, the classification device can call multiple large language models, and each large language model can have a senior corresponding field of expertise. For example, the field of expertise of large language model 1: medical field, especially the classification tasks of cardiovascular and respiratory departments. The field of expertise of large language model 2: legal field, especially the text classification of contract law and intellectual property law. The field of expertise of large language model 3: financial field, especially in stock market analysis and financial report classification. The field of expertise of large language model 4: medical field, mainly text classification of endocrinology and digestive system. The field of expertise of large language model 5: medical field, good at the classification of imaging reports.

[0073] The classification device will match the expertise of the corresponding large language model according to the knowledge domain data "medical field" of the text data, and give priority to selecting the large language model whose expertise is the medical field as the expert role. Specifically, the classification device can determine large language model 1, large language model 4 and large language model 5 as the expert roles in the classification task.

[0074] In some embodiments, the classification device may determine at least one large language model that is good at a knowledge field that matches the technical field of data representation of the knowledge field as a main expert role, and select at least one large language model from multiple large language models as an auxiliary expert role; wherein, when determining the target category, the number of votes for the large language model serving as the main expert role is greater than the number of votes for the large language model serving as the auxiliary expert role.

[0075] In this embodiment, the classification device can determine the large language model that is good at the knowledge field and matches the knowledge field data as the main expert role according to the knowledge field data of the text data, and select at least one large language model as the auxiliary expert role from multiple large language models. The large language model of the main expert role has a higher vote weight in the process of determining the target category, while the large language model of the auxiliary expert role has relatively fewer votes to ensure the accuracy of the classification result.

[0076] For example, the text data received by the classification device belongs to the "medical field". The text data is: "The patient, male, 45 years old, has recently experienced frequent abdominal distension, nausea, weight loss and diarrhea. The doctor suspects that it may be related to digestive system diseases and recommends further endoscopic examinations." The category set includes the following categories: "Internal Medicine", "Surgery", "Gastroenterology", "Gynecology", "Neurology". And other categories. The classification device will match the knowledge domain data "medical field" of the text data with the expertise of the large language model to obtain a large language model that acts as an expert.

[0077] Specifically, the multiple large language models and the corresponding knowledge fields may include: Large language model 1: medical field. Large language model 2: legal field. Large language model 3: financial field. Large language model 4: general field. Large language model 5: general field. Large language model 6: general field. Large language model 7: general field. Large language model 8: general field. Large language model 9: education field. Large language model 10: environmental science field.

[0078] The classification device can select a large language model that is good at the medical field as the main expert role according to the knowledge field data "medical field", and select an auxiliary expert role from a large language model that is not good at the medical field. For example, the classification device selects large language model 1 as the main expert role, and selects large language model 4, large language model 5, and large language model 7 as auxiliary expert roles.

[0079] After the classification device constructs the classification prompt instruction, it can call the above four large language models for independent analysis, and respectively give alternative classifications and classification reasons. The large language model 1 of the main expert role provides alternative categories based on its professional knowledge in the medical field and gives classification reasons. At the same time, the large language models 4, 5, and 7 of the auxiliary expert role provide corresponding alternative categories and classification reasons based on their general field classification capabilities.

[0080] Specifically, it is assumed that after a specified number of rounds of prediction and classification, the candidate categories output by the large language model selected as the expert role have not yet reached a consensus. At this time, the classification device can determine the target category in the candidate category according to the cumulative votes of the candidate categories of the large language model as the expert role in the last round of prediction and classification. For example, the alternative category "Gastroenterology" selected by the large language model 1 is classified on the grounds that "symptoms such as abdominal distension, nausea, and weight loss are highly pointed to digestive system diseases, and further endoscopic examination is recommended, which is in line with the characteristics of the gastroenterology department." The alternative category "Gastroenterology" selected by the large language model 4 is classified on the grounds that "symptoms such as nausea and diarrhea are directly related to diseases of the digestive system, and the gastroenterology department is a reasonable choice." The alternative category "Internal Medicine" selected by the large language model 5 is classified on the grounds that "although the patient's symptoms are related to digestion, they may also involve other body systems, so it is more appropriate to classify it as internal medicine." The alternative category "Internal Medicine" selected by the large language model 7 is classified on the grounds that "the symptoms may involve multiple body systems, and internal medicine covers a wide range of pathological diagnoses, so it is suitable for internal medicine."

[0081] The large language model model 1, as the main expert role, may have 2 votes, and the large language models 4, 5, and 7, as auxiliary experts, may each have 1 vote. In this way, the cumulative votes for the alternative category "Gastroenterology" are 3 votes, and the cumulative votes for the alternative category "Internal Medicine" are 2 votes. In this way, the classification device determines the alternative category "Gastroenterology" as the target category.

[0082] See also Figure 4. One embodiment of the present application also provides a text data classification device, comprising: a receiving module, for receiving text data and a category set; wherein the category set includes multiple categories; a calling module, for calling multiple large language models, and specifying candidate categories corresponding to the text data in the category set; wherein the multiple large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as an expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as an expert role after each round of prediction and classification process to obtain a summary reason, and the summary reason is used to feed back to the large language model as an expert role as reference information for the next round of prediction and classification process; a category determination module is used to determine the target category of the text data in the candidate category.

[0083] In this embodiment, the specific functions and effects achieved by the text data classification device can be explained with reference to other embodiments of the present application and will not be repeated here.

[0084] The embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor implements the text data classification method as described above.

[0085] The embodiment of the present application also provides a computer program product including instructions, and when the computer program product is executed by a processor, the text data classification method as described above is implemented.

[0086] See also Figure 5 The present embodiment may provide a computer device, the computer device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions are executed by the one or more processors, so that the one or more processors implement the aforementioned text data classification method.

[0087] In some embodiments, the computer device may include a processor, a non-volatile storage medium, an internal memory, a communication interface, a display device, and an input device connected by a system bus. The non-volatile storage medium may store an operating system and related computer programs.

[0088] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in multiple implementation methods of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0089] It should be understood that the specific examples in this article are only intended to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the present invention.

[0090] It can be understood that in the various implementations of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present application.

[0091] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.

[0092] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0093] It can be understood that the processor of the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0094] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0095] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0097] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0099] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0100] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0101] The above is only a specific implementation of the present application, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A text data classification method, characterized in that: include: Receiving text data and a category set; wherein the category set includes a plurality of categories; Calling multiple large language models, selecting candidate categories corresponding to the text data in the category set; wherein the multiple large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as the expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as the expert role after each round of prediction and classification process to obtain summarized reasons, and the summarized reasons are used to feed back to the large language model as the expert role as reference information for the next round of prediction and classification process; A target category of the text data is determined among the candidate categories.

2. The method according to claim 1, characterized in that The step of calling a plurality of large language models and selecting a candidate category corresponding to the text data in the category set comprises: In the first round of prediction and classification, a classification prompt instruction including text data and category set is constructed; Sending the classification prompt instructions to the large language models acting as experts respectively to instruct the corresponding large language models to feedback candidate categories and classification reasons for the corresponding text data; When the alternative categories fed back by the large language model acting as an expert are inconsistent, construct inductive prompt instructions that include all the reasons for the classification; The summary prompt instruction is sent to the large language model acting as a coordinator to instruct the large language model acting as a coordinator to feedback the summary reasons corresponding to all classification reasons; wherein the summary reasons serve as a part of the classification prompt instruction in the next round of prediction classification process.

3. The method according to claim 1, characterized in that The step of determining the target category of the text data in the candidate categories includes: when the categories represented by all the candidate categories are consistent, taking the candidate categories as the target category; or, When the categories represented by all the alternative categories are at least partially different and the number of rounds of executing the prediction classification process reaches a specified number, the alternative category with the largest cumulative votes among the alternative categories is determined as the target category; wherein the large language models acting as expert roles have corresponding votes respectively; the accumulated votes are the sum of the votes of the large language models that output the same alternative category.

4. The method according to claim 3, characterized in that The expert roles include a main expert role and an auxiliary expert role; the large language model of the main expert role is a medical large language model that is good at medical field knowledge, and the large language model of the auxiliary expert role is a large language model in a non-medical field; wherein the number of votes of the main expert role is greater than the number of votes of the auxiliary expert role.

5. The method according to claim 1, characterized in that: The step of receiving text data and a category set includes: receiving text data, a category set and knowledge domain data corresponding to the text data; The step of calling a plurality of large language models and specifying candidate categories corresponding to the text data in the category set comprises: determining a large language model that serves as an expert role in the plurality of large language models according to the knowledge domain data.

6. The method according to claim 1, characterized in that The step of calling a plurality of large language models and specifying candidate categories corresponding to the text data in the category set comprises: Acquire knowledge domain data expressing the technical field to which the text data belongs; A large language model serving as an expert role is determined from among a plurality of large language models according to the knowledge domain data.

7. The method according to claim 5 or 6, characterized in that: The multiple large language models have capability evaluations corresponding to different technical fields; The step of determining a large language model serving as an expert role from among a plurality of large language models according to the knowledge domain data comprises: According to the ability evaluation of the technical field represented by the knowledge domain data from high to low, a specified number of large language models are selected as the large language models of the expert role.

8. The method according to claim 5 or 6, characterized in that: Large language models correspond to areas of expertise; The step of determining a large language model as an expert role from a plurality of large language models according to the knowledge domain data includes: determining a large language model as an expert role by matching a large language model that is good at a knowledge domain with a technical field represented by the knowledge domain data.

9. The method according to claim 5 or 6, characterized in that: The expert roles include main expert roles and auxiliary expert roles; the large language model is assigned a knowledge domain that it is good at; The step of determining a large language model as an expert role from among multiple large language models according to the knowledge domain data comprises: determining at least one large language model that excels in a knowledge domain that matches the technical field represented by the knowledge domain data as a main expert role, and selecting at least one large language model from among multiple large language models as an auxiliary expert role; wherein, when determining a target category, the number of votes for the large language model as the main expert role is greater than the number of votes for the auxiliary expert role.

10. A text data classification device, characterized in that: include: A receiving module, used for receiving text data and a category set; wherein the category set includes a plurality of categories; A calling module, used for calling a plurality of large language models, and specifying candidate categories corresponding to the text data in the category set; wherein the plurality of large language models include a large language model as an expert role and a large language model as a coordinator role; in each round of prediction and classification process, the large language model as an expert role is used to independently specify corresponding candidate categories and classification reasons for the text data in the category set; the large language model as the coordinator role is used to summarize the classification reasons of the large language model as an expert role after each round of prediction and classification process to obtain summarized reasons, and the summarized reasons are used to feed back to the large language model as an expert role as reference information for the next round of prediction and classification process; The category determination module is used to determine the target category of the text data among the candidate categories.

11. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the text data classification method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the text data classification method according to any one of claims 1 to 9 can be implemented.

13. A computer program product, characterized in that The computer program product is used to implement the text data classification method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Training data construction method and device for large language model in stomatology field

    CN120873586A