Evaluating ChatGPT on Medical Information Extraction Tasks: Performance, Explainability and Beyond Wei Zhu Abstract Large Language Models (LLMs) like ChatGPT have demonstrated amazing capabilities in comprehending user intents and generate reasonable and useful responses. Beside their ability to chat, their capabilities in various natural language processing (NLP) tasks are of interest to the research community. In this paper, we focus on assessing the overall ability of ChatGPT in 4 different medical information extraction (MedIE) tasks across 6 benchmark datasets. We present the systematically analysis by measuring ChatGPT’s performance, explainability, confidence, faithfulness, and uncertainty. Our experiments reveal that: (a) ChatGPT’s performance scores on MedIE tasks fall behind those of the fine-tuned baseline models. (b) ChatGPT can provide high-quality explanations for its decisions, however, ChatGPT is over-confident in its predcitions. (c) ChatGPT demonstrates a high level of faithfulness to the original text in the majority of cases. (d) The uncertainty in generation causes uncertainty in information extraction results, thus may hinder its applications in MedIE tasks. † † address: University of Hong Kong, Hong Kong, HK, China 1 Introduction Large Language Models (LLMs) (e.g., GPT-3 [ 7 ] , LaMDA [ 84 ] and PaLM [ 9 ] , GPT-4 [ 68 ] ) are the main forces in revolutionizing and advancing the field of Natural Language Processing (NLP) [ 1 , 2 , 76 , 77 , 66 , 36 , 51 , 12 , 90 , 100 , 117 , 121 , 103 , 16 , 102 , 73 , 141 , 129 , 128 , 127 , 52 , 136 , 109 , 138 , 25 , 130 , 122 , 80 , 115 , 116 , 94 , 131 , 145 , 120 , 89 , 56 , 46 , 110 , 108 , 148 ] . LLMs are known for its amazing abilities: (a) instruction and demonstration learning. With a proper instruction of the task at hand and a few demonstrations [ 70 , 11 , 96 , 62 , 53 ] , the LLMs can perform tasks they are yet trained for. (b) chain-of-thought (CoT) [ 99 , 93 , 41 ] capabilities. LLMs have demonstrated great performances in solving a wide range of reasoning tasks by reasoning step-by-step. This reasoning capability is not observed in smaller models, thus is referred as an emergent ability in the literature [ 98 , 86 , 29 , 135 , 134 , 57 , 101 , 12 , 123 , 137 , 21 , 150 , 118 , 81 , 140 , 147 , 54 , 144 , 132 , 126 , 110 , 91 , 58 , 107 , 85 ] . ChatGPT 1 1 1 https://chat.openai.com/ has became the most popular AI based product within a short time span after its launch [ 45 ] . As a LLM, ChatGPT is known for its impressive ability to comprehend the user intents in the queries and repond with human-like contents. ChatGPT is built on the GPT-3 model series [ 7 , 79 , 70 ] using reinforcement learning from human feed-back (RLHF) [ 10 , 50 ] and high-quality human-annotated datasets of user queries and responses. Apart from its ability to chat with humans, ChatGPT has many other aspects that are of interest to NLP researchers. A series of research work have emerged, investigating the capabilities of ChatGPT for various NLP tasks, like sentiment analysis [ 83 , 97 ] , natural language inference [ 72 ] , machine reading comprehension [ 105 ] . The capabilities of ChatGPT as a general NLP task solver have been preliminarily explored in the above research and valuable insights are drawn. There are also work addressing the potential impact of ChatGPT on the society and human every-day life [ 28 , 149 , 82 , 4 ] . In this work, we conduct a comprehensive analysis of ChatGPT’s abilities in medical information extraction (MedIE) tasks. MedIE requires the model to have a deep understanding of the medical texts, and extract structured factual knowledge of diversified forms [ 27 , 95 , 71 , 130 , 139 ] , thus it is an ideal test-bed for evaluating ChatGPT’s capabilities. We conduct our experiments and analysis based on 6 datasets belonging to 4 fine-grained MedIE tasks. Through our experiments, we find that with carefully designed task instructions and demonstrations, ChatGPT still has clear performance gaps compared with fine-tuned baseline models, as depicted in Figure 1 . In addition to the performance evaluation, we also assess the explainability, faithfulness, confidence and uncertainty of the ChatGPT’s responses through both automatic evaluations and manual evaluations by domain experts. Our contributions are summarized as follows: • We comprehensively evaluate the overall performance of ChatGPT on various MedIE tasks and compare it with other popular models. • To assess the overall ability of ChatGPT, we conduct a systematic evaluation from five dimensions: performance, explainability, faithfulness, confidence and uncertainty. Our codes are publicly available for future research. Figure 1: Performance comparisons of ChatGPT and the baseline models. 2 Related work 2.1 Pretrained Large Language Models Recently, both the research field and the industry has seen the raise of large language models (LLMs). LLMs typically contain more than ten billion or even a hundred billion parameters, such as GPT-4 [ 68 ] , GPT-3 [ 7 ] , Gopher [ 74 ] , Chinchilla [ 30 ] , PaLM [ 9 ] , Megatron-turing-NLG [ 78 ] , etc. Scaling up the size of LLMs has resulted in a series of interesting observations: (a) scaling up the model size brings impressive abilities in few-shot and zero-shot learning scenarios, such as producing reasonable results with very few task demonstrations or task descriptions [ 7 , 9 ] . (b) scaling up the number of tasks in fine-tuning LLMs with instruction tuning improves the generalizability on unseen tasks [ 59 ] . (c) Emergent capabilities are unlocked when the model size is scaled up to hundreds of billions, which were not observed in smaller models [ 98 ] . Notably, the chain of thought capability is observed in LLMs [ 99 , 93 , 41 , 61 ] . With its impressive ability to understand user in-tent and generate human-like responses, ChatGPT has become the most popular language model within a short period of time after its lanuch. It is trained on the GPT family [ 7 , 79 , 70 ] and high-quality conversational-style datasets using reinforcement learning from human feedback (RLHF) [ 10 , 50 ] . Besides its dialogue ability, ChatGPT is being extensively studied by the researchers. Some literature focus on the ethical or other risks brought by the powerful LLMs like ChatGPT [ 28 , 149 , 43 ] . chatGPT has also revolutionized the traditional fields like education [ 4 , 42 ] and medicine [ 83 , 87 , 67 ] , and what will these industries advance with ChatGPT is analyzed. There are also research work investigating how ChatGPT performs in various natural language processing tasks. There are work testing ChatGPT on a wide range of NLP tasks, but usually a random test subset of the original benchmark tasks is tested [ 73 , 3 ] . Other works focus on a specific type of tasks. For instance, [ 69 , 83 ] work on sentiment analysis, [ 6 ] works on commonsense reasoning. The ChatGPT’s ability of machine translation is examined in [ 38 ] . [ 19 ] evaluates the mathematical capabilities of ChatGPT. Additionally, [ 63 , 24 ] investigate the differences between human-written and ChatGPT-generated contents in tasks like summarization and question answering, and the linguistic and grammatical features of ChatGPT’s responses are analyzed. 2.2 Information Extraction Information Extraction (IE) is a research topic of long history that aims to extract structured knowledge or factual information from unstructured texts [ 106 ] . The field of IE includes a wide range of tasks, such as named entity recognition [ 14 , 44 ] , relation extraction (RE) [ 133 , 49 ] , event extraction [ 34 ] , aspect-level sentiment analysis [ 8 ] . Since the raise of pre-trained models like BERT [ 15 ] , the performances on IE tasks have advanced greatly [ 146 ] . But one has to have different model structures for different fine-grained IE tasks, for instance, the SOTA nested NER models [ 113 ] are different from those of discontinuous NER tasks [ 112 ] . Recently, there is a trend that all the IE task should be solved by a unified paradigm, that is, Seq2Seq generation. [ 104 ] proposes the framework of BartNER which solves all types of NER tasks with a BART model [ 47 ] . UIE [ 60 ] takes a step ahead and proposes to use prompts and a unified structural language to deal with many types of IE tasks with a single model checkpoint. With the rise of LLMs, the research field of IE is also under revolution, and this work contributes to the literature by conducting a deep investigation into the ChatGPT’s capabilities in MedIE tasks. 2.3 Medical natural language processing The developments in neural networks and natural language processing has advanced the field of medical natural language processing (MedNLP) [ 125 , 27 , 130 ] . In the pre-BERT era, firstly, RNNs like LSTM/GRU are used for processing sequential medical data such as text and speech [ 5 ] . Convolutional networks are also used for medical text classificaiton [ 37 ] . The techniques of Graph neural networks are also explored for diagnose recommendations [ 55 ] . In this period, many different model architectures are specially designed for better performances on a specific MedNLP task [ 130 , 139 , 119 ] . Since BERT [ 15 ] , the pretrained language models (PLMs) become the deafult solution for MedNLP. In this stage, researcher becomes less interested in modifying the model architecture, but instead trying to pretrain or further pretrain a PLM from the open domain to the medical domain [ 26 , 146 , 22 ] . With the wide study of LLMs, the field of MedNLP is also being revolutionized. There are already works on adapting LLM backbones to the medical domain question answering [ 142 ] . And [ 143 ] propose PromptCBLUE, a prompt learning based benchmark dataset for examing the LLMs’ ability in MedNLP tasks. This work investigates MedIE capabilities in ChatGPT, and provide a deeper understanding of LLMs for future MedNLP research. 3 ChatGPT for MedIE In this section, we first briefly introduce six fine-grained MedIE tasks, then we present how to evaluate ChatGPT’s performances on these tasks with five different metric dimensions. The evaluation procedure involves annotations by the domain experts. 3.1 MedIE tasks MedIE involves a wide range of tasks which need to extract structured factual information from unstructured medical texts, such as entity, and relation, and event. In this research, we conduct our analysis on the following 4 MedIE tasks: Named entity recognition (NER)  NER aims to first identify the candidate medical entities, and then classify their types. Medical NER is known for its complexity, since it usually involves nested entities or discontinous entities [ 104 ] . Triple extraction (TE)  This task identifies the target entities and the relations between each pair of entities jointly. The medical knowledge is expressed not by entities, but their relations. For example, a medicine can cure a diease, or a symptom is caused by a disease. This task is generally more complex than merely identifying entities or classifying the relations of a given pair of entities. Clinical Event Extraction (CEE)  This task is an example of event detection tasks [ 13 ] in the medical field. Same as the general event detection tasks, medical CEE task requires a model to identify the event triggers, classify the event types and extracts different arguments and categorize their roles with respect to the target events. ICD encoding This task aims to map the diagnosis terms (query terms) written by doctors to standardized disease terms (target terms) according to a certain standard [ 35 ] . The number of standardized terms may exceed 10 thouand. Recently, this task is modeled by a system where a small set of candidate terms are firstly retrieved and then a ranking model scores and ranks the relevances of each query-target term pair [ 40 ] . The standard system adopted in this task is usually the International Statistical Classification of Diseases and Related Health Problems 10th Revision (ICD-10) 2 2 2 https://www.who.int/standards/classifications/classification-of-diseases . ICD-10 has more than 30 thousand disease terms, thus it is prohibitive to feed all the disease terms into ChatGPT. We first retrieve candidate target terms for each query term using BM25 [ 75 ] , then ask ChatGPT to be a ranking model and choose the final target terms among the candidates. ICD-10 has different versions in different countries, and in this work we adopt the ICD-10 Beijing Clinical Trial (version v601) 3 3 3 http://www.cips-chip.org.cn/2021/eval3 . We will refer to this Chinese version of ICD-10 as ICD-10-Beijing. In summary, every task needs LLMs’ unique ability to perform well. It is worth to explore the performances on these fine-grained MedIE tasks on ChatGPT. 3.2 Composition of task prompts To comprehensively evaluate the overall perfor-mance of ChatGPT on IE tasks, we ask ChatGPT to generate the responses under the closed MedIE setting. In the closed MedIE setting [ 65 ] , the labels of the entities/relations/events are pre-defined and a model to extract information accordingly and no other information should be extracted. The closed MedIE paradigm is the most commomly used in previous works, which uses the task-specific dataset with supervised learn-ing paradigm to finetune a model like BERT [ 15 ] . For ChatGPT, as we can not directly fine-tune the model parameters, we evaluate the ChatGPT’s ability to conduct MedIE with task prompts. Specifically, the task prompt consists of the following parts: • Task descriptions, describing the objective of the task, and the steps that should be taken to achieve the objective. • label sets, containing all the candidate labels in this task. This part also includes the explanations of the labels. • Output formats, regulating the formats of the responses. Since MedIE tasks extract structured information from the un-structured texts, what fields are in the output results should be specified. And we need to specify the output formats so that we can evaluate the performance of ChatGPT. • Demonstrations: with a few input-output examples of an unseen task, the LLMs can learn from the examples and perform the task without optimizing any parameters [ 53 ] . • The input text of the sample that we want the model to make prediction on. The prompts is in the same language as the MedIE task. Due to limited length, we only present the prompt for CMeEE-v2 [ 32 ] , a Chinese NER task, in Table 1 . The left size is the prompt contents in Chinese, and the right size is their English translation. Table 1: The task prompt for the medical NER task CMeEE-v2 [ 32 ] . The left is the prompt in Chinese, and the right size is its English translation 任务名称: Task name 医疗文本实体抽取 NER for medical texts 任务描述: Task description: 对于给定的一组纯医学文本文档,任务的目标是识别并抽取出与医学临床相关的实体, 并将他们归类到预先定义好的类别。 实体类型含义解释: Explanations of the entity labels: 1. 疾病:指导致病人处于非健康状态的原因或者医生对病人做出的诊断,并且是能够被治疗的。 包括疾病或综合征、中毒或受伤、器官或细胞受损等 2. 临床表现:疾病的表现,泛指患者不适感觉以及通过检查得知的异常表现。主要包括症状、体征 3. 医疗程序:泛指为诊断或治疗所采取的措施、方法及过程。主要包括检查程序、治疗或预防程序等 4. 医疗设备:泛指为诊断或治疗所使用的工具、器具、仪器等。主要包括检查设备、治疗设备 5. 药物:指用来预防、治疗及诊断疾病的物质,包括临床药物、抗生素等 6. 医学检验项目:指检查涉及到的体液检查项目、重要生理指标以及其他检查项目,主要针对人体而言, 是能够通过设备或实验检测出的项目,并且是能够被量化,有其对应的测量值或指标值 7. 身体解剖部位:泛指细胞、组织、及位于人体特定区域的由细小物质成分组合而成的结构、 器官、系统、肢体,另外包括身体产生或解剖身体产生的物质等 8. 科室:指医院或医疗机构所设有的科室 9. 微生物类:包括细菌、病毒、真菌以及一些小型的原生生物、 显微藻类等在内的一大类生物群体,另外包括微生物类产生的毒素、激素、酶等 1. Disease: refers to the cause of the patient’s unhealthy state or the doctor’s diagnosis of the patient, and it can be treated. Including diseases or syndromes, poisoning or injury, organ or cell damage, etc. 2. Clinical manifestations: manifestations of diseases, generally referring to the patient’s discomfort and abnormal manifestations learned through examination. It mainly includes symptoms and signs 3. Medical procedure: generally refers to the measures, methods and processes adopted for diagnosis or treatment. It mainly includes inspection procedures, treatment or prevention procedures, etc. 4. Medical equipment: generally refers to tools, appliances, instruments, etc. used for diagnosis or treatment. Mainly including inspection equipment, treatment equipment 5. Drugs: refer to substances used to prevent, treat and diagnose diseases, including clinical drugs, antibiotics, etc. 6. Medical inspection items: refer to body fluid inspection items, important physiological indicators and other inspection items involved in the inspection, mainly for the human body, and is an item that can be detected by equipment or experiments, and can be quantified, and has its corresponding measurement value or index value 7. Body anatomical parts: generally refer to cells, tissues, and specific areas located in the human body structures, organs, systems, and limbs composed of small material components, including substances produced by the body or dissected by the body, etc. 8. Department: refers to the department set up by a hospital or medical institution 9. Microorganisms: a large group of organisms including bacteria, viruses, fungi, some small protists, microscopic algae, etc., and toxins, hormones, enzymes, etc. produced by microorganisms 示例: - 示例1 input: 对儿童SARST细胞亚群的研究表明,与成人SARS相比,儿童细胞下降不明显, 证明上述推测成立。 target: [{’实体类型’: ’身体解剖部位’, ’实体名称’: ’SARST细胞亚群’}, {’实体类型’: ’疾病’, ’实体名称’: ’成人SARS’}, {’实体类型’: ’临床表现’, ’实体名称’: ’细胞下降’}, {’实体类型’: ’身体解剖部位’, ’实体名称’: ’细胞’}] Example 1 input: The research on children’s SARST cell subsets shows that compared with adult SARS, the children’s cells are not significantly reduced, proves that the above speculation is true. target: [{’Entity Type’: ’Body Anatomy’, ’Entity Name’: ’SARST Cell Subgroup’}, {’Entity Type’: ’Disease’, ’ Entity name’: ’Adult SARS’}, {’Entity type’: ’Clinical manifestation’, ’Entity name’: ’Cell decline’}, {’Entity type’: ’Body Anatomy’, ’Entity Name’: ’Cell’}] 输出格式规定: Output format: 1. 本任务的输出一个字典的列表,必须符合json格式。 2. 每个字典代表一个医学实体,包含\”实体类型\”, \”实体名称\”字段,每个字段的取值都为字符串。 3. 实体名称:即为医学实体在给定的文本中的出现形式,实体名称可以包含必要的标点符号, 即可以是一个词、短语或句子。“临床表现”实体类别中允许嵌套,即该类型实体的名称内部可能 包含其他八类实体。除了“临床表现”实体之外的医学实体,在抽取其实体名称时遵循“最大单位 标注法”,即如果一个实体名称里包含其他的实体,只需要将最长的实体标注出来 4. 注意:你需要一步步的思考,然后形成医学实体列表。 1. The output of this task is a list of dictionaries, which must conform to the json format. 2. Each dictionary represents a medical entity, including \”entity type\”, \”entity name\” fields, and the value of each field is a string . 3. Entity name: It is the appearance form of the medical entity in the given text, the entity name can contain necessary punctuation marks, and it can be a word, phrase or sentence. Nesting is allowed in the ”clinical manifestation” entity category, that is, the name of this type of entity may contain other eight types of entities. Medical entities other than ”clinical manifestation” entities follow the ”maximum unit labeling method” when extracting their entity names, that is, if an entity name contains other entities, only the longest entity needs to be marked out 4. Note: You need to think step by step, and then form a list of medical entities. 输入: Current input text: input:【发病率】自1952年Bruton报告首例先天性无丙种球蛋白血症(congenitalagammaglobulinemia) 以来,全球报道的PID病例已愈万例,但其总发病率尚无确切资料。 input: [Incidence] Since Bruton reported the first case of congenital agammaglobulinemia (congenital agammaglobulinemia) in 1952, more than 10,000 cases of PID have been reported worldwide, but there is no definite information on the total incidence. 3.3 Evaluation protocols To systemically and comprehensively evaluate the ChatGPT’s capabilities on the MedIE tasks, we evalute ChatGPT’s responses under the five dimensions: • Performance .  One import objective of this work is to comprehensively evaluate the overall performance of ChatGPT against the ground truth on various MedIE tasks and compare it with other popular fine-tuned models. • Explainability In this work, we examine the explainability of ChatGPT by asking it to provide detailed and accurate explainations of its reasoning processes for conducting information extraction on a given task. We collect the explainations from ChatGPT at two levels: (a) sample level (denoted as sample_level_explain ), that is, we ask ChatGPT to provide an overall explaination of the whole input’s extraction results. (b) instance level, (denoted as instance_level_explain ), that is, explanation is provided for each extracted instance (for example, each entity mention). • Faithfulness The faithfulness of LLMs is important to ensure their trustworthiness [ 124 ] . For evaluating ChatGPT’s faithfulness, we examine two aspects: (a) whether the responses made by ChatGPT follows the task instructions and extract information from the input. This aspect of faithfulness is denoted as Instruct_following (b) whether the explainations made by the ChatGPT are faithful to the original sample input. This aspect is denoted as faithful_reasoning . • Confidence We aim to examine whether ChatGPT has over-confidence phenomenon. • Uncertainty Since ChatGPT generates responses using the top-p sampling [ 31 ] decoding algorithm, the prediction uncertainty of ChatGPT is an important aspect that should be considered when applying ChatGPT to different applications. In this work, we measure the prediction uncertainty of ChatGPT by querying the same sample to ChatGPT API for 5 times and measure the differences among different runs. 4 Performances 4.1 Experimental Setups To ensure a comprehensive evaluation of ChatGPT’s abilities on the MedIE task, we conduct experiments on a diverse range of MedIE tasks, including 4 different tasks spanning 6 datasets: (a) for medical NER tasks, we include three widely studied benchmark datasets, ShARe13 [ 64 ] , CADEC [ 39 ] , CMeEE-V2 [ 32 ] . (b) for triple extraction task, we include the CMeIE-v2 dataset [ 23 ] ; (c) The CDEE dataset [ 111 ] is a benchmark Chinese clinical event extraction task. (d) for the ICD-coding task, the CHIP-CDN task [ 111 ] is adopted for evaluation. We use the official OpenAI API (with the gpt-3.5-turbo engine) to obtain the ChatGPT responses. To prevent any biases caused by historical chats, we cleared the conversation after generating each response. For the ShaRE-2013 and CADEC datasets, we ask ChatGPT to evaluate on the test set. For the rest tasks, the test set ground truths are not publicly available, so we conduct evaluations on the development set. Otherwise specified, we choose the first two samples from the training set as demonstrations. For comparison, we compare ChatGPT with a series of popular baselines: (1) BERT fine-tuning. For all the six task, we adopt the bi-affine attention module as the prediction module, following [ 17 ] (2) UIE [ 60 ] . (3) The state-of-the-art (SOTA) methods on each dataset, as reported in Table 2 . For each task, we report the instance level strict F1-score. Here, an instance is a piece of structured information/knowledge from the un-structured text. For example, the entity mention and entity type constitutes an instance for the NER tasks. For the ICD coding task, since a diagnosis term from the doctor may correspond to more than one ICD standard terms, an instance in this task is defined as a ICD-10 standard disease term. The F1-score metric we adopt is strict, in the sense that the true positive number will add one only when all the keys in an ground-truth instance is correctly predicted. Due to the time-consuming nature of obtaining responses from domain experts, we randomly select 200 samples for each task for manual annotations. For each sample, we ask the human experts to annotate sample_level_explain , instance_level_explain and faithfull_reasoning as boolean values. 4.2 Performance of ChatGPT Table 2: The performances of ChatGPT and several baseline models on the six MedIE datasets. We report the average performance on the whole dev set over 5 different runs (with standard deviations reported in brackets). All the baseline models are re-implemented using official open-source codes. MedIE Tasks Dataset BERT UIE SOTA ChatGPT Named Entity Recognition ShARe13 76.5 ( \pm 0.2 ) 78.8 ( \pm 0.4 ) 79.6 ( \pm 0.7 ) [ 112 ] 23.5 ( \pm 1.2 ) CADEC 70.3 ( \pm 0.4 ) 70.6 ( \pm 0.6 ) 71.6 ( \pm 0.4 ) [ 112 ] 19.7 ( \pm 1.5 ) CMeEE-v2 66.2 ( \pm 0.3 ) 66.7 ( \pm 0.4 ) 68.5 ( \pm 0.3 ) [ 18 ] 39.8 ( \pm 2.1 ) Triple Extraction CMeIE-v2 58.6 ( \pm 0.1 ) 57.4 ( \pm 0.3 ) 60.1 ( \pm 0.5 ) [ 92 ] 9.9 ( \pm 0.8 ) Event Extraction CHIP-CDEE 62.4 ( \pm 0.5 ) 64.1 ( \pm 0.5 ) 65.8 ( \pm 0.4 ) [ 33 ] 26.1 ( \pm 1.8 ) ICD Coding CHIP-CDN 78.9 ( \pm 0.3 ) 82.3 ( \pm 0.2 ) 84.9 ( \pm 0.3 ) [ 143 ] 30.9 ( \pm 1.1 ) In this subsection, we report the performances of different models including ChatGPT on the six benchmark MedIE tasks in Table 2 . It is clear from Table 2 that ChatGPT’s performance is not comparable to that of the fully fine-tuned baseline models or the SOTA methods in any of the MedIE tasks. This is not surprising given that ChatGPT does not fine-tune its parameters to adapt to the task, and asking it for the prediction with only prompts is an extreme few-shot scenario. In comparison, the other compared models are fully fine-tuned on task-specific datasets under a supervised learning paradigm. Another reason may be that the meaning of some labels may not be easy to understand even though we have provide explanations, thereby negatively impact the performance. In addition, we can see that due to the top-p sampling strategy, the standard deviation (i.e., uncertainty) in performance scores for ChatGPT is generally higher than the baseline models. The results in Table 2 indicate that ChatGPT performs slightly better on relatively simple MedIE tasks but have difficulty in dealing with complex and challenging tasks. For example, the ICD coding task only involves matching the diagnoses term from medical records to the candidate standard terms from the ICD-10 vocabulary, and no further contextual understanding are required. And since in the CMeEE task, even though there are nested entities, more than 90% of the entities are flat. Thus, ChatGPT can achieve F1-scores of around 30 in these two tasks. However, in the more complex tasks like CMeIE-v2, ChatGPT struggles as it needs to firstly identify the entities that exist in the input and then identify which entity pairs have meaningful relationships. In summary, ChatGPT’s performance varies based on the complexity of the task. Note that in our results, the ChatGPT falls behind the fine-tuned baseline models. This conclusion is inconsistent with the previous studies [ 72 , 20 , 48 ] , which show that ChatGPT can achieve desirable performance in a wide range of NLP tasks including IE tasks. One possible explanation for the difference in conclusions is that we report the performance of the entire dev or test set for each task in our study, while prior studies reported on a very small set of test samples drawn at random, which may have substantial variance. In addition, the MedIE tasks requires domain knowledges and are more complex and challenging than the tasks in the general domain [ 22 ] . 4.3 Other evaluation dimensions While it is important to obtain ChatGPT’s performance in evaluation, it is equally important to evaluate its capabilities from a wide range of dimensions that could offer important insights for future research. In this subsection, we analyze the explainability, faithfulness and confidence to give better insights into the ChatGPT’s abilities. 4.3.1 Explainability Explainability is an essential factor for the modern neural networks like LLMs, as it allows users to understand how the model arrives at its predictions and be comfortable using the applications supported by LLMs. To evaluate instance_level_explain , we only consider the correctly predicted instances to ensure a valid evaluation of ChatGPT’s explainability ability. The ratio of samples/instances with reasonable explanations (denoted as R-score) for each task is reported in Table 3 , and the following take-aways can be drawn. Firstly, human annotators approve the reasons given by ChatGPT, with the majority of datasets achieving a R-score of over 750%. The above results demonstrate that ChatGPT gives high-quality explanation for its prediction. Secondly, we find that ChatGPT seems to be over-confident in its explanations, since on the wrong predictions ChatGPT can also provide explanations with confident tones and it can not reflect on its mistakes. Table 3: The R-scores for the explanations provded by the ChatGPT of its prediction both at the sample level and instance level. Dataset sample-level R-score instance-level R-score ShARe13 76% 91% CADEC 77% 89% CMeEE-v2 81% 93% CMeIE-v2 79% 95% CHIP-CDEE 76% 92% CHIP-CDN 77% 88% 4.3.2 Confidence In this part, we investigate the level of confidence provided by ChatGPT for both the correctly and incorrectly predicted instances. Our objective is to investigate whether ChatGPT can provide reasonable prediction confidence scores for its predictions, thus reducing the risk of over-confidence or mis-interpretation. In Table 4 , we present the average confidence scores of correct and incorrect predictions from ChatGPT, referred to CC-score and IC-score, respectively. The results in Table 4 reveal that ChatGPT has high confidence levels in their correct and incorrect predictions. This is in line with the previous literature reporting that large scale neural network models are over-confident [ 88 ] . This overconfidence may present risk of misguidances to users. In addition, we find two additional observations: (a) there are no significant gaps between the CC-score and IC-score, indicating the need for careful evaluation of ChatGPT’s outputs since high confidence scores does not mean the predictions are more likely to be correct. (b) The confidence scores have lower standard deviations. In fact, many of the samples have the same confidence scores. The above two observations reveal the un-reliability of ChatGPT’s confidence scores. Table 4: The average confidence scores estimated by ChatGPT for its predicted instance. The standard devaitions of confidence scores are reported in bracket. Dataset CC-score IC-score ShARe13 81.4 ( \pm 1.2) 81.1 ( \pm 0.9) CADEC 79.8 ( \pm 1.0) 80.1 ( \pm 1.7) CMeEE-v2 82.2 ( \pm 0.8) 81.9 ( \pm 1.1) CMeIE-v2 79.6 ( \pm 1.3) 78.9 ( \pm 1.1) CHIP-CDEE 79.3 ( \pm 1.5) 79.1 ( \pm 1.3) CHIP-CDN 81.5 ( \pm 0.9) 80.7 ( \pm 0.8) 4.3.3 Faithfulness Assessing the faithfulness of ChatGPT is critical in developing a trustworthy information extraction model. Recent work argue that LLMs could provide hullucinated information to users, which could potentially misguide the users’ decision making [ 114 ] . In this work, we measure the faithfulness of ChatGPT on the MedIE tasks in the following two aspects: (a) Instruct_following , that is, whether the responses made by ChatGPT follows the task instructions and extract information strictly following the inputs and the given label sets or candidate sets. (b) faithful_reasoning , that is, whether the explanations given by ChatGPT are faithful to the original sample inputs. Table 5 reports the ratio of the annotated samples in which the Instruct_following or faithful_reasoning key is true. We can see that on most of the MedIE tasks, the Instruct_following and faithful_reasoning scores exceed 80%, showing that ChatGPT can follow the task instructions and its explanations are regarded as reliable according to the inputs. This result also demonstrate that the performance gap from ChatGPT to the fine-tuned baselines are not caused by generating labels that are not in the label sets. Table 5: The ratio of the annotated samples in which the Instruct_following or faithful_reasoning key is true Dataset Instruct_following faithful_reasoning ShARe13 86% 96% CADEC 87% 93% CMeEE-v2 89% 94% CMeIE-v2 83% 91% CHIP-CDEE 89% 95% CHIP-CDN 82% 93% 5 Conclusions In this paper, we systematically analyze the ChatGPT’s performance, uncertainty, explainability, over-confidence and faithfulness on medical information extraction (MedIE) tasks. With carefully designed task prompts, we collect ChatGPT’s responses via OpenAI APIs. Expert annotations are included for reliable evaluation. On the 6 MedIE tasks, we find that: (a) ChatGPT’s performance is not satisfying compared to fully fine-tuned baseline models. (b) ChatGPT can provide valid explanations for its predictions. (c) The over-confidence issue is observed in ChatGPT, indicating low calibration and risk for application. (d) ChatGPT exhibits faithfulness to the input texts and task prompts. (e) The uncertainty caused by the randomness in response decoding results in high uncertainty in the predicted results. We hope that our work could be the basis for future research on applying LLMs like ChatGPT for information extraction.