CodeNER: Code Prompting for Named Entity Recognition
arXiv cs.CL / 3/27/2026
💬 OpinionIdeas & Deep AnalysisModels & Research
Key Points
- CodeNER introduces a “code-based prompting” approach for named entity recognition (NER) that embeds code and provides explicit BIO schema labeling instructions to guide LLMs beyond plain text context.
- The method is designed to better capture NER’s detailed labeling requirements while leveraging LLM abilities to handle long-range structure, analogous to programming-language scopes.
- Experiments on ten benchmarks across multiple languages (English, Arabic, Finnish, Danish, and German) show code-based prompting outperforms conventional text-based prompting.
- The paper reports additional gains when code-based prompting is combined with chain-of-thought prompting, further improving NER performance.
Related Articles

GDPR and AI Training Data: What You Need to Know Before Training on Personal Data
Dev.to
Edge-to-Cloud Swarm Coordination for heritage language revitalization programs with embodied agent feedback loops
Dev.to

Big Tech firms are accelerating AI investments and integration, while regulators and companies focus on safety and responsible adoption.
Dev.to

AI Crawler Management: The Definitive Guide to robots.txt for AI Bots
Dev.to

Data Sovereignty Rules and Enterprise AI
Dev.to