Named Entity Recognition: Definition and Examples
Named Entity Recognition (NER) is a natural language processing technique that automatically identifies and classifies named entities (people, places, organizations, dates, etc.) in a text.
Full definition
Named Entity Recognition (NER) is a fundamental subtask of natural language processing (NLP). It involves detecting mentions of real-world entities in raw text and categorizing them into predefined classes such as person names, organizations, geographical locations, dates, monetary amounts, or products.
This technology historically relied on rule-based and dictionary-based approaches, but modern methods predominantly use deep learning models, especially Transformer architectures like BERT or GPT. These models can understand the context surrounding each word to determine whether it is an entity and, if so, of which type.
In the context of prompt engineering, NER is particularly useful for structuring unstructured data. One can ask an LLM to extract named entities from a text, classify them by category, or use them as a basis for more complex tasks such as building knowledge graphs or targeted sentiment analysis.
NER has concrete applications in many fields: media monitoring (identifying actors mentioned in articles), legal analysis (extracting stakeholders from contracts), healthcare (spotting drug names and pathologies), and customer service (detecting products or services mentioned in complaints).
Etymology
The term 'Named Entity' was introduced at the sixth Message Understanding Conference (MUC) in 1996, organized by DARPA. The concept arose from the need to evaluate information extraction systems on standardized tasks. 'Named' refers to proper nouns and referring expressions, while 'Recognition' denotes the automatic process of detection and classification.
Concrete examples
Extracting entities from a news article
Analyze the following text and extract all named entities, classifying them by category (Person, Organization, Location, Date, Amount):
"Emmanuel Macron met with the CEO of TotalEnergies at the Élysée on March 12, 2026 to discuss an investment of 2 billion euros in renewable energy."
Respond in a structured table format.
Anonymization of sensitive documents
Identify all named entities of type Person and Organization in this document, then replace them with anonymous identifiers (PERSON_1, ORGANIZATION_1, etc.) while maintaining reference consistency throughout the text.
Building a knowledge graph from texts
From this corpus of texts, extract all named entities and the relationships between them. For each identified relationship, indicate: source entity, relationship type, target entity. Format the result in JSON suitable for a knowledge graph.
Practical usage
In prompt engineering, NER is primarily used to ask an LLM to extract and structure precise information from raw text. Results can be refined by specifying the desired entity categories, the expected output format (JSON, table, list), and by providing examples to guide the model via few-shot prompting. This technique is particularly powerful for automating document analysis, information monitoring, and data preparation.
Related concepts
FAQ
What is the difference between NER and keyword extraction?
Are LLMs like ChatGPT or Claude good at NER?
How can I improve NER accuracy in my prompts?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
Natural Language Generation: Definition and Examples
Natural Language Generation (NLG) is the branch of artificial intelligence that enables machines to produce human language text automatically
Natural Language Processing: Definition and Examples
Natural Language Processing (NLP) is a branch of artificial intelligence that enables machines to understand, interpret, and generate human language.
Natural Language Understanding: Definition and Examples
Natural Language Understanding (NLU) is a branch of artificial intelligence that enables machines to understand, interpret and extract meaning from
Needle In Haystack: Definition and Examples
The Needle In a Haystack (NIAH) test is an evaluation method that measures a language model's ability to retrieve a specific piece of information buried in a long context.
Negative Prompting: Definition and Examples
Negative prompting is a technique that involves explicitly telling an AI model what it should not generate, thereby refining the results by excluding undesirable elements.
Neural Architecture Search: Definition and Examples
Neural Architecture Search (NAS) is a machine learning technique that automates the design of neural network architectures by exploring...
Get new prompts every week
Join our newsletter.