用关键片段替代全文,实现临床文本分类性能不变但成本更低
Less Context, Same Performance: A RAG Framework for Resource-Efficient LLM-Based Clinical NLP
- 仅提取与任务最相关的4000词,通过RAG框架输入LLM
- 三种大模型在手术并发症识别上表现与全篇处理无显著差异
- 适合医疗文本分析场景,尤其对资源受限的部署有帮助
长文本分类对大型语言模型(LLMs)而言因令牌限制和高计算成本而具挑战性。本研究探讨是否仅使用最相关文本片段的检索增强生成(RAG)方法,可达到处理完整临床笔记时大上下文LLMs的分类性能。首先将临床文档切分为小段,转换为向量嵌入并存入FAISS索引;随后根据分类查询检索前4000个最相关词,并将这些整合段落输入LLM。我们在手术并发症识别任务上评估了GPT4o、LLaMA和Mistral三个模型。结果显示,AUC ROC、精确率、召回率和F1值在RAG方法与全篇处理之间无统计学显著差异(p > 0.05)。结果表明,RAG可显著减少令牌使用量而不损失分类准确性,为分析长篇临床文档提供可扩展且低成本的解决方案。
原文摘要 · Abstract (English)
Long text classification is challenging for Large Language Models (LLMs) due to token limits and high computational costs. This study explores whether a Retrieval Augmented Generation (RAG) approach using only the most relevant text segments can match the performance of processing entire clinical notes with large context LLMs. We begin by splitting clinical documents into smaller chunks, converting them into vector embeddings, and storing these in a FAISS index. We then retrieve the top 4,000 words most pertinent to the classification query and feed these consolidated segments into an LLM. We evaluated three LLMs (GPT4o, LLaMA, and Mistral) on a surgical complication identification task. Metrics such as AUC ROC, precision, recall, and F1 showed no statistically significant differences between the RAG based approach and whole-text processing (p > 0.05p > 0.05). These findings indicate that RAG can significantly reduce token usage without sacrificing classification accuracy, providing a scalable and cost effective solution for analyzing lengthy clinical documents.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。