arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.00841cs.CLcs.AIcs.IR
收藏

LeanContext:使用大语言模型实现成本高效的领域特定问答

LeanContext: Cost-Efficient Domain-Specific Question Answering Using LLMs

NEC Laboratories America(美国NEC实验室)

Md Adnan Arefeen, Biplob Debnath, Srimat Chakradhar

AI总结:

本文提出LeanContext,一种面向AI模型的上下文缩减方法,通过强化学习动态选择关键句子,在显著降低LLM API成本的同时,最小化问答准确率损失,并可与免费摘要器结合进一步提升性能。

摘要:

问答(QA)是大语言模型(LLMs)的一项重要应用,塑造了医疗保健、教育和客户服务领域的聊天机器人能力。然而,LLM的广泛集成对小企业构成了挑战,因为LLM API使用的费用高昂。当领域特定数据(上下文)与查询一起用于获得准确的领域特定LLM响应时,成本会迅速上升。一种选择是通过使用LLM对上下文进行摘要并减少上下文。然而,这也可能过滤掉回答某些领域特定查询所需的有用信息。在本文中,我们从面向人类的摘要器转向面向AI模型的友好摘要。我们的方法LeanContext,从上下文中高效提取与查询紧密对齐的k个关键句子。k的选择既不是静态的也不是随机的;我们引入了一种强化学习技术,根据查询和上下文动态确定k。其余不太重要的句子使用免费的开源文本缩减方法进行缩减。我们在著名的数据集(arxiv论文和BBC新闻文章)上,将LeanContext与几种最近的查询感知和查询不可知的上下文缩减方法进行了评估。尽管成本降低了37.29%到67.81%,但与保留整个上下文(无摘要)的基线相比,LeanContext的ROUGE-1分数仅下降了1.41%到2.65%。此外,如果使用免费的预训练基于LLM的摘要器来缩减上下文(生成人类可消费的摘要),LeanContext可以进一步修改缩减后的上下文,将准确性(ROUGE-1分数)提高13.22%到24.61%。

英文摘要:

Question-answering (QA) is a significant application of Large Language Models (LLMs), shaping chatbot capabilities across healthcare, education, and customer service. However, widespread LLM integration presents a challenge for small businesses due to the high expenses of LLM API usage. Costs rise rapidly when domain-specific data (context) is used alongside queries for accurate domain-specific LLM responses. One option is to summarize the context by using LLMs and reduce the context. However, this can also filter out useful information that is necessary to answer some domain-specific queries. In this paper, we shift from human-oriented summarizers to AI model-friendly summaries. Our approach, LeanContext, efficiently extracts $k$ key sentences from the context that are closely aligned with the query. The choice of $k$ is neither static nor random; we introduce a reinforcement learning technique that dynamically determines $k$ based on the query and context. The rest of the less important sentences are reduced using a free open source text reduction method. We evaluate LeanContext against several recent query-aware and query-unaware context reduction approaches on prominent datasets (arxiv papers and BBC news articles). Despite cost reductions of $37.29\%$ to $67.81\%$, LeanContext's ROUGE-1 score decreases only by $1.41\%$ to $2.65\%$ compared to a baseline that retains the entire context (no summarization). Additionally, if free pretrained LLM-based summarizers are used to reduce context (into human consumable summaries), LeanContext can further modify the reduced context to enhance the accuracy (ROUGE-1 score) by $13.22\%$ to $24.61\%$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑