Entity linking is the natural language processing task of mapping each mentioned name in a text to a unique identifier in a knowledge base, such as an encyclopedia entry or a node in a knowledge graph. It answers not only that a span is a name, but which specific real-world entity the span refers to.
In speech & language AI, entity linking is also called named entity linking and is a core component of information extraction pipelines within artificial intelligence. It turns ambiguous strings such as “Jordan” or “Mercury” into grounded, machine-readable references that search engines, question answering systems and analytics tools can join with structured data.
How entity linking resolves a mention
Entity linking resolves a mention through a pipeline of mention detection, candidate generation and disambiguation. Each stage narrows the problem: the first finds spans worth linking, the second proposes a short list of plausible entities, and the third selects the best one or declares that none fits.
The table below summarizes what each stage consumes and produces.
| Stage | Input | Output | Typical technique |
|---|---|---|---|
| Mention detection | Raw text | Spans of candidate names | Named entity recognition or span classifier |
| Candidate generation | Mention string | Top 10 to 100 entities | Alias tables, dense retrieval |
| Disambiguation | Mention, context, candidates | One entity or NIL | Cross-encoder ranking |
| NIL handling | Low-confidence results | New or unlinked entity label | Threshold or clustering |
Candidate generation relies heavily on an alias dictionary built from redirects, anchor texts and alternative names, often weighted by a prior probability that a given string refers to a given entity. That prior alone resolves a large share of mentions correctly, which is why it is a strong baseline that every model should beat.
Signals used for disambiguation
Disambiguation combines local context, entity popularity and global coherence to choose among candidates. Local context compares the words around a mention with the description of each candidate, while global coherence prefers sets of entities that are related to each other within the same document.
| Signal | What it measures | Weakness |
|---|---|---|
| Mention prior | How often a string links to an entity | Favors famous entities |
| Context similarity | Overlap between text and entity description | Fails on short inputs |
| Entity type | Match with predicted person, place or organization | Errors propagate from tagging |
| Global coherence | Relatedness among linked entities | Costly for long documents |
| Temporal cues | Dates that fit an entity’s lifetime | Rarely annotated |
Modern systems encode mentions and entities with bi-encoders for fast retrieval over millions of entries, then rerank the shortlist with a cross-encoder that reads mention and description together. Generative approaches instead produce the entity name token by token, constrained to valid titles, and large language models can perform linking through prompting, although they need a closed identifier list to avoid hallucinated entities.
Entity linking versus neighboring tasks
Entity linking differs from named entity recognition because recognition only labels a span with a type, whereas linking assigns an identity. It also differs from coreference resolution and word sense disambiguation, although all three resolve ambiguity in meaning. The table below applies each task to the mention “Paris”.
| Task | Question answered | Output for the mention |
|---|---|---|
| Named entity recognition | Is this span a name, and of what type | Location |
| Entity linking | Which entity is meant | Identifier of Paris, France, or Paris, Texas |
| Coreference resolution | Which mentions refer to the same thing | Cluster with “the city” and “it” |
| Word sense disambiguation | Which dictionary sense applies | Sense of a common word, not a name |
| Relation extraction | How two entities are connected | Capital of France |
In practice these tasks support each other. Linked identifiers make relation extraction far more useful because extracted facts can be merged into a knowledge graph, and coreference chains let a linker propagate one confident decision to every pronoun and short form in the document.
Evaluating entity linking quality
Entity linking quality is measured with precision, recall and F1 over correctly linked mentions, reported either as micro averages across all mentions or macro averages across documents. Evaluation setups differ in whether gold mention spans are given, so scores from end-to-end linking and disambiguation-only settings are not directly comparable.
Results also depend strongly on domain. News text with famous entities is relatively easy, while biomedical, legal and social media text contains rare entities, abbreviations and misspellings. Spoken input adds speech recognition errors, so a misheard surname can make the correct candidate unreachable before disambiguation even starts.
Limitations and common failure modes
The main limitation of entity linking is its dependence on the target knowledge base: an entity that is missing, outdated or poorly described cannot be linked correctly. Systems also inherit a popularity bias, linking an obscure local person to a famous namesake because the prior strongly favors the well-known entry.
| Error | Cause | Remedy |
|---|---|---|
| Wrong famous namesake | Over-reliance on mention prior | Weight context and coherence higher |
| Correct entity never proposed | Missing alias in dictionary | Add aliases, use dense retrieval |
| Forced link for unknown entity | No NIL threshold | Calibrate a rejection score |
| Stale identifiers | Outdated knowledge base snapshot | Refresh index on a schedule |
| Drop on transcripts | Speech recognition errors | Phonetic or fuzzy matching |
- Calibrate confidence so downstream systems can choose between precision and coverage.
- Evaluate on in-domain samples, because benchmark scores rarely transfer unchanged.
- Keep the knowledge base version recorded with every output for reproducibility.
The idea in brief
Many names point to more than one thing. “Amazon” can be a river or a company, and “Washington” can be a person, a state or a city. Entity linking decides which one a sentence actually means and attaches a precise label to it.
It works like a careful librarian who reads the surrounding sentence, checks the catalog and files each name under the right card. Once names carry those cards, computers can connect facts across many documents without confusing two different things that share a name.
A practical scenario
A pharmacovigilance team at a drug manufacturer monitors medical literature and patient forum posts for reports of side effects. Each week, roughly 20,000 new texts mention drugs, conditions and genes using brand names, abbreviations and frequent misspellings.
The team deploys an entity linking model that maps every mention to identifiers in a controlled medical vocabulary. Candidate generation uses an alias list with several hundred thousand synonyms, and a cross-encoder reranks the top 50 candidates using the surrounding sentence. Mentions scoring below a calibrated threshold are routed to human reviewers instead of being linked automatically.
Because a brand name and its generic ingredient now share one identifier, reports that previously appeared unrelated are aggregated under the same drug. Analysts detect signal clusters earlier, and the reviewers spend their time only on the ambiguous minority of uncertain mentions.