Lesser the Shots, Higher the Hallucinations: Exploration of Genetic Information Extraction using Generative Large Language Models (2024)

Abstract: Organisation of information about genes, genetic variants, and associated diseases from vast quantities of scientific literature texts through automated information extraction (IE) strategies can facilitate progress in personalised medicine. We systematically evaluate the performance of generative large language models (LLMs) on the extraction of specialised genetic information, focusing on end-to-end IE encompassing both named entity recognition and relation extraction. We experiment across multilingual datasets with a range of instruction strategies, including zero-shot and few-shot prompting along with providing an annotation guideline. Optimal results are obtained with few-shot prompting. However, we also identify that generative LLMs failed to adhere to the instructions provided, leading to over-generation of entities and relations. We therefore carefully examine the effect of learning paradigms on the extent to which genetic entities are fabricated, and the limitations of exact matching to determine performance of the model.

## introduction there is a persistent need for organised genetic information to support advancements in scientific discovery and personalised healthcare @xcite . typically, this organisation process involves extraction and storage of key entities and their relationships from vast amounts of biomedical literature into databases by biocurators. this is an arduous, costly, time consuming and manual task, prone to errors due to fatigue and volume @xcite . with the exponential growth of literature, efforts have been directed towards automating this process with natural language processing techniques to streamline curation of biomedical literature, saving time and effort @xcite @xcite . early solutions for automation explored rulebased, machine learning, and/or statistical methods for text mining of biomedical literature @xcite @xcite . most such approaches failed to reach adequate accuracy levels to be used practically for biocuration, one of the key limitations being the weak generalisation of models @xcite . despite that, certain approaches, for example @xcite , provided good results showing that automated methods have good potential to extract information from biomedical literature @xcite . the natural language processing (nlp) task of information extraction (ie) addresses extraction of structured knowledge from natural language texts @xcite . this process is pivotal for automating curation of biomedical information. in this work, our focus is on the ie tasks of named entity recognition (ner) where entity spans are identified and annotated with a type, relation extraction (re) where specified entity types are identified and the relation type between the identified entities is classified, and end-to-end encompassing both ner and re steps, nerre. we target entities related to disease-associated genetic variation, including genes, mutations, and the diseases themselves. recently, methods based on generative ai have shown promising results for biomedical ie @xcite @xcite . hence, in our approach we explore the use of generative large language models (generative llms) through prompt engineering. generative llms are a specific class of llms that utilise decoder-only algorithms to generate content in response to a prompt, or instruction, on the basis of a pre-trained language model. we specifically consider the generative pre-trained transformer (gpt) models @xcite . the output of a generative llm depends directly on the prompt that is provided as input, and the task of developing a suitable prompt for a given task or information need is termed prompt engineering @xcite . a prompt can be crafted adhering to in-context learning paradigms, such as zero-shot or few-shot instructions. this involves providing either no (zero) or a small number (few) examples of the solution to a task in the prompt itself, to guide the generative llm to the desired output. we explore the effectiveness of utilising a general generative llm for end-to-end ie of genetic information. our key contributions are: this expands prior work on genetic ie both in breadth and depth, providing insight into the most effective use of generative llms for these tasks. ## methods our experiment involved an end-to-end ie pipeline with a manually crafted library of prompts for each ie task. we explored the impact of these prompts with the inclusion of examples under various incontext learning paradigms and the addition of an annotation guideline. after pre-processing, prompts were sent to gpt-3.5 turbo via openai api calls to perform the specified task. the results were then postprocessed to conform to the brat format @xcite for evaluation. this involved mapping each entity presented in the system output to a specific span of text where the entity appears. we processed each entity/relation in order, so that the first entity term in the output was mapped to the first occurrence of the term in the text, etc. during post-processing of the results, hallucinated instances -defined here as entities or relations that could not be projected into the relevant text -were identified and discarded. these hallucinated instances were classified into two types, namely, over-generated hallucinations and fabricated hallucinations. over-generated hallucinations are instances containing one or more entities that were found in the accompanied text but could not be mapped to any position on the text, after previous entities were mapped. fabricated instances included one or more entities and/or relations that were not found in the text at all. a method overview appears in figure 1 . code is available at https://github.com/ milindi-kodikara/rmit-read-biomed/ releases/tag/v2.0 . ## related work the availability of generative ai and llms has driven substantial developments in nlp. these llms are being used for ie due to their capabilities related to text generation, understanding and generalisation. ## conclusion we explored the use of a generative llm for endto-end genetic information extraction across several tasks and datasets. we additionally explored limitations of using a generative model by analysing hallucinated instances generated for each ie task. through our evaluation of prompting strategies we show that few-shot prompting provides optimal performance for tasks involving named entity recognition. we further show that there is minimal effect of learning paradigms for identification of relations between genetic entities. key limitations of a generative model include over-generation and fabrication of entities demonstrating that generative models struggle to adhere to the task outlined in the instructions. further research needs to be conducted to explore ways in which performance can be further improved along with minimising the negative impacts of using generative models for ie in the biomedical domain before using them practically. figure a6: hallucinations by entity type for varying number of shots for tbga (re) figure a7: hallucinations by relation type for varying number of shots for tbga (re) figure a8: hallucinations by entity type for varying number of shots for variome (ner+re) figure a9: hallucinations by relation type for varying number of shots for variome (ner+re)