Improving Entity Recognition Using Ensembles of Deep Learning and Fine-tuned Large Language Models

本文是LLM系列文章,针对《Improving Entity Recognition Using Ensembles of Deep Learning and Fine-tuned Large Language Models: A Case Study on Adverse Event Extraction from Multiple Sources》的翻译。

使用深度学习和微调大型语言模型的集成改进实体识别:从多个来源提取不良事件的案例研究

摘要

目的
从文本数据中提取 COVID-19 疫苗后的不良事件 (AE) 对于监测和分析免疫接种的安全性、识别潜在风险并确保安全使用这些产品至关重要。传统的深度学习模型擅长学习顺序数据中复杂的特征表示和依赖关系,但通常需要大量标记数据。相比之下,大型语言模型(LLM)在理解上下文信息方面表现出色,但在命名实体识别(NER)任务上表现不稳定,这可能是由于它们的训练范围广泛但不具体。本研究旨在评估LLM和传统深度学习模型在 AE 提取中的有效性,并评估集成这些模型对性能的影响。
方法
在本研究中,我们利用疫苗不良事件报告系统 (VAERS) (n=621)、Twitter (n=9,133) 和 Reddit (n=131) 的报告和帖子作为我们的语料库。我们的目标是提取三种类型的实体:疫苗、疫苗和不良事件 (ae)。我们探索并微调了(GPT-4 除外)多个 LLM,包括 GPT-2、GPT-3.5、GPT-4、Llama-2 7b 和 Llama-2 13b,以及传统深度学习模型(如循环神经网络) (RNN)和用于生物医学文本挖掘的 Transformers 的双向编码器表示(BioBERT)。为了提高性能,我们创建了具有最佳性能的三个模型的集成。在评估方面,我们使用严格和宽松的F1分数来评估每个实体类型的性能,并使用微平均F1来评估整体性能。
结果
集成模型在“疫苗”、“射击”和“ae”方面取得了最高的性能,严格的 F1 分数分别为 0.878、0.930 和 0.925,微平均分数为 0.903。这些结果强调了针对特定任务微调模型的重要性,并证明了集成方

### Chain-of-Thought Prompting Mechanism in Large Language Models In large language models, chain-of-thought prompting serves as a method to enhance reasoning capabilities by guiding the model through structured thought processes. This approach involves breaking down complex problems into simpler components and providing step-by-step guidance that mirrors human cognitive processing. The creation of these prompts typically includes selecting examples from training datasets where each example represents part of an overall problem-solving process[^2]. By decomposing tasks into multiple steps, this technique encourages deeper understanding and more accurate predictions compared to traditional methods. For instance, when faced with multi-hop question answering or logical deduction challenges, using such chains allows models not only to generate correct answers but also articulate intermediate thoughts leading up to those conclusions. Such transparency facilitates better interpretability while improving performance on various NLP benchmarks. ```python def create_chain_of_thought_prompt(task_description, examples): """ Creates a chain-of-thought prompt based on given task description and examples. Args: task_description (str): Description of the task at hand. examples (list): List containing tuples of input-output pairs used for demonstration purposes. Returns: str: Formatted string representing the final prompt including both instructions and sample cases. """ formatted_examples = "\n".join([f"Input: {ex[0]}, Output: {ex[1]}" for ex in examples]) return f""" Task: {task_description} Examples: {formatted_examples} Now try solving similar questions following above pattern. """ # Example usage examples = [ ("What color do you get mixing red and blue?", "Purple"), ("If it rains tomorrow, will we have our picnic?", "No") ] print(create_chain_of_thought_prompt("Solve logic puzzles", examples)) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UnknownBody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值