Abstract
Entity Linking (EL) is an essential and challenging task in natural language processing that seeks to link some text representing an entity within a document or sentence with its corresponding entry in a dictionary or knowledge base. Most existing approaches focus on creating elaborate contextual models that look for clues the words surrounding the entity-text to help solve the linking problem. Although these fine-tuned language models tend to work, they can be unwieldy, difficult to train, and do not transfer well to other domains. Fortunately, Large Language Models (LLMs) like GPT provide a highly-advanced solution to the problems inherent in EL models, but simply naive prompts to LLMs do not work well. In the present work, we define ChatEL, which is a three-step framework to prompt LLMs to return accurate results. Overall the ChatEL framework improves the average F1 performance across 10 datasets by more than 2%. Finally, a thorough error analysis shows many instances with the ground truth labels were actually incorrect, and the labels predicted by ChatEL were actually correct. This indicates that the quantitative results presented in this paper may be a conservative estimate of the actual performance. All data and code are available as an open-source package on GitHub at https://github.com/yifding/In_Context_EL.
Introduction
Entity Linking (EL) is the process of mapping a "mention" in text (e.g., "Tim Cook") to a specific entry in a knowledge base like Wikipedia (e.g., the CEO of Apple, rather than a Canadian historian). This task is foundational for information extraction and knowledge graph construction.
Traditional EL models typically rely on supervised fine-tuning of language models. While effective, these models are often "unwieldy": they require elaborate contextual modeling, are computationally expensive to train, and struggle to generalize to new domains. For instance, a model optimized for news articles often performs poorly on social media text. Large Language Models (LLMs) like GPT-4 offer a potential solution due to their vast internal knowledge, but naive prompting—simply asking the model to identify an entity—often fails because the potential label space (millions of Wikipedia entities) is too large for a single prompt.
The ChatEL Framework
To harness the reasoning capabilities of LLMs for EL, we propose ChatEL, a three-step "generate-augment-select" framework. This approach transforms EL from a complex sequence-labeling problem into a manageable multiple-choice task.
The framework consists of the following stages:
- Candidate Generation: To narrow down the search space, ChatEL uses a combination of statistical priors (common link names) and a dense retrieval model (BLINK) to identify the top 10 most likely entity candidates for a given mention.
- Augmentation by Prompting: This step involves asking the LLM a clarifying question: "What does [Mention] represent in this context?" The LLM generates a brief description of the mention based on the surrounding text. This "auxiliary content" helps the model focus on relevant contextual clues before making a final decision.
- Multiple-choice Selection: The LLM is presented with the original text, the auxiliary description from Step 2, and the 10 candidates (each accompanied by a one-sentence summary from Wikipedia). A "None of the entity match" option is included to handle cases where the candidate generator fails to include the correct entity.
Experimental Evaluation
We evaluated ChatEL across 10 diverse benchmarks, categorized into:
- In-domain (News/Wiki): MSNBC, AQUAINT, ACE2004, WNED-WIKI, and WNED-CWEB.
- Out-of-domain (Social Media/Specific challenges): KORE50, OKE15, OKE16, N3-Reuters-128 (REU), and N3-RSS-500 (RSS).
Key Results
ChatEL, particularly when using GPT-4 as the backbone, demonstrates superior accuracy and robustness compared to existing state-of-the-art (SOTA) models.
As shown in the results, ChatEL achieved a mean F1 score of 0.795, surpassing the previous SOTA of 0.773. A significant advantage of ChatEL is its zero-shot generalization. Unlike models like ReFinED or End2End, which require task-specific fine-tuning, ChatEL uses a consistent prompt across all datasets. This led to massive improvements on "out-of-domain" datasets; for example, on the difficult KORE50 dataset, ChatEL improved the F1 score by 16.9% over the previous best model.
Discussion and Error Analysis
A striking finding from our error analysis is the "Arguing with the Teacher" phenomenon. Upon manual review of instances where ChatEL's predictions disagreed with the ground truth, we found that the benchmark labels were frequently incorrect or outdated. In many of these cases, ChatEL’s predictions were more reasonable, suggesting that current EL benchmarks may be reaching a performance ceiling due to human labeling errors.
Furthermore, ablation studies confirmed that Step 2 (Augmentation) is critical. Forcing the LLM to explain the mention's role before selection significantly reduces noise in complex documents. While GPT-4 performed best, open-source models like Llama-2-70B struggled with the multi-step reasoning required, highlighting the current gap in reasoning capabilities between top-tier proprietary models and open-source alternatives.
Conclusion
ChatEL demonstrates that a structured prompting framework can outperform specialized, fine-tuned models for Entity Linking. By decomposing the task into candidate generation, contextual augmentation, and selection, we achieve state-of-the-art results with zero-shot generalization. Future work will focus on improving candidate generation efficiency and reducing the latency and cost associated with large-scale LLM API calls.
Summary updated