An evolved prompt-based low-resource named entity recognition method and system
By using an evolutionary prompting approach, pseudo-labels and sample libraries are generated using a large language model, and instructions are iteratively updated. This solves the accuracy problem of named entity recognition in low-resource scenarios and improves the model's recognition ability in data-changing and noisy environments.
Patent Information
- Application Number
- CN202510970865.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-03-11
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies struggle to achieve named entity recognition in low-resource scenarios or emerging fields, and the models lack dynamic adjustment mechanisms in the face of changing data distribution or noisy environments, resulting in insufficient recognition accuracy.
The system generates initial pseudo-labels by prompting a large language model with zero-shot instructions, constructs a definition and difference sample library, generates a sample set using clustering and threshold filtering strategies, and performs entity prediction by iteratively updating zero-shot instructions, integrating historical results and dynamically adjusting weights.
It improves the accuracy of named entity recognition, effectively identifies the feature differences between different entity types and similar entity types under low resource conditions, and enhances the dynamic adaptability of the model.
Smart Images

Figure CN120996040A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to an evolved prompt-based low-resource named entity recognition method and system, and belongs to the technical field of prompt learning. BACKGROUND
[0002] Named Entity Recognition (NER) is a fundamental and critical task in the field of Natural Language Processing (NLP), and its main goal is to identify entities with specific meanings from text, such as names, place names, organization names, dates, etc. These entity information plays a crucial role in subsequent text understanding, information extraction, knowledge graph construction and many other applications.
[0003] The patent document with publication number "CN107563444A" discloses a zero-shot image classification method and system. The problems of this method are: the semantic auxiliary information of class labels (such as artificially defined attributes, WordNet hierarchy, etc.) needs to be obtained in advance, which may be difficult to achieve in low-resource scenarios or emerging fields (such as professional terms, small languages), significantly increasing the application threshold. Optimization relies on fixed regularization terms (such as semantic consistency constraints), and model updating is only completed through convex optimization methods (such as gradient descent), lacking a dynamic adjustment mechanism. When facing data distribution changes or noise, it is difficult to iteratively correct semantic embedding bias. SUMMARY
[0004] In order to solve the problems existing in the prior art, the application provides a low-resource named entity recognition method based on evolved prompt.
[0005] The technical solution of the application is as follows: On the one hand, the application provides a low-resource named entity recognition method based on evolved prompt, comprising the following steps: S1, prompting a large language model LLM to generate initial entity predictions for an unlabeled data set through zero-shot instruction, to obtain an initial pseudo-sample set containing text and pseudo-labels; S2, based on the initial pseudo-sample set, constructing a definition sample library of entity types and a similar entity type difference sample library, and generating a definition sample subset and a difference sample subset of entity types through clustering or a threshold setting screening strategy; S3, generating the definition and difference of entity types based on the definition sample subset and the difference sample subset using the large language model LLM; S4, randomly selecting 2 pseudo samples from each definition sample subset of entity types as context learning samples; S5, updating the zero-shot instruction based on the definition, difference, and context learning example, prompting the large language model (LLM) to perform a new round of entity prediction through the updated zero-shot instruction; S6, updating the initial pseudo example set by integrating the historical entity prediction results and the strategy of dynamically adjusting the weight of the historical entity prediction results in the new round of entity prediction; S7, performing step S1 until the preset termination condition is met.
[0006] As a preferred embodiment, the definition example library is expressed in a formula as: ; ; wherein, represents the definition example library of entity type ; represents the th element of the definition example library ; represents the number of elements in the definition example library ; represents the th text in the initial pseudo example set, represents the th pseudo label in the initial pseudo example set, represents the th pseudo label in the initial pseudo example set ;
[0007] As a preferred embodiment, the similar entity type difference example library is expressed in a formula as: ; ; wherein, represents the similar entity type difference example library ; represents the th element of the similar entity type difference example library ; represents the number of elements in the similar entity type difference example library ; represents the th pseudo label in the initial pseudo example set, represents the th text in the initial pseudo example set, represents the th pseudo label in the initial pseudo example set ; represents the th pseudo label in the initial pseudo example set And it belongs to the entity type The A text, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The number of texts, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The number of texts; The method for determining similar entity types is as follows: Entity type and entity type The number of identical elements is greater than or equal to the preset similarity threshold.
[0008] In a preferred embodiment, the method for obtaining the defined sample set and the difference sample set is as follows: For the definition sample library The KMeans clustering algorithm is used to define the sample library. The element Clustering is performed on the embedding representation in the semantic space, and entity types are obtained by determining cluster centers. Definition Sample Set ; A sample library of differences for similar entity types Filter by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. .
[0009] As a preferred embodiment, the method for obtaining the definition of the entity type is as follows: Based on the definition sample set Instructions for generating large language models (LLMs) Entity type Definition : ; wherein, represents an output probability distribution of the large language model during reasoning, represents a definition of a task description, represents a definition of an entity type of the last iteration, represents a definition of an entity type ; The difference obtaining method of the entity type is: based on the difference example set indicates that the large language model LLM generates the difference between the entity type and the entity type : : ; wherein, represents a difference task description, represents a difference example set of the entity type and the entity type .
[0010] On the other hand, the application also provides a low-resource named entity recognition system based on an evolving prompt, comprising: An entity prediction module: prompting a large language model LLM to generate an initial entity prediction for an unlabeled data set through zero-shot instructions, to obtain an initial pseudo-example set containing text and pseudo-labels; An example library module: based on the initial pseudo-example set, constructing a definition example library and a similar entity type difference example library of the entity type, and generating a definition example set and a difference example set of the entity type through a clustering or threshold setting screening strategy; A definition and difference information module: using a large language model LLM to generate the definition and difference of the entity type based on the definition example set and the difference example set; A learning example module: randomly selecting 2 pseudo-examples from the definition example set of each entity type as context learning examples; An iterative prediction module: updating the zero-shot instructions based on the definition, difference and context learning examples, prompting the large language model LLM to perform a new round of entity prediction through the updated zero-shot instructions; updating the initial pseudo-example set by integrating the historical entity prediction results in the new round of entity prediction and dynamically adjusting the historical entity prediction result weight strategy; The iterative updating module: sequentially executes the entity prediction module, the sample library module, the definition and difference information module, the learning sample module, and the iterative prediction module and performs a loop until a preset termination condition is met.
[0011] As a preferred embodiment, the defined sample library is expressed in a formula as: ; ; wherein, represents the defined sample library of the entity type ; represents the first element of the defined sample library of the entity type ; represents the number of elements in the defined sample library ; represents the first text in the initial pseudo sample set, represents the first pseudo label in the initial pseudo sample set that belongs to the entity type , represents the number of pseudo labels.
[0012] As a preferred embodiment, the similar entity type difference sample library is expressed in a formula as: ; ; wherein, represents the similar entity type difference sample library of the entity type , ; represents the first element of the similar entity type difference sample library ; represents the number of elements in the similar entity type difference sample library ; represents the first pseudo label in the initial pseudo sample set, represents the first text in the initial pseudo sample set that belongs to the first pseudo label and belongs to the entity type , represents the first text in the initial pseudo sample set that belongs to the first pseudo label and belongs to the entity type , represents the first text in the initial pseudo sample set that belongs to the second pseudo label . And it belongs to the entity type The number of texts, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The number of texts; The method for determining similar entity types is as follows: Entity type and entity type The number of identical elements is greater than or equal to the preset similarity threshold.
[0013] In a preferred embodiment, the method for obtaining the defined sample set and the difference sample set is as follows: For the definition sample library The KMeans clustering algorithm is used to define the sample library. The element Clustering is performed on the embedding representation in the semantic space, and entity types are obtained by determining cluster centers. Definition Sample Set ; A sample library of differences for similar entity types Filter by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. .
[0014] As a preferred embodiment, the method for obtaining the definition of the entity type is as follows: Based on the definition sample set Instructions for generating large language models (LLMs) Entity type Definition : ; in, This represents the output probability distribution when a large language model performs inference. denotes a definition task description, denotes the last iteration entity type definition, denotes the entity type definition example set; The difference acquisition method of the entity type is: based on the difference example set indicates that the large language model LLM generates the difference between the first entity type and the first entity type : ; wherein, denotes a difference task description, denotes the entity type and the entity type difference example set.
[0015] The present application has the following beneficial effects: The present application can fully utilize the knowledge learned by the large language model on a large amount of text to generate more accurate pseudo labels for subsequent entity recognition by prompting the large language model with zero-shot instructions to generate initial entity predictions on unlabeled data sets. Based on the initial pseudo example set, the definition example library of the entity type and the difference example library of the similar entity type are constructed, which can more comprehensively cover the features of different entity types and the differences between similar entity types, and provide data support for generating more accurate entity type definitions and differences. Using the large language model to generate the definition and difference of the entity type based on the definition example set and the difference example set can more accurately describe the features of the entity type and the differences between similar entity types, thereby improving the accuracy of entity recognition. Updating the zero-shot instruction based on the generated definition, difference and context learning examples can make the large language model more accurately identify entities in the next round of entity prediction, further improving the accuracy of entity recognition. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 The present application is a method implementation flowchart. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0018] It should be understood that the step numbers used herein are only for the convenience of description and are not limited as the execution sequence of the steps.
[0019] It should be understood that the terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application and the appended claims, "a", "an", and "the" in singular form are intended to include plural forms unless the context clearly indicates otherwise.
[0020] The terms "comprise" and "include" indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0021] The term "and / or" means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.
[0022] Embodiment one: Referring to Figure 1 The present application provides an evolved prompt-based low-resource named entity recognition method, comprising the following steps: S1, prompting a large language model LLM to generate initial entity predictions for an unlabeled data set through zero-shot instruction, to obtain an initial pseudo-sample set containing text and pseudo-labels; S2, based on the initial pseudo-sample set, constructing a definition sample library of entity types and a similar entity type difference sample library, and generating a definition sample subset and a difference sample subset of entity types through clustering or a threshold setting filtering strategy; The entity types include "PLOT", "GENRE", and "AVERAGE" in the Movie data set; S3, based on the definition sample subset and the difference sample subset, using a large language model LLM to generate definitions and differences of entity types; S4, randomly selecting 2 pseudo samples from each definition sample subset of entity types as context learning samples; S5, updating the zero-shot instruction based on the definitions, differences, and context learning samples, and prompting the large language model LLM to perform a new round of entity prediction through the updated zero-shot instruction; S6, updating the initial pseudo-sample set by integrating the historical entity prediction results in the new round of entity prediction and adjusting the weight of the historical entity prediction results dynamically; S7, performing step S1 until a preset termination condition is met, and the termination condition includes a preset number of iterations.
[0023] As a preferred implementation, the definition example library is expressed in a formula as: ; ; wherein, denotes the definition example library of entity type , the th element of the definition example library , denotes the number of elements in the definition example library , denotes the th text in the initial pseudo example set, denotes the th pseudo label in the th text in the initial pseudo example set belonging to entity type , denotes the number of pseudo labels.
[0024] As a preferred implementation, the similar entity type difference example library is expressed in a formula as: ; ; wherein, denotes the similar entity type difference example library with similar entity types , , the th element of the similar entity type difference example library , denotes the number of elements in the similar entity type difference example library , denotes the th pseudo label in the initial pseudo example set, denotes the th text in the initial pseudo example set belonging to the th pseudo label and belonging to entity type , denotes the th text in the initial pseudo example set belonging to the th pseudo label and belonging to entity type , denotes the number of texts in the initial pseudo example set belonging to the th pseudo label and belonging to entity type , denotes the number of texts in the initial pseudo example set belonging to the And it belongs to the entity type The number of texts; The method for determining similar entity types is as follows: Entity type and entity type The number of identical elements is greater than or equal to the preset similarity threshold.
[0025] In a preferred embodiment, the method for obtaining the defined sample set and the difference sample set is as follows: For the definition sample library The KMeans clustering algorithm is used to define the sample library. The element Clustering is performed on the embedding representation in the semantic space, and entity types are obtained by determining cluster centers. Definition Sample Set ; A sample library of differences for similar entity types Filter by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. .
[0026] As a preferred embodiment, the method for obtaining the definition of the entity type is as follows: Based on the definition sample set Instructions for generating large language models (LLMs) Entity type Definition : ; in, This represents the output probability distribution when a large language model performs inference. This indicates the definition of the task description. Indicates the entity type of the previous iteration. Definition, Indicate entity type definition example set; The difference obtaining method of the entity type is: Based on the difference example set Indicating the large language model LLM generates the first entity type and the difference of the first entity type : ; wherein, indicates the difference task description, indicates the entity type and the entity type difference example set.
[0027] The present embodiment adopts four benchmark dialogue data sets for evaluation, namely CONLL03, ACE05, MIT-Movie data set and MIT-Restaurant data set. The detailed information of the data set is shown in Table 1.
[0028] Table 1 Data set information table
[0029] In order to prove the effectiveness of the present application, the present application is compared with five baseline frameworks: 1、InstructUIE: Through instruction fine-tuning, the general ability of the model to extract information is enhanced, and strong zero-shot generalization to unseen data is realized.
[0030] 2、Gollie: The entity type guide designed by hand is added in the prompt, and the ability of the model to follow the entity type guide is enhanced through instruction fine-tuning.
[0031] 3、CodeIE: Through the use of code style prompts and large language models based on code pre-training, the ability of the model to output structured content is improved, so that it can more effectively complete the information extraction task.
[0032] 4、Code4UIE: Using annotated data, context demonstrations are selected according to sample similarity.
[0033] 5、Self-Improving: Through the idea of ensemble learning, multiple reasoning paths are designed and the self-learning ability of the large language model is stimulated to prompt them to complete the zero-shot named entity recognition task.
[0034] The comparison results are shown in Table 2: Table 2 Comparison results table
[0035] In Table 2, #, *, and & represent the large language model frameworks used by the models, namely gpt-3.5-turbo, Qwen2-72B-Chat-Int4, and Llama3.1-70B-Chat-Int4, respectively.
[0036] The ablation results are shown in Table 3: Table 3 Ablation Results
[0037] Example 2: This embodiment also provides a low-resource named entity recognition system based on evolutionary prompts, including: Entity prediction module: The zero-shot instruction prompts the large language model LLMs to generate initial entity predictions on the unlabeled dataset, resulting in an initial pseudo-sample set containing text and pseudo-labels. Sample Library Module: Based on the initial pseudo-sample set, construct a definition sample library for entity types and a difference sample library for similar entity types, and generate a definition sample set and a difference sample set for entity types through clustering or a filtering strategy that sets a threshold; Definition and Difference Information Module: Based on the definition sample set and difference sample set, large language models (LLMs) are used to generate the definitions and differences of entity types; Learning Samples Module: Randomly select two pseudo-samples from the set of definition samples for each entity type as context learning samples; Iterative prediction module: Updates zero-sample instructions based on the definition, differences, and context learning examples, prompts large language models (LLMs) to perform a new round of entity prediction through the updated zero-sample instructions; updates the initial pseudo-sample set by integrating historical entity prediction results and dynamically adjusting the weights of historical entity prediction results in the new round of entity prediction. Iterative update module: The entity prediction module, sample library module, definition and difference information module, learning sample module and iterative prediction module are executed sequentially and looped until the preset termination condition is met.
[0038] In a preferred embodiment, the definition sample library is expressed by the formula: ; ; in, Indicates entity type is Definition Sample Library The One element, Indicates the definition of the sample library The number of elements in the middle, Represents the first pseudo-sample in the initial pseudo-sample set. A text, Denotes the first pseudo-sample set. text The middle belongs to the entity type The A pseudo-label, Indicates the number of pseudo-tags.
[0039] In a preferred embodiment, the similar entity type difference sample library is expressed by the formula: ; ; in, Indicates entities with similar types , Similar entity type difference sample library The One element, A sample library representing differences in similar entity types The number of elements in the middle, Represents the first pseudo-sample in the initial pseudo-sample set. A pseudo-label, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The A text, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The A text, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The number of texts, Indicates that the initial set of pseudo-samples belongs to the first... A pseudo-label And it belongs to the entity type The number of texts; The method for determining similar entity types is as follows: Entity type and entity type The number of identical elements is greater than or equal to the preset similarity threshold.
[0040] In a preferred embodiment, the method for obtaining the defined sample set and the difference sample set is as follows: For the definition sample library The KMeans clustering algorithm is used to define the sample library. The element Clustering is performed on the embedding representation in the semantic space, and entity types are obtained by determining cluster centers. Definition Sample Set ; A sample library of differences for similar entity types Filter by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. .
[0041] As a preferred embodiment, the method for obtaining the definition of the entity type is as follows: Based on the definition sample set Instructions for generating large language models (LLMs) Entity type Definition : ; in, This represents the output probability distribution when a large language model performs inference. This indicates the definition of the task description. Indicates the entity type of the previous iteration. Definition, Indicate entity type The definition of a sample set; The method for obtaining differences in entity types is as follows: Based on the difference sample set Instructions for generating large language models (LLMs) Entity type With the Entity type Differences : ; in, This indicates a description of the difference in tasks. Representing entity types With entity types Differential example set.
[0042] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0043] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be realized in electronic hardware, computer software and a combination of electronic hardware and computer software. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0044] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0045] In several embodiments provided in the present application, any function realized in the form of a software function unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory; hereinafter referred to as: ROM), a random access memory (Random Access Memory; hereinafter referred to as: RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0046] The above merely illustrates the embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.
Claims
1. An evolved prompt-based low-resource named entity recognition method, characterized in that, The method comprises the following steps: S1, prompting a large language model LLM to generate initial entity prediction on an unlabeled data set through zero-shot instruction, to obtain an initial pseudo sample set containing text and pseudo labels; S2, based on the initial pseudo sample set, constructing a definition sample library of entity types and a similar entity type difference sample library, and generating a definition sample subset and a difference sample subset of entity types through clustering or a threshold setting screening strategy; S3, generating the definition and difference of entity types based on the definition sample subset and the difference sample subset using the large language model LLM; S4, randomly selecting two pseudo samples from the definition sample subset of each entity type as context learning samples; S5, updating the zero-shot instruction based on the definition, difference and context learning samples, and prompting the large language model LLM to perform a new round of entity prediction through the updated zero-shot instruction; S6, updating the initial pseudo sample set by integrating the historical entity prediction results and dynamically adjusting the weight of the historical entity prediction results in the new round of entity prediction; S7, performing step S1 until a preset termination condition is met.
2. The method of claim 1, wherein the method further comprises: The definition sample library is expressed by a formula as: ; ; wherein, represents the entity type is a definition example library of the first element, represents the number of elements in the definition example library , represents the first text in the initial pseudo example set, represents the first text in the initial pseudo example set belongs to the entity type the first pseudo label, represents the number of pseudo labels. 3.The method of claim 2, wherein, The similar entity type difference sample library is expressed by a formula as: ; ; wherein, denotes similar entity types , a library of similar entity type difference examples of the th element, denotes the number of elements in the library of similar entity type difference examples , denotes the th pseudo label in the initial pseudo example set, denotes the th text in the initial pseudo example set that belongs to the th pseudo label and belongs to the entity type , denotes the th text in the initial pseudo example set that belongs to the th pseudo label and belongs to the entity type , denotes the number of texts in the initial pseudo example set that belong to the th pseudo label and belong to the entity type , denotes the number of texts in the initial pseudo example set that belong to the th pseudo label and belong to the entity type ; The similar entity type judgment method is: entity type and entity type the number of identical elements is greater than or equal to a preset similarity threshold.
4. The method of claim 3, wherein the method further comprises: The definition sample subset and the difference sample subset acquisition method are: For the definition sample library The KMeans clustering algorithm is used to define the sample library. The element Clustering is performed on the embedding representation in the semantic space, and entity types are obtained by determining cluster centers. Definition Sample Set ; Divergent example library for similar entity types by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. .
5. The method of claim 4, wherein the method further comprises: The definition acquisition method of the entity type is: Based on defining a sample set Indicating large language models, LLMs, to generate a first entity type definition : ; wherein, denotes an output probability distribution of the large language model when reasoning, denotes a definition of a task description, denotes a definition of an entity type of the last iteration, denotes a definition example subset of an entity type, denotes a definition example subset of an entity type. The difference acquisition method of the entity type is: Differentially based example subset Indicating a large language model (LLM) to generate a first entity type differently from a second entity type differently from a second entity type ; wherein, represents a difference task description, represents an entity type with an entity type a difference example set.
6. An evolved hint-based low-resource named entity recognition system, characterized in that, The method comprises: An entity prediction module: prompting a large language model LLM to generate initial entity prediction on an unlabeled data set through zero-shot instruction, to obtain an initial pseudo sample set containing text and pseudo labels; A sample library module: based on the initial pseudo sample set, constructing a definition sample library of entity types and a similar entity type difference sample library, and generating a definition sample subset and a difference sample subset of entity types through clustering or a threshold setting screening strategy; A definition and difference information module: generating the definition and difference of entity types based on the definition sample subset and the difference sample subset using the large language model LLM; A learning sample module: randomly selecting two pseudo samples from the definition sample subset of each entity type as context learning samples; An iterative prediction module: updating the zero-shot instruction based on the definition, difference and context learning samples, and prompting the large language model LLM to perform a new round of entity prediction through the updated zero-shot instruction; Updating the initial pseudo sample set by integrating the historical entity prediction results and dynamically adjusting the weight of the historical entity prediction results in the new round of entity prediction; An iterative update module: sequentially executing the entity prediction module, the sample library module, the definition and difference information module, the learning sample module and the iterative prediction module and performing circulation until a preset termination condition is met.
7. The low resource named entity recognition system based on evolved cues according to claim 6, wherein, The definition sample library is expressed by a formula as: ; ; wherein, represents the entity type is a definition example library of the first element, represents the number of elements in the definition example library , represents the first text in the initial pseudo example set, represents the first text in the initial pseudo example set belongs to the entity type the first pseudo label, represents the number of pseudo labels.
8. The low resource named entity recognition system based on evolved cues according to claim 7, wherein, The similar entity type difference sample library is expressed by a formula as: ; ; wherein, denotes similar entity types , a library of similar entity type difference examples of the th element, denotes the number of elements in the library of similar entity type difference examples , denotes the th pseudo label in the initial pseudo example set, denotes the th text in the initial pseudo example set that belongs to the th pseudo label and belongs to the entity type , denotes the th text in the initial pseudo example set that belongs to the th pseudo label and belongs to the entity type , denotes the number of texts in the initial pseudo example set that belong to the th pseudo label and belong to the entity type , denotes the number of texts in the initial pseudo example set that belong to the th pseudo label and belong to the entity type ; The similar entity type judgment method is: entity type and entity type the number of identical elements is greater than or equal to a preset similarity threshold.
9. The low resource named entity recognition system based on evolved cues according to claim 8, wherein, The definition sample subset and the difference sample subset acquisition method are: For defining the example base , the KMeans clustering algorithm is used to cluster the embedding representation of the first elements of the defining example base in the semantic space, and the defining example subset of entity types is obtained by demarcating the cluster centers ; Divergent example library for similar entity types by setting an importance threshold: If similar entity type difference sample library The element Satisfy belongs to the first A pseudo-label And it belongs to the entity type Number of texts Greater than or equal to the importance threshold and belonging to the first A pseudo-label And it belongs to the entity type Number of texts If the condition is also greater than or equal to the importance threshold, then retain it. Otherwise, filter to obtain a set of difference samples. . 10.The low-resource named entity recognition system based on evolved hints according to claim 9, wherein, The definition acquisition method of the entity type is: Based on defining a sample set Indicating a large language model LLM to generate a first entity type definition : ; wherein, denotes an output probability distribution of the large language model when reasoning, denotes a definition of a task description, denotes a definition of an entity type of the last iteration, denotes a definition of an entity type, denotes a definition example subset of an entity type. The difference acquisition method of the entity type is: Differentially based example subset Indicating a large language model (LLM) to generate a first entity type differently from a second entity type differently from a second entity type ; wherein, represents a difference task description, represents an entity type with an entity type a difference example set.
Citation Information
Patent Citations
Zero sample image classification method and system
CN107563444A