Entity classification method based on tree thinking chain reasoning
Through the tree-like thinking chain reasoning method, a tree-structured category label system is constructed, allowing the large model to select step by step, solving the problems in the existing technology of difficulty in distinguishing categories and ancestral nodes and lack of understanding of individual categories, and improving the accuracy of entity classification.
Patent Information
- Application Number
- CN202510791500.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-23
AI Technical Summary
Existing entity classification methods based on thought chain reasoning have difficulty distinguishing categories from their ancestor nodes when faced with complex category label systems, and lack understanding of individual categories, resulting in reduced classification accuracy.
A tree-shaped thinking chain reasoning method is used to construct a tree-structured category label system, allowing the large model to make choices step by step according to the hierarchical structure of the label system, judging by the attribute differences between the current node, child nodes and other nodes until it jumps to the most matching end node and outputs the category labels of the nodes along the way.
It improves the accuracy of entity classification, especially the understanding of abstract categories, enhances the ability of large models to distinguish categories, and makes up for the lack of structural information.
Smart Images

Figure CN120687904A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer science and technology, and in particular relates to an entity classification method based on tree-shaped thinking chain reasoning. Background Art
[0002] Entity classification tasks involve classifying an entity given its context. For example, if the entity "Beijing Institute of Technology" in the sentence "Beijing Institute of Technology is located in Beijing" has potential categories of "person" and "institution," then the entity should be classified into the "institution" category.
[0003] As the number of parameters in pre-trained models continues to increase, large models have shown increasingly powerful capabilities in many downstream tasks. The most common way to use large models is to directly utilize their reasoning capabilities, that is, to provide a clear text to let the large model understand the task to be completed, and then the large model will output the result of the task. Figure 1 As shown in the figure, the input on the right is the task provided, that is, completing an entity classification task. The output on the left is the output of the large model for this task.
[0004] The chain of thought (COT) is a step-by-step reasoning capability that a large model acquires through contextual learning. There are many different forms of chain of thought, but the core is to allow the large model to think step by step like a human when solving a task, rather than directly outputting the result. Similarly, entity classification tasks can also be solved through the reasoning ability of the large model. Figure 2 As shown, Figure 2 This approach leverages the direct reasoning capabilities of large models, combined with a chain-of-thought approach, to solve entity classification tasks. Specifically, given a task description, an entity and its context, and a system of category labels, the large model is tasked with reasoning step by step, ultimately outputting the target entity's category. This approach is referred to as "entity classification based on chain-of-thought reasoning."
[0005] Existing entity classification methods based on thought chain reasoning can perform well for simple entity classification tasks. However, if the category label system itself is more complex, this direct reasoning method has the following problems:
[0006] 1. Large models cannot distinguish categories from their ancestor node categories well: Figure 3 For example, in a complex tag system, there is generally a hierarchical relationship between tags, that is, the tag system can be converted into a multi-branch tree (a multi-branch tree such as Figure 4As shown in Figure 2, except for the root node A, each node will uniquely point to a node. Nodes that are not pointed to are called leaf nodes, such as K / I. This method may cause the large model to have a correct understanding of the input entity, but output the incorrect category of ancestor nodes (in the form of Figure 5 For example, let's assume a multi-branch tree with the root node A. All nodes directly pointing to A are A's children, such as B. Similarly, C is a child of B, and J is a child of C. Accordingly, A is also called B's parent. Ancestor nodes are all the nodes passed through from the root node to the current node. For a K node, its ancestor nodes include A / B / C / J. Assume that the correct category label for an input entity is "J." In the original "Entity Classification Based on Thought Chain Reasoning" method, due to the lack of node relationships between categories, the large model will easily output the ancestor nodes of node J, especially those that are close to node J. Since the two ancestor nodes have similar labels, the large model will have difficulty distinguishing them. For example, suppose there is a category "Person" and its child node "Athlete." Now, if there is an entity "Badminton Player" with the correct category label "Athlete," the large model will most likely output "Person" because "Badminton Player," as an "Athlete," is certainly a type of "Person."
[0007] 2. Lack of understanding of individual categories by large models: This method can only understand a category through the name of the current category, while ignoring the additional information that the label system tree can provide. This may make it difficult for large models to understand categories with relatively obscure names. Figure 6 For example, Figure 6 It is part of a more complex labeling system, namely the "[Place]" category and all of its descendant nodes in the labeling system tree. When using the "Entity Classification Based on Thought Chain Reasoning" method, due to the lack of relationships between nodes, the large model can only understand the "[Place]" category through its name. Since this category is not close to a leaf node and its name is relatively abstract, it is difficult for the large model to have a good understanding of it. Summary of the Invention
[0008] To solve the above problems, the present invention provides an entity classification method based on tree-shaped thinking chain reasoning. Through the form of tree-shaped thinking chain, the large model can make choices step by step according to the hierarchical structure of the label system during reasoning, thereby improving the accuracy of classification.
[0009] A method for entity classification based on tree-like reasoning chains. Text or images containing the entity to be classified, a tree-structured category label system, and a first prompt word are input into a large model, which then outputs the category label to which the entity to be classified belongs. The category label corresponding to any parent node in the tree-structured category label system is a summary of the overall meaning of the category labels corresponding to all its child nodes.
[0010] The first prompt word includes: the root node in the category label system is the entity; starting from the root node, following the tree structure, jump to the direct child nodes of the current node in sequence until jumping to the end node whose category label best matches the entity to be classified, and finally outputting the category labels corresponding to all nodes passed along the way from the root node to the end node in sequence; wherein, the method for selecting any node among all the nodes passed along the way is:
[0011] The attributes corresponding to each category label are learned through the category labels corresponding to the current node and the child nodes of the current node. The current node and any child node of the current node are judged to be selected based on the difference between the attributes corresponding to each category label and the attributes of the entity to be classified.
[0012] Furthermore, the tree-structured category labeling system is constructed using the labeling system Context-Dependent Fine-Grained Entity Type Tagging dataset, as follows:
[0013] Entity: [person, place, organization, other];
[0014] Characters: [artist, educator, athlete, business person, coach, doctor, legal person, title], Artists: [actor, writer, director, musician], Education: [student, teacher];
[0015] Location: [Architecture, Geography, Transportation, Celestial Body, City, Country, Park], Architecture: [Airport, Hospital, Hotel, Restaurant, Sports Facility, Theater], Geography: [Water, Island, Mountain], Transportation: [Bridge, Railway, Highway];
[0016] Organization: [Company, Educational Institution, Music Organization, Sports League, Sports Team, Stock Exchange, Transportation Agency], Company: [Broadcasting Organization, News Agency];
[0017] Other: [Art, Events, Health, Awards, Body Parts, Currency, Language, Organisms, Products, Food, Cultural Heritage, Internet, Law, Science, Sports and Leisure], Art: [Radio Programs, Films, Musical Works, Stage Performances, Literary Works], Events: [Accidents, Festivals, Natural Disasters, Sporting Events], Health: [Diseases, Treatments], Language: [Programming Languages, Natural Languages], Organisms: [Animals], Products: [Cameras, Cars, Computers, Mobile Phones, Software, Weapons].
[0018] Furthermore, the first prompt word also includes: the output category label cannot be an entity.
[0019] Furthermore, the first prompt word also includes:
[0020] If you jump to a node without a next-level category label, the category label corresponding to the node is directly output. Nodes without next-level category labels include: actor, writer, director, musician, student, teacher, athlete, business person, coach, doctor, legal person, title, airport, hospital, hotel, restaurant, sports facility, theater, water area, island, mountain range, bridge, railway, highway, celestial body, city, country, park, broadcasting organization, news organization, educational institution, music organization, sports league, sports team, stock exchange, transportation organization, radio program, movie, musical work, stage performance, literary work, accident, festival, natural disaster, sporting event, disease, treatment method, programming language, natural language, animal, camera, car, computer, mobile phone, software, weapon, food, cultural heritage, internet, law, science, sports and leisure.
[0021] Furthermore, the first prompt word also includes: if there is no category label attribute that is more suitable for the attribute of the entity to be classified in the child nodes of the current node, then stay at the current node and do not jump anymore.
[0022] Furthermore, the first prompt word also includes: learning the attributes corresponding to the category label represented by each node through the ancestor node, sibling node and descendant node of each node.
[0023] Furthermore, the entities to be classified in the text have been pre-selected with "[[]]", and the entities to be classified in the image have been pre-labeled with a specified color;
[0024] The first prompt word also includes: identifying the entity to be classified in the text by "[[]]" and identifying the entity to be classified in the picture by specifying the color.
[0025] Furthermore, the tree-structured category label system is input into the large model in the form of a dict in Python. Each key in the dict form represents a category label, and the value corresponding to each key is a list. Each value in the list represents the next-level category label of the category label corresponding to the key to which it belongs.
[0026] Beneficial effects:
[0027] 1. The present invention provides an entity classification method based on tree-shaped thinking chain reasoning, constructs a category label system with a tree structure, and allows the large model to take the root node as the starting point, follow the tree structure, and jump to the direct child nodes of the current node in sequence until it jumps to the end node whose category label best matches the entity to be classified, and finally outputs the category labels corresponding to all nodes along the way from the root node to the end node in sequence; the present invention's method of selecting layer by layer according to the hierarchical structure of the tree forces the large model to choose between the current node and its parent node, helping the large model to actively think about the differences between two similar categories, which is conducive to improving the accuracy of entity classification.
[0028] 2. The present invention provides an entity classification method based on tree-shaped thinking chain reasoning. By explicitly allowing the large model to understand each node through other related nodes (descendant nodes, sibling nodes, ancestor nodes), the large model's understanding of each category can be enhanced, especially the understanding of those categories with more abstract category names, overcoming the defects of the large model's inability to distinguish between categories and their ancestor node categories, and the lack of understanding of individual categories.
[0029] 3. The present invention provides an entity classification method based on tree-shaped thinking chain reasoning. The form of the label system is changed from list to dict, which explicitly tells the large model how to use the structural information in the form of dict to understand each category, and provides the large model with additional structural information of the label system, making up for the lack of structural information. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A diagram showing the process by which the large model uses direct reasoning to understand text content;
[0031] Figure 2 A diagram of the process of using thought chain reasoning to understand text content for the large model;
[0032] Figure 3 This is a schematic diagram of a simple labeling system;
[0033] Figure 4 It is a schematic diagram of a multi-branch tree;
[0034] Figure 5 This is another schematic diagram of a multi-branch tree;
[0035] Figure 6 Schematic diagram of a complex labeling system;
[0036] Figure 7 The purpose of the category labeling system is a tree structure. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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.
[0038] In order to alleviate the problems of "the large model cannot distinguish categories and their ancestor node categories well" and "the large model lacks understanding of individual categories". The present invention provides an entity classification method based on tree-shaped thinking chain reasoning, which inputs the text or picture containing the entity to be classified, the tree-structured category label system and the first prompt word into the large model, and the large model outputs the category label to which the entity to be classified belongs; wherein, the category label corresponding to any parent node in the tree-structured category label system is a summary of the overall meaning of the category labels corresponding to all child nodes connected to it; wherein, the entity to be classified in the text has been pre-selected with "[[]]", and the entity to be classified in the picture has been pre-marked with a specified color;
[0039] The first prompt word includes: the root node in the category label system is the entity; starting from the root node, following the tree structure, jump to the direct child nodes of the current node in sequence until jumping to the end node whose category label best matches the entity to be classified, and finally outputting the category labels corresponding to all nodes passed along the way from the root node to the end node in sequence; wherein, the method for selecting any node among all the nodes passed along the way is:
[0040] The attributes corresponding to each category label are learned through the category labels corresponding to the current node and the child nodes of the current node. The current node and any child node of the current node are judged to be selected based on the difference between the attributes corresponding to each category label and the attributes of the entity to be classified.
[0041] The first prompt word also includes: the output category label cannot be an entity; if jumping to a node without a next-level category label, the category label corresponding to the node is directly output; if there is no category label attribute in the child node of the current node that is more suitable for the attribute of the entity to be classified, then stay at the current node and no longer jump; learn the attributes corresponding to the category label represented by each node through the ancestor node, sibling node and descendant node of each node; identify the entity to be classified in the text through "[[]]", and identify the entity to be classified in the picture by specifying the color.
[0042] As can be seen, the present invention constructs an entity classification method based on tree-like thinking chain reasoning. Compared with the traditional entity classification method based on thinking chain reasoning (this method includes three parts in the input of the large model: a description of the task, a category label system (excluding the relationship between labels, only the names of all labels), and the entity and its context, and requires the large model to think step by step (but does not require the large model to think in a specific form)), the present invention mainly makes several improvements:
[0043] 1. Label system format: In the original "Thought Chain Reasoning-based Entity Classification Method," the label system is explicitly provided to the large model for selection. However, like previous entity classification tasks, this label system format is simply a list containing all label names, without the node relationships of the label system tree. To provide the structural information of the label system tree to the large model, the current method replaces the original list containing all label names with a dict format that contains the node relationships on the label system tree. The specific format of the dict is as follows:
[0044] a) Each key in the dict is a category with descendant nodes, and the corresponding value is a list containing the names of all direct child nodes of the current category in the tag system tree. Figure 7 For example, the direct child nodes of node A are B, C, and D.
[0045] b) For the root node category, it will only appear once as a key; for those categories that are not root nodes and have descendant nodes, they will appear once as a key and will also appear in the corresponding value list of the corresponding key of their parent node category; for those leaf nodes, they will only appear in the corresponding value list of the corresponding key of their parent node category.
[0046] c) The root node of the tag tree cannot be directly displayed through dict, so the root node of the current tag tree will be explicitly informed to the big model through input.
[0047] by Figure 7 For example, the original list-style label system is [A,B,C,D,E,F,G,H,I,J,K], and the modified dict format is {A:[B,C,D],B:[E],C:[F,G],D:[H],F:[I,J],J:[K]}.
[0048] 2. The big model's understanding of categories: In the original "entity classification based on thought chain reasoning" method, due to the lack of a label system tree structure, the big model can only understand and distinguish different categories through the name of the category. This method obviously cannot allow the big model to have a certain degree of understanding of all categories. When the label system is provided to the big model in the form of a label structure tree, in addition to the above-mentioned method of understanding different categories through label names, the big model can also understand the current category through the descendant nodes and ancestor nodes of a category. After providing the big model with a label system in the form of a dict, this method will explicitly remind the big model to use the dict to better understand the meaning of each node through the descendant nodes, sibling nodes, and ancestor nodes of a certain node.
[0049] 3. Thinking chain form: In the original "entity classification based on thinking chain reasoning" method, although prompt allows the big model to explicitly output the thinking process, for the final label selection, the big model directly selects from a large number of label systems. In order to help the big model better distinguish different labels in the label system, especially parent-child node labels, the current method allows the big model to no longer directly output the final selected category, but follows the tree structure of the label system, starting from the root node, and jumps to the direct child node category of the current node in sequence until it jumps to the category that the big model thinks is most suitable. Figure 7 For example, assuming the target category is "J", in the original "entity classification method based on thought chain reasoning", the large model will directly output category "J" at the end. In the current method, the large model needs to make choices step by step from the root node and finally jump to node "J". The jump path is "A->C->F->J", that is, after Figure 7 In the three choices shown in the figure, for the fourth choice, the large model needs to choose between J and its child node K: stay at J and not jump further, or jump to K. This approach can help alleviate the first problem mentioned above, "the large model cannot distinguish between categories and their ancestor node categories well," because it forces the model to consider whether to stay at the current node or continue jumping to the current node's direct child nodes at each jump, helping the large model to choose a node it deems more appropriate. When there are no relationships between nodes, the large model cannot distinguish between the correct category and the category of its ancestor node, because both include the target entity in terms of the entity scope defined by the category. However, when the relationship between nodes is provided to the large model, when the current node category and the direct child node category are compared, the concept of "more appropriate" can be defined. That is, if the current entity can be divided into a more fine-grained direct child node, then it should jump to that direct child node; otherwise, it should stay at the current node and stop jumping.
[0050] The following gives the detailed interaction process of the entity classification method based on tree-shaped thought chain reasoning.
[0051] 1. Note that the input I give you only contains one sentence and one entity to be classified in this sentence, or the input only contains a single picture. I will enclose the entity to be classified with "[[" and "]]". For example, for the input "I love [[China]]", the entity to be classified is "China"; at the same time, I will mark the entity to be classified in red in the picture.
[0052] 2. The following is the label system, which I will give you in the form of a dict in Python. Each key is a category label, and the value corresponding to this key is a list containing all the direct sub-node categories of the category corresponding to the key in the label system. So it can be seen that our label system is a tree structure, and the label of the parent node is a summary of the overall meaning of all the labels of the sub-nodes. The root node of this label tree is "entity". The following is the dict corresponding to the label system (using the label system used in the label system dataset proposed by Dan Gillick et al.):
[0053] {Entity: [Person, Place, Organization, Other], Person: [Artist, Education, Athlete, Business Person, Coach, Doctor, Lawyer, Title], Artist: [Actor, Writer, Director, Musician], Education: [Student, Teacher], Place: [Architecture, Geography, Transportation, Celestial Body, City, Country, Park], Architecture: [Airport, Hospital, Hotel, Restaurant, Sports Facility, Theater], Geography: [Body, Island, Mountain], Transportation: [Bridge, Railway, Highway], Organization: [Company, Educational Institution, Music Organization, Sports League, Sports Team, Stock Exchange, Transportation Agency], Company: [Advertising] =Broadcasting Organizations, News Organizations], Other: [Art, Events, Health, Awards, Body Parts, Currency, Language, Biology, Products, Food, Cultural Heritage, Internet, Law, Science, Sports and Leisure], Arts: [Broadcast Programs, Films, Musical Works, Stage Performances, Literary Works], Events: [Accidents, Festivals, Natural Disasters, Sporting Events], Health: [Diseases, Treatments], Languages: [Programming Languages, Natural Languages], Biology: [Animals], Products: [Cameras, Cars, Computers, Cell Phones, Software, Weapons]} 3. Your output can only select one label from the above labeling system, excluding the entity. However, it is important to note that you cannot output only that label. Instead, you need to start from the top level of the labeling system, the entity category, and follow the tree structure, outputting all labels along the way from the vertex label to the target label. This encourages you to think along the tree structure of the labeling system, rather than simply selecting the most appropriate label from among all possible options. This is because the divisions in this tree structure are well-founded and can help you think more rationally and clearly. For example, for the human entity, you first consider choosing from the four subcategories of the entity: people, places, organizations, and others. Then, you further consider whether to directly output the category or consider the subcategories of this category. Then, you continue to loop this selection process until you finally determine the category of people. You also need to output your thinking process.
[0054] 5. Since there is no description of the specific contents of each category, you need to understand them as much as possible through the names of these categories. More importantly, because you are asked to select from top to bottom according to the tree structure of the tag system, you need to choose the correct one from the current node and the subcategory of the node in each selection. One thing to note is that if you think that there are no suitable subnodes of the current node, then you should stay at the current node and do not jump. The subnode category only lists some special cases of the category and may not include all cases. For such cases, we will mark them as the node category. For example, for the character category, it has a lot of subnode categories, but these subnodes do not include all characters. Cases that are not in these subnodes but belong to characters should be marked as characters.
[0055] 6. Suppose you jump to a tree node category without subcategories, such as student, then directly output that category (that is, when reaching the leaf node and there is no further jump possible, just output the leaf node). If the category has child nodes, you need to consider whether to directly output that category or continue to consider the subcategories of that category.
[0056] Among them, the nodes without the next-level category labels include: actor, writer, director, musician, student, teacher, athlete, businessperson, coach, doctor, legal person, title, airport, hospital, hotel, restaurant, sports facility, theater, water area, island, mountain, bridge, railway, road, celestial body, city, country, park, broadcasting organization, news agency, educational institution, music organization, sports league, sports team, stock exchange, transportation agency, radio program, movie, music work, stage performance, literary work, accident, festival, natural disaster, sports event, disease, treatment method, programming language, natural language, animal, camera, car, computer, mobile phone, software, weapon, food, cultural heritage, Internet, law, science, sports and leisure.
[0057] 7. Output: "Please think step by step (remember to output the category you choose at the end and enclose it with \"[[\" and \"]]\", note that this category must be within the given label system):", "output": "person_anthropomorphic".
[0058] In summary, in the original method, the list label system form lacks the structural relationship between categories. So for the large model, a category and its ancestor nodes have no connection in themselves, but the meaning of a category is inherently included by the ancestor node categories, and the category meanings of the two are similar, so it is difficult to distinguish. However, in the present invention, on the one hand, the list form is transformed into a dict form to provide the structural information to the large model, making up for the lack of structural information; on the other hand, by explicitly allowing the large model to understand each node through other related nodes (descendant nodes, sibling nodes, ancestor nodes), the understanding of each category by the large model can be enhanced, and thus the ability to distinguish each category and its ancestor nodes can be enhanced; in addition, this way of selecting layer by layer according to the tree hierarchy structure forces the large model to choose between the current node and its parent node, helping the large model to actively think about the differences between two similar categories.
[0059] Of course, the present invention can also have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can of course make various corresponding changes and deformations according to the present invention, but these corresponding changes and deformations should all fall within the protection scope of the appended claims of the present invention.
Claims
1. An entity classification method based on tree-shaped thinking chain reasoning, characterized in that: The text or image containing the entity to be classified, the tree-structured category label system, and the first prompt word are input into the large model, and the large model outputs the category label to which the entity to be classified belongs. The category label corresponding to any parent node in the tree-structured category label system is a summary of the overall meaning of the category labels corresponding to all child nodes connected to it. The first prompt word includes: the root node in the category label system is the entity; starting from the root node, following the tree structure, jump to the direct child nodes of the current node in sequence until jumping to the end node whose category label best matches the entity to be classified, and finally outputting the category labels corresponding to all nodes passed along the way from the root node to the end node in sequence; wherein, the method for selecting any node among all the nodes passed along the way is: The attributes corresponding to each category label are learned through the category labels corresponding to the current node and the child nodes of the current node. The current node and any child node of the current node are judged to be selected based on the difference between the attributes corresponding to each category label and the attributes of the entity to be classified.
2. The entity classification method based on tree-shaped thinking chain reasoning according to claim 1 is characterized in that: The tree-structured category tagging system is constructed using the tagging system Context-Dependent Fine-Grained Entity Type Tagging, as follows: Entity: [person, place, organization, other]; Characters: [artist, educator, athlete, business person, coach, doctor, legal person, title], Artists: [actor, writer, director, musician], Education: [student, teacher]; Location: [Architecture, Geography, Transportation, Celestial Body, City, Country, Park], Architecture: [Airport, Hospital, Hotel, Restaurant, Sports Facility, Theater], Geography: [Water, Island, Mountain], Transportation: [Bridge, Railway, Highway]; Organization: [Company, Educational Institution, Music Organization, Sports League, Sports Team, Stock Exchange, Transportation Agency], Company: [Broadcasting Organization, News Agency]; Other: [Art, Events, Health, Awards, Body Parts, Currency, Language, Organisms, Products, Food, Cultural Heritage, Internet, Law, Science, Sports and Leisure], Art: [Radio Programs, Films, Musical Works, Stage Performances, Literary Works], Events: [Accidents, Festivals, Natural Disasters, Sporting Events], Health: [Diseases, Treatments], Language: [Programming Languages, Natural Languages], Organisms: [Animals], Products: [Cameras, Cars, Computers, Mobile Phones, Software, Weapons].
3. The entity classification method based on tree-shaped thinking chain reasoning as claimed in claim 2, characterized in that: The first prompt word also includes: the output category label cannot be an entity.
4. The entity classification method based on tree-shaped thinking chain reasoning according to claim 2 is characterized in that: The first prompt word also includes: If you jump to a node without a next-level category label, the category label corresponding to the node is directly output. Nodes without next-level category labels include: actor, writer, director, musician, student, teacher, athlete, business person, coach, doctor, legal person, title, airport, hospital, hotel, restaurant, sports facility, theater, water area, island, mountain range, bridge, railway, highway, celestial body, city, country, park, broadcasting organization, news organization, educational institution, music organization, sports league, sports team, stock exchange, transportation organization, radio program, movie, musical work, stage performance, literary work, accident, festival, natural disaster, sporting event, disease, treatment method, programming language, natural language, animal, camera, car, computer, mobile phone, software, weapon, food, cultural heritage, internet, law, science, sports and leisure.
5. The entity classification method based on tree-shaped thinking chain reasoning as claimed in claim 2, characterized in that: The first prompt word also includes: if there is no category label attribute that is more suitable for the attribute of the entity to be classified in the child nodes of the current node, then stay at the current node and do not jump.
6. The entity classification method based on tree-shaped thinking chain reasoning according to claim 1 is characterized in that: The first prompt word also includes: learning the attributes corresponding to the category label represented by each node through the ancestor node, sibling node and descendant node of each node.
7. The entity classification method based on tree-shaped thinking chain reasoning according to claim 1 is characterized in that: The entities to be classified in the text have been pre-selected with "[[]]", and the entities to be classified in the image have been pre-marked with a specified color; The first prompt word also includes: identifying the entity to be classified in the text through "[[]]" and identifying the entity to be classified in the picture through specified color.
8. The entity classification method based on tree-shaped thinking chain reasoning according to claim 1 is characterized in that: The tree-structured category label system is input into the large model in the form of a dict in Python. Each key in the dict form represents a category label, and the value corresponding to each key is a list. Each value in the list represents the next-level category label of the category label corresponding to the key to which it belongs.
Citation Information
Patent Citations
Disease information mining and retrieval method and device, electronic equipment and storage medium
CN114400099A
Object classification method and device, medium and equipment
CN120030381A