使用ChatGPT在药物处方中进行零样本和少样本命名实体识别与文本扩展
Zero- and Few-shot Named Entity Recognition and Text Expansion in Medication Prescriptions using ChatGPT
AI总结:
本研究使用ChatGPT 3.5在零样本和少样本设置下对药物处方进行命名实体识别和文本扩展,少样本方法有效防止了系统幻觉,在处理安全相关药物数据时取得了良好的性能。
摘要:
引言:药物处方通常以自由文本形式存在,包含两种语言的混合、本地品牌名称以及各种特殊格式和缩写。大型语言模型(LLMs)在响应输入提示生成文本方面展现出了可喜的能力。我们使用ChatGPT 3.5自动结构化和扩展出院小结中的药物声明,从而使其更容易被人类和机器解读。方法:在零样本和少样本设置下,使用不同的提示策略进行命名实体识别(NER)和文本扩展(EX)。100条药物声明被手动标注和整理。NER性能通过严格匹配和部分匹配进行测量。对于EX任务,两位专家通过评估原始声明和扩展声明之间的语义等价性来解释结果。模型性能通过精确率、召回率和F1分数来测量。结果:对于NER,表现最佳的提示在测试集中达到了0.94的平均F1分数。对于EX,少样本提示在其他提示中表现出优越性能,平均F1分数为0.87。结论:我们的研究展示了使用ChatGPT在自由文本药物声明中进行NER和EX任务的良好性能。与零样本基线相比,少样本方法防止了系统产生幻觉,这在处理安全相关的药物数据时是不可接受的。
英文摘要:
Introduction: Medication prescriptions are often in free text and include a mix of two languages, local brand names, and a wide range of idiosyncratic formats and abbreviations. Large language models (LLMs) have shown promising ability to generate text in response to input prompts. We use ChatGPT 3.5 to automatically structure and expand medication statements in discharge summaries and thus make them easier to interpret for people and machines. Methods: Named-entity Recognition (NER) and Text Expansion (EX) are used in a zero- and few-shot setting with different prompt strategies. 100 medication statements were manually annotated and curated. NER performance was measured by using strict and partial matching. For the task EX, two experts interpreted the results by assessing semantic equivalence between original and expanded statements. The model performance was measured by precision, recall, and F1 score. Results: For NER, the best-performing prompt reached an average F1 score of 0.94 in the test set. For EX, the few-shot prompt showed superior performance among other prompts, with an average F1 score of 0.87. Conclusion: Our study demonstrates good performance for NER and EX tasks in free-text medication statements using ChatGPT. Compared to a zero-shot baseline, a few-shot approach prevented the system from hallucinating, which would be unacceptable when processing safety-relevant medication data.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。