LLMs are Better Than You Think: Label-Guided In-Context Learning for Named Entity Recognition

Fan Bai, Hamid Hassanzadeh, Ardavan Saeedi, Mark Dredze
5/29/2025
cs.CL

No official code found. Best implementation: bflashcp3f/deer (14 stars, MIT, last commit 2025-11-04).

Abstract

In-context learning (ICL) enables large language models (LLMs) to perform new tasks using only a few demonstrations. However, in Named Entity Recognition (NER), existing ICL methods typically rely on task-agnostic semantic similarity for demonstration retrieval, which often yields less relevant examples and leads to inferior results. We introduce DEER, a training-free ICL approach that enables LLMs to make more informed entity predictions through the use of label-grounded statistics. DEER leverages token-level statistics from training labels to identify tokens most informative for entity recognition, enabling entity-focused demonstrations. It further uses these statistics to detect and refine error-prone tokens through a targeted reflection step. Evaluated on five NER datasets across four LLMs, DEER consistently outperforms existing ICL methods and achieves performance comparable to supervised fine-tuning. Further analyses demonstrate that DEER improves example retrieval, remains effective on both seen and unseen entities, and exhibits strong robustness in low-resource settings.

View on arXivView PDF

Code Implementations(1)

bflashcp3f/deerCommunity100%
MIT

EMNLP 2025 "LLMs are Better Than You Think: Label-Guided In-Context Learning for Named Entity Recognition"

140Shell, PythonMay 29, 202511 months agoMIT

Similar Papers

Cite this paper

@article{bai2025llms,
  title  = {LLMs are Better Than You Think: Label-Guided In-Context Learning for Named Entity Recognition},
  author = {Fan Bai and Hamid Hassanzadeh and Ardavan Saeedi and Mark Dredze},
  year   = {2025},
  eprint = {2505.23722},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.23722v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.23722.svg)](https://codeofpaper.com/paper/2505.23722)

Discussion