arXiv:2611.08967cs.CLNov 2026

Manuscript Offprint

arXiv:2611.08967

Using an LLM to Tackle Difficult Cases in NER for Nepali Tweets

Claire Wang

Abstract

Named entity recognition (NER) is challenging for social media data in a low-resource language. LLMs often lag behind pretrained language models (PLMs) in NER performance, but they show promise in handling cases that PLMs struggle with. Using a dataset of Nepali tweets, we split the test set into “easy” and “hard” cases using token probabilities from a fine-tuned pretrained language model (PLM). We then evaluate an LLM on the hard test cases using 16 different prompt configurations. We find that selecting examples based on semantic similarity and increasing the number of examples improves F1 score by almost 10 points from the baseline configuration. Although the LLM underperforms the PLM on the full and easy test sets, it surpasses the PLM on the hard test set, resulting in an improved score when the two models are combined.

1 Introduction

Named entity recognition (NER) is especially challenging for certain types of data. This includes user-generated text such as social media posts, which are often noisy, lacking in context, and full of unseen entities (Esmaail et al., 2024). NER in low-resource languages can also be difficult; there is less labeled data that can be used for training, and some languages have morphological or structural characteristics that systems developed for other languages do not account for (Tang et al., 2024). Even models specialized for a particular language may struggle with code-switching between languages, which is common in social media data (Aguilar et al., 2018).

Encoder-only transformer-based models, which we will refer to as pretrained language models (PLMs), have achieved state-of-the-art results for NER in many domains (Keraghel et al., 2024). So far, large language models (LLMs) have not had the same level of success: despite their impressive

Figure

Figure 1: Illustration of our framework. The pretrained language model sorts test tweets as easy or hard based on token probabilities; hard tweets are sent to the LLM for evaluation using each prompt configuration.

capabilities, they are designed for text generation and NER is a sequence labeling task (Wang et al., 2025).

Even if LLMs generally cannot outperform PLMs in NER, some papers have found that LLMs do better than PLMs on challenging cases. This serves as justification for using the two models together, with the LLM complementing the PLM by handling cases that the PLM is less certain about (Ma et al., 2023; Zhang et al., 2024). Building on this idea, we use Nepali Twitter data to investigate the following research questions:

RQ1: Is token probability an effective way of identifying cases that are hard for a PLM but easier for an LLM?

To effectively use a PLM and an LLM in conjunction, we need to determine when to trust the predictions of each model. If the LLM performs worse overall, this is a key decision, and since the LLM has higher inference cost, it is beneficial to not use it for more predictions than necessary. Token probability is an easy-to-calculate estimate of a PLM's confidence in its predictions, so it serves as a good starting point.

RQ2: How do techniques that have shown promise in improving NER performance for LLMs perform on noisy data in a low-resource language?

Techniques such as including annotation guidelines or entity type definitions in the prompt, few-shot learning with examples similar to the input, and asking the model to verify its own predictions have been shown to improve LLM performance on some NER datasets (Sainz et al., 2024; Huang et al., 2025; Wang et al., 2025). However, more research is necessary to determine whether this holds across languages and for noisy data such as tweets.

RQ3: Can a multilingual LLM outperform a monolingual PLM on difficult cases, especially ones containing code-switching?

Although LLMs are often trained on many languages, it is unclear if they can perform equally well in all of them, especially for specialized tasks such as NER. We expect the PLM to have a better “understanding” of Nepali, but Niraula and Chapagain (2023) observed that code-switching was a prominent source of error when evaluating PLMs on the same dataset we use. We hypothesize that our LLM will outperform our PLM on code-switched examples. Previous work suggests that the LLM will also perform better on hard cases overall, but these findings were based on English data, so it remains to be seen whether the same pattern holds for a low-resource language such as Nepali.