<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>H. P. Gupta);</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>SCIRE at BioASQ 2025: LLM Driven Biomedical Named Entity Recognition for GutBrainIE 2025</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Harsh Prakash Gupta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ritwik Banerjee</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Stony Brook University</institution>
          ,
          <addr-line>Stony Brook, New York</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0003</lpage>
      <abstract>
        <p>In recent years, we have witnessed the rise of powerful Large Language Models (LLMs) and their flexibility in accomplishing a wide range of NLP tasks, often achieving state-of-the-art (SOTA) accuracy. However for Named Entity Recognition (NER), there is a specific need for token-level class assignments and bidirectional context, both preceding and following a token, to understand its role. As a result, bidirectional encoder-style transformer models (BERT-like models) have been the standard approach. However, fine-tuning these models on available datasets often faces the bottleneck of limited training data. In this paper, we propose an alternative approach that leverages the extensive knowledge base of decoder-style Transformer models. These modern LLMs are typically trained on vast amounts of text, which enables them to overcome the challenge of limited labeled data. Instead of training from scratch, we focus on aligning the responses of these LLMs to suit NER. To this end, we use two methods: (i) few-shot prompting, and (ii) fine-tuning on available examples. Our findings indicate that ifne-tuning significantly outperforms prompting for biomedical NER, efectively aligning LLM outputs to the desired task outputs. Additionally, we propose an algorithm to parse the output of the LLM to extract relevant entities, their labels, and their start and end indices.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Large language models</kwd>
        <kwd>Named entity recognition</kwd>
        <kwd>Transformer</kwd>
        <kwd>BERT</kwd>
        <kwd>GPT</kwd>
        <kwd>OpenAI</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The GutBrainIE2025 challenge [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] presented a set of four tasks focused on extracting structured
information from biomedical texts. The overarching theme of the challenge centers on identifying
relationships between the gut microbiota and conditions such as Parkinson’s disease and mental health
disorders. GutBrainIE2025 is the sixth task of the BioASQ [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] CLEF Lab 2025. In this paper, we focus
exclusively on the first task of the challenge (Subtask 6.1): named entity recognition (NER). For this
subtask, participants were provided with a collection of PubMed [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] articles, including their titles and
abstracts. The objective was defined as the identification and classification of entities into one of the
following predefined categories: Anatomical Location, Animal, Biomedical Technique, Bacteria, Chemical,
Dietary Supplement, Disease, Disorder or Finding (DDF), Drug, Food, Gene, Human, Microbiome, and
Statistical Technique. For each entity, it was also required that the entity’s text span must be identified —
that is, its start and end character indices, and whether it appears in the title or the abstract.
      </p>
      <p>
        A competitive baseline model was provided to participants. This was a fine-tuned version of the
NuNER Zero model [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] developed by NuMind. The model is a compact encoder-based Transformer
designed for zero-shot NER. It is based on the GLiNER [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] architecture, enabling it to identify entities
without requiring task-specific fine-tuning. Given that the baseline already uses a capable encoder-style
Transformer model, we explore the alternative approach, where we use decoder-based Transformer
models. Specifically, we employ Large Language Models (LLMs). These models have demonstrated
significant advancements and are typically trained on massive corpora, including biomedical texts. This
makes them promising candidates for tasks like biomedical NER. In this work, we investigate whether
LLMs can match or surpass the performance of encoder-based models in the biomedical NER task.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Recent advances in large language models (LLMs) have demonstrated significant promise for named
entity recognition (NER) tasks across diverse domains. Several studies have explored the application
of LLMs to NER, with notable successes in both general and specialized contexts. Xie et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
empirically investigated the use of ChatGPT [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for zero-shot named entity recognition, demonstrating
improvements across seven benchmarks, while the LTNER framework [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] employed contextualized
entity marking to enhance LLM performance on NER tasks. Their primary results (91.9% F1) were,
however, reported on the older benchmark of CoNLL03 [9]. In the biomedical domain, comparative
studies have revealed that certain LLMs, including open-source LLMs like Mistral [10] and Llama [11],
can outperform traditional encoder models like BERT on biomedical NER, particularly for longer
entities [12]. This improvement, however, was marginal.
      </p>
      <p>Chen et al. [13] provided a comprehensive systematic evaluation of four large language models
(GPT-3.5, GPT-4, LLaMA 2, and PMC LLaMA) across 12 biomedical NLP datasets, including named
entity recognition tasks under various settings. Additionally, domain-specific applications have shown
promising results, with Jung et al. [14] demonstrating high performance using LLM-based biological
named entity recognition on scientific literature related to p53 protein research, and Bian et al. [ 15]
achieving strong one-shot biomedical named entity recognition performance through a two-step
approach incorporating domain-specific knowledge.</p>
      <sec id="sec-2-1">
        <title>2.1. Adapting NER for Large Language Models</title>
        <p>When using Large Language Models (LLMs) for the NER task, it is crucial to adapt the task format
in a way that aligns with the natural strengths of LLMs. Since LLMs are fundamentally next-token
predictors, they are not inherently well-suited for pinpointing the exact start and end indices of entity
spans, even if they can correctly identify and classify the entities themselves. Therefore, it becomes
necessary to reformulate NER as a generative task, a paradigm where LLMs excel.</p>
        <p>
          GPT-NER [16] introduced a novel annotation strategy that adapts NER to suit LLMs. It transforms
the task into a token prediction problem by marking the beginning and end of an entity span with
special tokens: @@ for the start and ## for the end. The entity’s class label immediately follows the
span-end marker ##, resulting in the format: @@&lt;text_span&gt;##&lt;class_label&gt;. This structured
output makes it straightforward to parse the model’s predictions and extract entities along with their
labels. While GPT-NER focuses solely on entity recognition and classification, without requiring start
and end character indices, the GutBrainIE challenge [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] does require those indices. Consequently,
we developed a custom parsing technique to accurately extract entity boundaries along with their
associated metadata. Additionally, GPT-NER did not involve fine-tuning the LLM. Instead, it employed
few-shot prompting along with a self-verification mechanism, wherein the LLM was prompted to
assess whether the extracted spans matched any known entity class. This approach was tested using
GPT-3, which in 2023 did not support fine-tuning for external users. Despite this, GPT-NER achieved
performance levels comparable to fully supervised baselines.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Dataset</title>
      <p>The organizers provided four datasets with varying annotation quality: Platinum, Gold, Silver, and
Bronze, in descending order of reliability. The Bronze annotations were automatically generated using
the fine-tuned baseline model. Since the Platinum and Gold datasets together included a suficient
number of annotated articles (111 + 208 = 319), we used their combination as our training set. We
excluded the Silver and Bronze datasets to maintain high data quality.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Methodology</title>
      <p>There are currently many strong LLMs available, both open-source and proprietary, accessible via APIs.
For this challenge, we chose the GPT-4.1-mini from OpenAI, for several reasons: the GPT-4.1 series
excels at instruction following, code generation, and handling long-context tasks; and importantly,
GPT-4.1-mini is also significantly more cost-efective at approximately 84% cheaper than GPT-4o, while
achieving nearly equivalent scores on benchmarks such as MMLU [17].</p>
      <sec id="sec-4-1">
        <title>4.1. Annotation Format and Prompting Strategy</title>
        <p>We adopted the annotation strategy introduced by GPT-NER [16]. Each input to the LLM consisted
of a text segment (either from the title or abstract of a PubMed article) along with the list of 13 entity
classes. The LLM was instructed to reproduce the original input text exactly, with the only modification
being the insertion of entity annotations in the following format: @@&lt;text_span&gt;##&lt;class_label&gt;. The
instructions emphasized that all characters—letters, spaces, and special Unicode characters—must be
preserved exactly, apart from the added annotation tokens. This consistency is critical for accurately
calculating the start and end character indices of each entity.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Few-Shot Prompting</title>
        <p>To provide the model with relevant in-context examples, we moved beyond a fixed set of few-shot
examples and instead implemented a dynamic Retrieval-Augmented Generation (RAG) strategy. This
approach ensures that the examples included in the prompt are contextually similar to the input text,
thereby ofering more targeted guidance to the LLM. The RAG process involved three main steps:</p>
        <sec id="sec-4-2-1">
          <title>4.2.1. Indexing of Training Examples</title>
          <p>First, we processed the entire training set (319 articles) to create a searchable knowledge base. For
each title and abstract in the training data, we generated a dense vector embedding using OpenAI’s
text-embedding-3-large model. These embeddings, along with their corresponding text and
metadata (PubMed ID, example ID), were then indexed using the FAISS (Facebook AI Similarity Search)
[18] library, an eficient similarity search library developed by Meta. We specifically utilized an
IndexFlatL2 index, which performs an exhaustive search by calculating the L2 (Euclidean) distance
between the query vector and all vectors in the index. While computationally intensive for massive
datasets, this index guarantees the retrieval of the exact nearest neighbors, making it ideal for our
moderately-sized corpus where accuracy is paramount.</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>4.2.2. Real-time Retrieval of Relevant Examples</title>
          <p>When a new input text (from the validation or test set) required annotation, we first generated its
embedding using the same text-embedding-3-large model. This query embedding was then used
to search the FAISS index to retrieve the top-k most similar examples from our training set.</p>
        </sec>
        <sec id="sec-4-2-3">
          <title>4.2.3. Dynamic Prompt Construction</title>
          <p>The retrieved examples were then used to construct the final prompt for the LLM. For each retrieved
example, we generated the expected annotated output based on the ground-truth labels. These
inputoutput pairs were then prepended to the prompt that contained the new text to be annotated. The
number of examples included was based on the prompting configuration:
• 0-shot: No examples were retrieved or included.
• 1-shot: The single most similar abstract example was included.
• 3-shot: The top two most similar abstract examples and the single most similar title example
were included.
• 5-shot: The top three most similar abstract examples and the top two most similar title examples
were included.</p>
          <p>This balance ensured the model was exposed to both abstract and title texts, which difer in length
and structure along with this RAG-based strategy ensured that the model was always primed with
highly relevant examples that mirrored the structure and content of the target text. However, as detailed
in the Results section, this dynamic few-shot approach still yielded significantly worse performance
than the baseline model, which led us to explore fine-tuning.</p>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Fine-Tuning</title>
        <p>As gpt-4.1-mini is a proprietary model, we don’t have access to its weights that we can manipulate
ourselves using standard finetuning process, thus we have to use OpenAI’s fine-tuning framework,
which requires a .jsonl file containing input-output pairs. For each training example, we used the entity
spans and labels to generate the expected annotated output in the same format used during prompting.
Both training and validation sets were prepared and uploaded to OpenAI’s API. Once fine-tuning
was complete, the resulting model could be accessed via a dedicated API endpoint, just like OpenAI’s
standard models. Post fine-tuning, we re-evaluated the model using the same prompting configurations
(0, 1, 3, and 5-shot) to measure the improvements in entity recognition accuracy.</p>
        <p>
          OpenAI’s fine-tuning framework allows users to configure a limited set of hyperparameters. The
three adjustable hyperparameters are: Batch size, Number of epochs, Learning rate multiplier. These
can either be manually specified or set to "auto", allowing OpenAI to select optimal values automatically.
Through experimentation, we identified a configuration that produced the best results for our use case:
The training prompt for each example included only the base instruction (i.e., 0-shot setup) and excluded
any in-context examples. Including 1-shot, 3-shot, or 5-shot examples during fine-tuning negatively
impacted recall and also increased token usage, leading to higher training costs. The train set included
examples only from Gold and Platinum sets from the dataset provided by GutBrainIE2025 [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] and thus
we had 319 in total examples where each example contained an abstract part and a title part. Both batch
size and learning rate multiplier were set to "auto", which OpenAI internally configured as 1 for our
training job. We observed that increasing the number of epochs reduced training loss but increased
validation loss, which indicates potential overfitting. The best validation performance was achieved at
the end of epoch 1, and all results reported in the next section (Sec. 5) are from this checkpoint.
        </p>
      </sec>
      <sec id="sec-4-4">
        <title>4.4. Parsing LLM Output</title>
        <p>The output generated by the LLM follows the annotation format described earlier. For each identified
entity, the challenge requires extracting five key pieces of information: Location (title or abstract), Class
label, Text span (the exact string constituting the entity), Start index (in the original text), End index (in
the original text).</p>
        <p>To achieve this, we developed a parsing algorithm that converts the annotated text into structured
entity objects with these five attributes. Although the LLM is explicitly instructed to only insert
the special tokens @@, ##, and the corresponding class label—while keeping all other characters
unchanged—hallucinations can still occur, particularly with non-fine-tuned models. We observed such
deviations only in outputs from the base GPT-4.1-mini, not in the fine-tuned version. Nevertheless, our
parsing approach is designed to be robust against such inconsistencies and to recover valid entities
wherever possible.</p>
        <sec id="sec-4-4-1">
          <title>4.4.1. Step 1: Preprocessing</title>
          <p>We first remove any malformed or extraneous occurrences of @@ or ## that do not conform to the valid
pattern: @@&lt;text_span&gt;##&lt;class_label&gt;. This is done using regular expressions.</p>
        </sec>
        <sec id="sec-4-4-2">
          <title>4.4.2. Step 2: Pattern Matching</title>
          <p>W again use regular expressions to extract all valid entity annotations from the output text. From each
match, we extract: Group 1: the entity’s text span, and Group 2: the associated class label. To calculate
the character indices, we maintain a cumulative ofset variable that tracks the total number of extra
characters (@@, ##, and class labels) that have been inserted into the original text. Subtracting this ofset
from the indices in the annotated text, we can extract the text span.</p>
        </sec>
        <sec id="sec-4-4-3">
          <title>4.4.3. Step 3: Index Correction</title>
          <p>In cases where hallucinations occur, the calculated indices might not correctly align with the original
text—typically because the entity string has been slightly altered. To recover from this, we apply a
sliding window search strategy: First, we attempt to match the extracted text span in the original text
by sliding it rightward up to 10 characters. If no match is found, we slide it leftward up to 10 characters.
If a match is found during this process, we use that position as the corrected start index. If no match
is found at all, we adjust the ofset to account for the mismatch and proceed to the next entity. This
combination of pattern matching, ofset correction, and sliding window search ensures that we can
reliably extract entity information even in the presence of minor hallucinations or deviations from the
expected output format.</p>
        </sec>
      </sec>
      <sec id="sec-4-5">
        <title>4.5. Token Usage and Inference Cost</title>
        <p>Our training set consisted of 319 articles, each containing both a title and an abstract. This yielded a total
of 638 training examples (319 × 2). The total token count—including both the base prompt and annotated
output—was approximately 500,000 tokens. OpenAI’s pricing for fine-tuning the GPT-4.1-mini model is
approximately $5 per 1 million tokens. Therefore, training for one epoch (500K tokens) cost around
$2.50. Inference with both the base and fine-tuned versions of GPT-4.1-mini is highly cost-efective,
averaging about $1 per 1 million tokens, making this approach scalable for real-world applications.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Results and Analysis</title>
      <p>All reported results in Table 1 are based on the validation set. Table 2 below shows the oficial evaluation
results on the test set for our best-performing model: the fine-tuned GPT-4.1-mini (0-shot), as provided
by the organizers. Our findings demonstrate a clear performance gap between the base and fine-tuned
versions of GPT-4.1-mini.1
1All code for this work is available on GitHub at github.com/hpgupt/GutBrainIE-CLEF25.</p>
      <sec id="sec-5-1">
        <title>5.1. Base GPT-4.1-mini (Few-shot Prompting)</title>
        <p>The base model’s performance improves progressively with the number of few-shot examples: 5-shot
prompting achieved the best results, followed by 3-shot, 1-shot, and 0-shot, which performed the
worst. This trend suggests that the base model, having no task-specific tuning, benefits from additional
in-context examples that help it better understand the task format.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. Fine-tuned GPT-4.1-mini</title>
        <p>Interestingly, the fine-tuned model shows the reverse trend: 0-shot prompting consistently outperforms
1-shot and 5-shot methods. 5-shot prompting, in particular, performs the worst among all configurations
post-fine-tuning. This reversal likely occurs because the fine-tuning process itself exposes the model
to hundreds of training examples. As a result, additional in-context examples during inference do
not improve performance—and may even degrade it due to token budget constraints or overfitting to
redundant patterns. Consequently, the 0-shot fine-tuned GPT-4.1-mini emerges as the best-performing
model overall. It also ofers significant inference cost savings, since fewer tokens are consumed compared
to multi-shot prompting strategies.</p>
      </sec>
      <sec id="sec-5-3">
        <title>5.3. Understanding the Gap Between Base and Fine-Tuned Models</title>
        <p>Even though the base model performs worse across the board, qualitative analysis reveals that its errors
are often not due to a lack of understanding, but rather ambiguities in entity boundary definitions. For
example, consider the training annotation: The span "secretory IgA (SIgA)" is labeled in the dataset
as two separate entities: "secretory IgA" and "SIgA", both tagged as Gene. However, the base model
often predicts the entire phrase "secretory IgA (SIgA)" as a single entity. While this is not incorrect
from a semantic perspective, it fails to match the exact annotated boundaries, leading to penalization in
standard evaluation metrics like precision and recall. The fine-tuning process helps the model learn
these annotation-specific conventions, allowing it to mimic the labeling patterns found in the training
set more closely. This alignment with annotator intent significantly boosts its performance metrics.</p>
        <p>Finally, we can conclusively state that our best model—the fine-tuned GPT-4.1-mini
(0shot)—outperforms the baseline provided by the challenge organizers. However, it is important to
note that the improvement in evaluation metrics is marginal. This raises an important consideration
regarding eficiency vs. performance. The baseline model (a fine-tuned NuNER/GLiNER encoder)
consists of millions of parameters, while GPT-4.1-mini is a much larger decoder-style model with billions
of parameters. As a result, the computational cost for inference with GPT-4.1-mini is significantly
higher. In summary, if maximum accuracy is the primary goal, then LLMs like GPT-4.1-mini – especially
when fine-tuned – ofer a promising path forward for biomedical NER. However, if eficiency and
resource constraints are critical, then state-of-the-art encoder-based models like GLiNER remain highly
competitive and more practical for deployment at scale.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Future Work</title>
      <p>While fine-tuned LLMs such as GPT-4.1-mini demonstrate strong potential for biomedical NER, several
directions remain open for future research and optimization. These include exploring smaller,
opensource LLMs by applying the same fine-tuning and prompting techniques used with larger models; this
would assess whether comparable performance can be achieved with significantly lower computational
cost, reduce reliance on proprietary systems, and clarify if data quality rather than model size is the
primary bottleneck.</p>
      <p>Furthermore, developing improved and more LLM-friendly annotation strategies beyond the
GPTNER style is critical, as the design of annotation schemes profoundly impacts model performance for
tasks like entity recognition and span extraction. Alternatively, investigating how LLMs perform under
the traditional BIO (Beginning, Inside, Outside) tagging scheme could enable structured token-level
classification and potentially better align LLM outputs with existing NER pipelines.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work was supported in part by a seed award from the AI Innovation Institute (AI3) at Stony Brook
University (State University of New York at Stony Brook).</p>
    </sec>
    <sec id="sec-8">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used GPT-4o for grammar and spelling checks. After
using this tool, the authors reviewed and edited the content as needed and takes full responsibility for
the publication’s content.
[9] E. F. Tjong Kim Sang, F. De Meulder, Introduction to the CoNLL-2003 shared task:
Languageindependent named entity recognition, in: Proceedings of the Seventh Conference on Natural
Language Learning at HLT-NAACL 2003, 2003, pp. 142–147.
[10] S. Karamcheti, L. Orr, J. Bolton, T. Zhang, K. Goel, A. Narayan, R. Bommasani, D. Narayanan,
T. Hashimoto, D. Jurafsky, C. D. Manning, C. Potts, C. Ré, P. Liang, Mistral - A Journey towards
Reproducible Language Model Training, 2021. URL: https://github.com/stanford-crfm/mistral.
[11] H. Touvron, T. Lavril, G. Izacard, X. Martinet, M.-A. Lachaux, T. Lacroix, B. Rozière, N. Goyal,
E. Hambro, F. Azhar, et al., Llama: Open and eficient foundation language models, arXiv preprint
arXiv:2302.13971 (2023).
[12] M. S. Obeidat, M. S. Al Nahian, R. Kavuluru, Do llms surpass encoders for biomedical ner?, arXiv
preprint arXiv:2504.00664 (2025). arXiv:2504.00664.
[13] Q. Chen, Y. Hu, X. Peng, Q. Xie, Q. Jin, A. Gilson, M. B. Singer, X. Ai, P.-T. Lai, Z. Wang, et al.,
Benchmarking large language models for biomedical natural language processing applications
and recommendations, Nature communications 16 (2025) 3280.
[14] S. J. Jung, H. Kim, K. S. Jang, Llm based biological named entity recognition from scientific
literature, in: 2024 IEEE International Conference on Big Data and Smart Computing (BigComp),
2024, pp. 433–435. doi:10.1109/BigComp60711.2024.00095.
[15] J. Bian, J. Zheng, Y. Zhang, H. Zhou, S. Zhu, One-shot Biomedical Named Entity Recognition via
Knowledge-Inspired Large Language Model, in: Proceedings of the 15th ACM International
Conference on Bioinformatics, Computational Biology and Health Informatics, BCB ’24, Association
for Computing Machinery, New York, NY, USA, 2024. doi:10.1145/3698587.3701356.
[16] S. Wang, X. Sun, X. Li, R. Ouyang, F. Wu, T. Zhang, J. Li, G. Wang, Gpt-ner: Named entity
recognition via large language models, arXiv preprint arXiv:2304.10428 (2023). arXiv:2304.10428.
[17] OpenAI, Gpt-4 turbo and the future of ai assistants, 2024. URL: https://openai.com/index/gpt-4-1/,
accessed: 2025-05-19.
[18] Facebook AI Research, FAISS: Facebook AI Similarity Search, 2025. URL: https://github.com/
facebookresearch/faiss, accessed: 2025-05-19.</p>
    </sec>
    <sec id="sec-9">
      <title>A. Prompts and 1-Shot Example</title>
      <p>This section provides the detailed prompt used for instructing the LLM and a concrete example of a
1-shot prompt constructed using our Retrieval-Augmented Generation (RAG) approach. We are using a
"title" example as input here as it is much shorter than "abstract".</p>
      <p>Perform Named Entity Recognition on the biomedical text provided in the "Text"
section using a specific inline annotation style.</p>
      <p>Task Description:
You are an expert Named Entity Recognition (NER) system specializing in biomedical
texts related to the gut-brain axis. Your task is to identify and extract entities
from the provided text. Identify all mentions of entities belonging to the
predefined categories listed below. An entity can occur multiple times; treat each
occurrence as a separate
entity and mark them directly within the text. Mark the beginning of an entity's
span with "@@" and the end of the span with "##" followed immediately by the
entity's category label. Note - the output text should be exactly identical to the
input text i.e all spaces , special characters/ unicode characters,html/markdown
tags,etc (any character) also
should be exactly the same, except for the added "@@, ## and entity label"
annotations for each entity detected.</p>
      <p>Text span of an entity means the actual words/characters that form the entity in the
text. An entity's span can contain single or multiple words but never partial words.
The format to follow while marking an entity with its label is
@@&lt;entity_text_span&gt;##&lt;label&gt;
Predefined Entity Categories (use these exact labels after ##):
[
"anatomical_location", "animal", "biomedical_technique", "bacteria", "chemical",
"dietary_supplement", "DDF", "drug", "food", "gene", "human", "microbiome",
"statistical_technique"
Note - DDF stands for Disease, Disorder, or Finding. The remaining categories refer
to their conventional or scientific meaning.</p>
      <p>Also, If the first word or first set of words in output belong to an entity then
ensure to start the output with @@ and follow rest of instructions.</p>
      <p>Follow the format shown in the detailed examples below precisely.
### Examples
Input: The brain-gut axis has gained increasing attention due to its contribution
to the etiology of various central nervous system disorders. This study aims to
elucidate the hypothesis that schizophrenia is associated with
disturbances in intestinal microflora and imbalance in intestinal metabolites. By
exploring the intricate relationship between the gut and the brain, with the
goal of offering fresh perspectives and valuable insights into the potential
contribution of intestinal microbial and metabolites dysbiosis to the etiology of
schizophrenia. In this study, we used a 16S ribosomal RNA (16S rRNA) gene
sequence-based approach and an untargeted liquid chromatography-mass
spectrometry-based metabolic profiling approach to measure the gut microbiome and
microbial metabolites from 44 healthy controls, 41 acute patients, and 39 remission
patients, to evaluate whether microbial dysbiosis and microbial metabolite
biomarkers were linked with the severity of schizophrenic symptoms.</p>
      <p>Here, we identified 20 dominant disturbances in the gut microbial composition of
patients compared with healthy controls, with 3 orders, 4 families, 9 genera, and 4
species. Several unique bacterial taxa associated with
schizophrenia severity. Compared with healthy controls, 145 unusual microflora
metabolites were detected in the acute and remission groups, which were mainly
involved in environmental information processing,metabolism, organismalsystems, and
human diseases in the Kyoto encyclopedia of genes and genomes pathway. The Sankey
diagram showed that 4 abnormal intestinal and 4 anomalous
intestinal microbial metabolites were associated with psychiatric clinical symptoms.
These findings suggest a possible interactive influence of the gut microbiota and
their metabolites on the pathophysiology of schizophrenia.</p>
      <p>Output: The brain-gut axis has gained increasing attention due to its contribution
to the etiology of various @@central nervous system disorders##DDF. This study aims
to elucidate the hypothesis that @@schizophrenia##DDF is associated with
disturbances in @@intestinal microflora##microbiome and imbalance in @@intestinal
metabolites##chemical. By
exploring the intricate relationship between the @@gut##anatomical_location and the
@@brain##anatomical_location, with the goal of offering fresh perspectives and
valuable insights into the potential contribution of @@intestinal microbial
and metabolites dysbiosis##DDF to the etiology of @@schizophrenia##DDF. In this
study, we used a @@16S ribosomal RNA (16S rRNA) gene sequence-based
approach##biomedical_technique and an @@untargeted liquid chromatography-mass
spectrometry-based metabolic profiling approach##biomedical_technique to measure
the @@gut microbiome##microbiome and
@@microbial metabolites##chemical from 44 @@healthy controls##human, 41 @@acute
patients##human, and 39 @@remission patients##human, to evaluate
whether @@microbial dysbiosis##DDF and microbial metabolite biomarkers were linked
with the severity of schizophrenic symptoms. Here, we identified 20 dominant
disturbances in the @@gut microbial composition of patients##human
compared with @@healthy controls##human, with 3 orders, 4 families, 9 genera, and 4
species. Several unique bacterial taxa associated with @@schizophrenia##DDF
severity. Compared with @@healthy controls##human, 145 unusual @@microflora
metabolites##chemical were detected in the acute and
remission groups, which were mainly involved in environmental information
processing, metabolism, organismal systems, and human diseases in the Kyoto
encyclopedia of genes and genomes pathway. The Sankey diagram showed that 4
abnormal intestinal and 4 anomalous intestinal @@microbial metabolites##chemical
were associated with @@psychiatric clinical symptoms##DDF. These findings suggest a
possible interactive influence of the
@@gut microbiota##microbiome and their metabolites on the pathophysiology of
@@schizophrenia##DDF.
### Text
Input: Alteration of Gut Microbiome in Patients With Schizophrenia Indicates Links
Between Bacterial Tyrosine Biosynthesis and Cognitive Dysfunction.</p>
      <p>Output:</p>
    </sec>
    <sec id="sec-10">
      <title>B. Training Instance Example</title>
      <p>The fine-tuning dataset was structured as a ‘.jsonl‘ file, where each line is a JSON object representing
a single training example. Each object contains a list of messages defining the conversation flow: a
system message with basic instructions, a user message with the input text and task instructions, and
an assistant message with the correctly annotated output. Below is one example from our training set,
using a title for brevity.
{"messages": [{"role": "system", "content": "You are an expert Named Entity
Recognition (NER) system specializing in biomedical texts related to the
gut-brain axis."}, {"role": "user", "content": "\nTask Description:\nYour task
is to identify and extract entities from the provided text. Perform Named
Entity Recognition on the biomedical text provided in the \"Text\" section
using a specific inline annotation style.\nIdentify all mentions of entities
belonging to the predefined categories listed below. An entity can occur
multiple times; treat each occurrence as a separate entity and mark them
directly within the text.\nMark the beginning of an entity's span with \"@@\"
and the end of the span with \"##\" followed immediately by the entity's
category label. Note - the output text should be exactly identical to the input
text i.e all spaces , special characters/ unicode characters,html/markdown
tags,etc (or any other character) also should be exactly the same, except for
the added \"@@, ## and entity label\" annotations for each entity
detected.\nText span of an entity means the actual words/characters that form
the entity in the text. An entity's span can contain single or multiple words
but never partial words.\nThe format to follow while marking an entity with its
label is @@&lt;entity_text_span&gt;##&lt;label&gt;\n\nPredefined Entity Categories (use
these exact labels after ##):\n[\n \"anatomical_location\", \"animal\",
\"biomedical_technique\", \"bacteria\",\n \"chemical\",
\"dietary_supplement\", \"DDF\", \"drug\", \"food\", \"gene\",\n \"human\",
\"microbiome\", \"statistical_technique\"\n]\n\nNote - DDF stands for Disease,
Disorder, or Finding. The remaining categories refer to their conventional or
scientific meaning.\nAlso, If the first word or first set of words in output
belong to an entity then ensure to start the output with @@ and follow rest of
instructions.\n\n### Text\nInput: Analysis of the Efficacy of Diet and
Short-Term Probiotic Intervention on Depressive Symptoms in Patients after
Bariatric Surgery: A Randomized Double-Blind Placebo Controlled Pilot
Study.\nOutput:"}, {"role": "assistant", "content": "Analysis of the Efficacy
of Diet and Short-Term Probiotic Intervention on @@Depressive Symptoms##DDF in
@@Patients##human after Bariatric Surgery: A Randomized Double-Blind Placebo
Controlled Pilot Study."}]}</p>
    </sec>
    <sec id="sec-11">
      <title>C. Fine-Tuning Details</title>
      <p>While most hyperparameters were set to "auto" by the OpenAI API, the configuration for our
bestperforming model is summarized in Table 3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Martinelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Silvello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Bonato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Di Nunzio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Irrera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Marchesin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Menotti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Vezzani</surname>
          </string-name>
          , Overview of GutBrainIE@CLEF 2025:
          <article-title>Gut-Brain Interplay Information Extraction</article-title>
          , in: G. Faggioli,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosso</surname>
          </string-name>
          , D. Spina (Eds.),
          <source>CLEF 2025 Working Notes</source>
          ,
          <year>2025</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Nentidis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Katsimpras</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Krithara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Krallinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rodríguez-Ortega</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Rodriguez-López</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Loukachevitch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sakhovskiy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Tutubalina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dimitriadis</surname>
          </string-name>
          , G. Tsoumakas,
          <string-name>
            <given-names>G.</given-names>
            <surname>Giannakoulas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bekiaridou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Samaras</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Di Nunzio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Marchesin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Martinelli</surname>
          </string-name>
          , G. Silvello, G. Paliouras,
          <source>Overview of BioASQ</source>
          <year>2025</year>
          :
          <article-title>The thirteenth BioASQ challenge on large-scale biomedical semantic indexing and question answering</article-title>
          ,
          <source>volume TBA of Lecture Notes in Computer Science</source>
          , Springer,
          <year>2025</year>
          , p.
          <source>TBA.</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>White</surname>
          </string-name>
          ,
          <source>Pubmed</source>
          <volume>2</volume>
          .0,
          <string-name>
            <given-names>Medical</given-names>
            <surname>Reference</surname>
          </string-name>
          Services Quarterly
          <volume>39</volume>
          (
          <year>2020</year>
          )
          <fpage>382</fpage>
          -
          <lpage>387</lpage>
          . doi:
          <volume>10</volume>
          .1080/ 02763869.
          <year>2020</year>
          .
          <volume>1826228</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bogdanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Constantin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Bernard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Crabbé</surname>
          </string-name>
          , E. Bernard, Nuner:
          <article-title>Entity recognition encoder pre-training via llm-annotated data</article-title>
          ,
          <source>arXiv preprint arXiv:2402.15343</source>
          (
          <year>2024</year>
          ). arXiv:
          <volume>2402</volume>
          .
          <fpage>15343</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>U.</given-names>
            <surname>Zaratiana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Tomeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Holat</surname>
          </string-name>
          , T. Charnois, Gliner:
          <article-title>Generalist model for named entity recognition using bidirectional transformer</article-title>
          ,
          <source>arXiv preprint arXiv:2311.08526</source>
          (
          <year>2023</year>
          ). arXiv:
          <volume>2311</volume>
          .
          <fpage>08526</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>T.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Empirical study of zero-shot NER with ChatGPT</article-title>
          , in: H.
          <string-name>
            <surname>Bouamor</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Pino</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          Bali (Eds.),
          <source>Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing</source>
          , Association for Computational Linguistics, Singapore,
          <year>2023</year>
          , pp.
          <fpage>7935</fpage>
          -
          <lpage>7956</lpage>
          . doi:
          <volume>10</volume>
          .18653/v1/
          <year>2023</year>
          .emnlp-main.
          <volume>493</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Ouyang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Almeida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. L.</given-names>
            <surname>Wainwright</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Mishkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , S. Agarwal,
          <string-name>
            <given-names>K.</given-names>
            <surname>Slama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ray</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schulman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hilton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Kelton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Simens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Askell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Welinder</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Christiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Leike</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lowe</surname>
          </string-name>
          ,
          <article-title>Training language models to follow instructions with human feedback, 2022</article-title>
          . doi:
          <volume>10</volume>
          .48550/arXiv.2203.02155. arXiv:
          <volume>2203</volume>
          .
          <fpage>02155</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Yan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <surname>X.</surname>
          </string-name>
          <article-title>Chen, LTNER: Large Language Model Tagging for Named Entity Recognition with Contextualized Entity Marking</article-title>
          , in: Pattern Recognition: 27th International Conference, ICPR 2024, Kolkata, India, December 1-
          <issue>5</issue>
          ,
          <year>2024</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>XIX</given-names>
          </string-name>
          , Springer-Verlag, Berlin, Heidelberg,
          <year>2024</year>
          , p.
          <fpage>399</fpage>
          -
          <lpage>411</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -78495-8_
          <fpage>25</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>