arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.02970

A Guideline-Augmented Multi-Agent Framework for Schema-as-Code Biomedical Named Entity Recognition

Songtao Li, Yijia Zhang, Shidi Zhang, Jianyuan Yuan, Fengyu Zhang, Hongfei Lin

Songtao Li 1^{1}, Yijia Zhang 1^{1}, Shidi Zhang 1^{1}, Jianyuan Yuan 2^{2}, Fengyu Zhang 3^{3}, Hongfei Lin 4^{4}

1^{1}Dalian Maritime University

{devin_lee, zhangyijia, zhangshidi}@dlmu.edu.cn

2^{2}Beijing Institute of Technology

jianyuany@bit.edu.cn

3^{3}Northeastern University

fengyu.felix@gmail.com

4^{4}Dalian University of Technology

hflin@dlut.edu.cn

Abstract—Large language models (LLMs) have shown promising potential for biomedical named entity recognition (BioNER) through instruction following and in-context learning. However, existing LLM-based BioNER methods still face two key limitations. First, retrieved demonstrations and external biomedical knowledge provide limited support for dataset-specific annotation semantics, leaving entity boundaries, type scopes, and annotation conventions ambiguous. Second, free-form generation lacks sufficient structural control, often leading to invalid formats, hallucinated mentions, duplicated entities, and boundary errors. To address these limitations, we propose GAMA, a guideline-augmented multi-agent framework for schema-as-code BioNER. GAMA first induces candidate annotation rules from labeled training instances and verifies them against annotated data to construct reliable dataset-specific guideline memory. Guided by these verified rules, a planning component generates ranked span-type hypotheses with rationales, and a coding component converts them into schema-constrained entity objects. A verification module then checks span grounding, type validity, and structural compliance, and performs dual-loop refinement to correct invalid or low-confidence predictions. Experiments on five widely used BioNER datasets with multiple LLM backbones show that GAMA consistently outperforms strong LLM-based baselines. Ablation and parameter analyses further verify the effectiveness of the proposed components.

Index Terms—biomedical named entity recognition, large language models, in-context learning, multi-agent

I. INTRODUCTION

Biomedical named entity recognition (BioNER) aims to identify domain-specific entity mentions, such as diseases, chemicals, genes, proteins, and anatomical entities [1]. As a core task in biomedical information extraction, BioNER supports many downstream applications, including biomedical relation extraction [2] and biomedical event extraction [3]. Supervised neural models and domain-specific pretrained language models such as BioBERT [4] and PubMedBERT [5] have achieved substantial progress. Nevertheless, these approaches require large-scale manually annotated corpora, which are costly due to the need for both linguistic expertise and domain knowledge.

Large language models (LLMs) offer a promising alternative, as they can perform downstream tasks using instructions and a few in-context examples without additional training [6]. Recent studies have mainly explored LLM-based BioNER from two perspectives: (i) retrieving similar annotated examples as in-context demonstrations to provide instance-level evidence [7], [8], and (ii) incorporating external biomedical knowledge, such as entity semantics or UMLS information, to improve domain understanding [9], [10]. Despite their effectiveness, these approaches still face two major limitations. First, they provide limited support for dataset-specific annotation semantics. Retrieved examples usually reflect local annotation decisions, while external knowledge mainly provides general biomedical information. As a result, dataset-specific entity boundaries, type scopes, and annotation conventions remain ambiguous, especially when entity definitions and annotation standards vary across datasets. Second, structural control remains insufficient. Since BioNER requires each predicted entity to be grounded in the input sentence, assigned to a predefined type, and returned in a valid format, free-form LLM generation may produce invalid outputs, duplicated entities, hallucinated mentions, or boundary errors, which ordinary prompting cannot fully prevent.

To address these limitations, we present GAMA, a guideline-augmented multi-agent framework for schema-as-code BioNER. Rather than prompting a single LLM to directly produce entity predictions, GAMA decomposes the extraction process into five specialized components: Annotation Rule Induction, Rule Verification, Planning, Coding, and Verification with Dual-Loop Refinement, each responsible for a distinct stage of the task. GAMA is built upon three core principles: (1) Explicit Guideline Modeling, where the Annotation Rule Induction Agent summarizes dataset-specific annotation rules from training instances, and the Rule Verification Agent filters unreliable or overly instance-specific rules to construct explicit and reusable guideline memory; (2) Multi-Agent Decomposition, in which the Planning Agent generates mention-type hypotheses with explanatory rationales, ranks them according to their consistency with the input sentence, the predefined label schema, and the verified guideline rules, and the Coding Agent converts the most reliable hypotheses into schema-constrained code-style entity objects; (3) Schema-as-Code Verification, where each predicted entity object is validated for span grounding, type correctness, and structural validity, while a dual-loop refinement procedure corrects local object-level errors or revisits lower-confidence span-type hypotheses when necessary.

Our main contributions are summarized as follows:

• We introduce a guideline modeling mechanism that induces and verifies dataset-specific annotation rules, providing explicit dataset-level guidance for entity boundaries, type scopes, and annotation conventions.

• We propose GAMA, a guideline-augmented multi-agent framework that decomposes BioNER into rule induction, rule verification, guideline-guided planning, schema-constrained coding, and prediction verification.

• We develop a schema-as-code verification mechanism with dual-loop refinement, which checks span grounding, type validity, and structural compliance to reduce invalid, hallucinated, and inconsistent predictions.

• We conduct experiments on five widely used BioNER datasets with multiple LLM backbones. The results show that GAMA consistently outperforms strong LLM-based baselines, and ablation studies further verify the effectiveness of its key components.

References (25)

  • Deep learning methods for biomedical named entity recognition: a survey and qualitative comparison
  • A hierarchical convolutional model for biomedical relation extraction
  • Biomedical event extraction as sequence labeling
  • Biobert: a pre-trained biomedical language representation model for biomedical text mining
  • Domain-specific language model pretraining for biomedical natural language processing
  • Language models are few-shot learners
  • Retrieval augmented generation based dynamic prompting for few-shot biomedical named entity recognition using large language models
  • Eicl: Entity-aware in-context learning for bioner via hybrid semantic-terminological retrieval
  • Inspire the large language model by external knowledge on biomedical named entity recognition (opens arXiv in a new tab)
  • Biomedical nested ner with large language model and umls heuristics (opens arXiv in a new tab)
  • Improving large language models for clinical named entity recognition via prompt engineering
  • Rt: a retrieving and chain-of-thought framework for few-shot medical named entity recognition
  • A cooperative multi-agent framework for zero-shot named entity recognition
  • Crossagentie: Cross-type and cross-task multi-agent llm collaboration for zero-shot information extraction
  • Learning to generate and extract: A multi-agent collaboration framework for zero-shot document-level event arguments extraction
  • Ncbi disease corpus: a resource for disease name recognition and concept normalization
  • Overview of biocreative ii gene mention recognition
  • The chemdner corpus of chemicals and drugs and its annotation principles
  • Genia corpus—a semantically annotated corpus for bio-textmining
  • Anatomical entity mention recognition at literature scale
  • Gpt-ner: Named entity recognition via large language models
  • Codeie: Large code generation models are better few-shot information extractors
  • The Llama 3 Herd of Models
  • Qwen2.5 Technical Report
  • GPT-4o System Card