Skip to main content
QUICK REVIEW

[Paper Review] NER4all or Context is All You Need: Using LLMs for low-effort, high-performance NER on historical texts. A humanities informed approach

Torsten Hiltmann, Martin Dröge|ArXiv.org|Feb 4, 2025
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

The paper shows that out-of-the-box LLMs with humanities-informed prompts outperform spaCy and Flair for historical NER, especially when incorporating context and persona modeling; zero-shot prompting can surpass few-shot prompts up to 16 shots.

ABSTRACT

Named entity recognition (NER) is a core task for historical research in automatically establishing all references to people, places, events and the like. Yet, do to the high linguistic and genre diversity of sources, only limited canonisation of spellings, the level of required historical domain knowledge, and the scarcity of annotated training data, established approaches to natural language processing (NLP) have been both extremely expensive and yielded only unsatisfactory results in terms of recall and precision. Our paper introduces a new approach. We demonstrate how readily-available, state-of-the-art LLMs significantly outperform two leading NLP frameworks, spaCy and flair, for NER in historical documents by seven to twentytwo percent higher F1-Scores. Our ablation study shows how providing historical context to the task and a bit of persona modelling that turns focus away from a purely linguistic approach are core to a successful prompting strategy. We also demonstrate that, contrary to our expectations, providing increasing numbers of examples in few-shot approaches does not improve recall or precision below a threshold of 16-shot. In consequence, our approach democratises access to NER for all historians by removing the barrier of scripting languages and computational skills required for established NLP tools and instead leveraging natural language prompts and consumer-grade tools and frontends.

Motivation & Objective

  • Reframe NER as a humanities-informed task driven by domain context rather than purely linguistic cues.
  • Evaluate the performance of commercial LLMs with targeted prompting on historical NER.
  • Compare LLM prompting strategies against established NER pipelines (spaCy and Flair) on a historical corpus.
  • Identify how context, persona modeling, and few-shot variations affect recall, precision, and F1.
  • Assess language effects and practical implications for democratizing access to NER in humanities research.

Proposed method

  • Use a ground-truth corpus created from the 1921 Baedeker travel guide for Berlin, annotated for PER, ORG, LOC.
  • Employ ground-truth token spans with a span-based tag-like annotation format for LLM outputs.
  • Develop and apply a German/English prompting scheme that includes contextual information and persona modeling.
  • Perform ablation studies to quantify the impact of context, persona modeling, and zero-/few-/many-shot prompts.
  • Evaluate LLM outputs against baselines from Flair and spaCy using fuzzy span matching and nervaluate for accuracy metrics.
Figure 1: Main instructions in the German prompt
Figure 1: Main instructions in the German prompt

Experimental results

Research questions

  • RQ1Can readily available LLMs achieve higher NER recall and precision on historical text without fine-tuning?
  • RQ2How do prompting context, persona modeling, and shot-number affect NER performance in historical corpora?
  • RQ3Do LLMs with humanities-informed prompts outperform spaCy and Flair on historical documents?
  • RQ4What is the impact of prompting language (English vs German) on NER performance with historical prompts?
  • RQ5What practical considerations (cost, context window, annotation effort) influence the use of LLMs for historical NER?

Key findings

  • LLMs with humanities-informed prompts significantly outperform spaCy and Flair for historical NER in recall and precision.
  • Zero-shot prompts can surpass few-shot prompts until about 16 examples are used, challenging the assumption that more examples always help.
  • Contextual information and persona modeling are core to effective prompting; generic or no context markedly reduces performance.
  • German and English prompts yield comparable results when prompts include contextual and persona elements.
  • Baseline Flair achieved 0.76 recall, 0.89 precision, 0.81 F1 on German NER; spaCy lagged with 0.82 recall in LOC, 0.76 in PER, 0.12 recall for ORG (overall F1 0.50).
  • Zero-shot and context-rich prompting reduce the need for annotated data, lowering barriers for historians.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.