方法文章

通过向量嵌入来增强大型语言模型,以提高特定于域的响应能力

DOI:

10.3791/66796

2024年12月6日

本文内容

摘要

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

在该协议中,通过向量嵌入机制增强同行评审的、特定领域的科学文章,从而提高了基础大型语言模型的响应质量。此外,还提供了代码来帮助在大型语言模型之间进行性能比较。

摘要

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

大型语言模型 (LLM) 已成为生成与用户查询相关的信息的常用资源。此类模型是通过资源密集型训练过程创建的,该过程利用广泛的静态文本数据语料库。这种静态特性导致在知识、专有信息和敏感数据快速变化的领域中采用受到限制。在这项工作中,概述了使用基于嵌入的方法为特定领域的信息增强通用 LLM(称为基础模型)的方法,以整合最新的、经过同行评审的科学手稿。这是通过 Llama-Index 等开源工具和 Llama-2 等公开可用的模型实现的,以最大限度地提高透明度、用户隐私和控制力以及可复制性。虽然科学手稿用作示例用例,但这种方法可以扩展到任何文本数据源。此外,还讨论了在此增强功能之后评估模型性能的方法。 这些方法能够为高度专业化的领域快速开发 LLM 系统,而不管训练语料库中信息的全面性如何。

引言

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

OpenAI 的 ChatGPT 或 Meta AI 的 Llama 等大型语言模型 (LLM) 已迅速成为生成与用户提示相关的文本的流行资源。这些模型最初用于预测序列中的下一个词汇项目,现在已经发展到理解上下文、编码临床信息并在各种任务上表现出高性能 1,2,3,4。尽管语言模型比这些功能及其目前的流行程度早了几十年5,但深度学习和计算功能的最新进展使用户可以通过基于 Web 的技术和应用程序接口 (API) 6 广泛使用预训练的高质量商业 LLM。但是,以这种格式使用 LLM 有几个明显的限制。

挑战 1:静态训练语料
LLM 在大量(例如,在 Llama 27 的情况下为 2 万亿个标记)但静态的文本数据主体上进行训练。这为生成与正在快速发展或不断变化的文献相关的准确响应带来了挑战。在这种静态方法中,LLM 需要经常重新训练以跟上最新数据,这既不实用也不可扩展。此外,需要根据训练数据中不存在的信息进行响应的提示可能会阻止有用的文本生成或导致幻觉8(Hallucinations)。幻觉或事实捏造的实例引起了人们对 LLM 可靠性的严重担忧,尤其是在信息准确性至关重要的环境中9

挑战 2:缺乏域特异性
预先训练的模型通常是为一般用途而创建的,而用户可能需要专门针对特定域中的性能优化的模型。此外,从 训练模型或执行重大微调所需的计算资源和数据对许多用户来说是令人望而却步的。

挑战 3:缺乏隐私
寻求涉及敏感数据或专有信息的应用程序的用户可能不愿意或不能使用某些 LLM 服务,因为他们缺乏有关如何存储或使用数据的信息。

挑战 4:缺乏保证的稳定性
具有专有 LLM 的服务可能随时更改可用模型或更改行为,这使得稳定性成为依赖这些服务的应用程序的实施的一个问题。

检索增强生成 (RAG) 是一种为提高 LLM 性能而开发的技术,尤其是在与模型训练语料库10,11 之外的信息相关的查询上。这些系统通过合并在生成对用户查询的响应时要考虑的上下文信息来增强 LLM。最近的各种工作描述了 RAG 系统的应用及其潜在优势 12,13,14。

这项工作中概述的方法的目标是演示这样一个系统的构建,并为研究人员提供一个框架,以快速试验特定领域的增强 LLM。此方法适用于寻求使用基于文本的外部数据源来扩充 LLM 的用户。具体来说,该协议的首要目标是提供可扩展到各种实际 LLM 和 RAG 实验的分步代码,而无需语言建模领域的大量技术专业知识,尽管需要 Python 的工作知识才能应用这种方法而无需修改。为了最大限度地提高用户控制、透明度、可移植性和解决方案的可负担性,使用了开源、公开可用的工具。建议的系统通过以下方式解决前面提到的问题:

解决方案 1 和 2:静态训练语料库和缺乏领域特异性
提供的方法利用 RAG 方法,利用嵌入来提供原始训练数据中未包含的域特定信息。概括性模型将文本或其他数据转换为向量或单维数字数组的表示形式。这种技术非常有用,因为它将文本中包含的语义信息转换为密集的数字形式。通过将用户查询投影到同一嵌入空间中,可以使用各种算法来计算用户查询和文本文档部分之间的距离15,从而近似语义相似性。因此,从分解为离散部分的文档中创建此类向量的数据库可以促进在大量文档中搜索与用户查询最相关的文本(图 1)。此方法可扩展到任何文本文档。虽然开始实施其他方法(例如在线搜索功能)来增强 LLM,但这种方法允许用户选择被认为对其用例具有足够高质量的来源。

解决方案 2:缺乏隐私
在此实施中,使用安全的云环境进行托管,没有用户提示、生成的响应或其他数据离开此生态系统。但是,所有代码都是以与平台无关的方式编写的,以确保可以替代其他云提供商或本地硬件。

解决方案 3:缺乏保证的稳定性
这种方法利用开源库,并专注于使用公开可用的权重来增强 LLM,从而在需要时实现更高程度的透明度、稳定性和版本控制。

图 2 显示了我们提议的系统的完整示意图,协议部分概述了复制此系统或类似系统的详细说明。通过微调或增强来改变模型行为时,另一个考虑因素是性能评估。在语言生成模型中,这带来了独特的挑战,因为许多传统的机器学习指标不适用。尽管存在多种技术16,但在这项研究中,使用专家编写的多项选择题 (MCQ) 来评估准确性并比较增强前后的性能,以及与流行的替代 LLM 的性能。

方案

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

在本文中演示的使用案例中,向量存储是使用芝加哥共识第17 工作组发布的指南生成的。该专家组的成立是为了制定腹膜癌管理指南。选择该主题领域是因为它属于研究者的临床专业领域。这组论文是从在线期刊存储库访问的,包括 Cancer 和 Annals of Surgical Oncology。由北京人工智能研究院 (BAAI, https://www.baai.ac.cn/english.html) 创建的紧凑(33.4M 参数)嵌入模型 bge-small-en 用于从源文档生成嵌入。然后将生成的数据库用于增强 Llama 2 和 Open-AI 基础模型7。为方便读者,代码可通过 GitHub (https://github.com/AnaiLab/AugmentedLLM) 获得。为确保可复制性,建议使用提供的需求列表中使用的相同版本的库以及相同版本的 Python。有关以下方法中使用的工具的安装或文档的更多详细信息,请访问 Python (https://www.python.org)、git (https://git-scm.com)、Llama-Index (https://llamaindex.ai) 和 Chroma (https://trychroma.com) 提供商的官方网站。

1. 先决条件:查看代码并安装所需的库

  1. 验证是否已安装 git、python 和 pip。
    1. 在终端中,执行以下命令验证安装结果。
      git --版本
      python3 --版本
      pip3 --版本
  2. 检查代码和安装要求。
    1. 在终端中,运行以下命令:
      git clone https://github.com/AnaiLab/AugmentedLLM.git
      cd ./AugmentedLLM/
      pip3 install -r requirements.txt

2. 使用 Llama-Index 创建向量数据库

  1. 转换 RTF 文件格式(仅当文件为 RTF 格式时才需要)。
    1. 编辑标题为 config.py 的文件,通过键入以下命令,将以下代码中的文件路径替换为要转换的 RTF 文章的位置以及纯文本文件要写入的位置。保存文件。
      rtf_file_dir = './articles_rtf/'
      converted_file_dir = './articles_converted/'
    2. 在终端的同一目录中,通过运行以下命令执行代码以生成 RTF 文件的纯文本版本:
      python3 ./convert_rtf.py
  2. 创建并保存矢量数据库。
    1. 编辑 config.py 文件,将以下变量的值替换为包含要扩充 LLM 的文档的文件夹的文件路径;保存文件。
      article_dir = './articles/'
    2. 在终端的同一目录中,使用以下命令执行代码以创建并保留数据库。验证数据库现在是否保存在 vector_db 文件夹中。
      python3 ./build_index.py

3. 使用第 2 节中生成的向量数据库增强 Llama 模型

  1. 在本地实例化自定义 LLM(可选)
    注意:仅当您想使用默认 Llama-2-7B 以外的模型时,才需要执行此步骤。如果要使用默认模型,请继续执行步骤 3.2。
    1. (使用自定义 LLM)通过编辑 LLM 并在以下代码行中将 llama-index LLM 对象作为 llm 参数在构造函数中传递run_augmented_llm.py来指定要增强的 LLM。
      augmentedLLM = AugmentedLLM(vector_store, llm=无)
  2. 查询增强的 LLM
    1. 在终端中运行以下命令:
      python3 ./run_augmented_llm.py
    2. 运行用户查询以获得由手稿集中的数据增强的响应(图 3图 4)。完成后按 Ctrl + C 退出。

4. 备选 LLM 的编程比较

  1. 创建 MCQ。
    1. questions.py 编辑文件,记下示例的格式。按照类似的格式添加问题。保存文件。
  2. 通过 API 连接到 GPT-3.5、GPT-4、OpenChat 或其他比较器模型。
    1. 编辑 config.py 文件,添加 OpenAI 或 Huggingface 的 API 密钥(如果目标是与来自任一提供商的模型进行基准测试)。保存文件。
      huggingface_key = ''
      openai_key = ''
    2. 编辑 compare_llms.py 文件,并通过取消注释(在该行的请求处删除 '#' 字符)模型来选择要测试的模型集进行比较。
      注意:某些比较器需要步骤 4.2.1 中设置的 API 密钥。此外,如果需要,编辑 output_dir 参数以更改 LLM 输出的存储位置;否则,将使用默认值。
      output_dir = './llm_responses/'
    3. 在终端中,使用以下命令执行代码。执行后,查看步骤 4.2.2 中指定的文件夹中的模型响应,以进行评分或其他审阅。
      python3 ./compare_llms.py
  3. (可选)尝试对 MCQ 响应进行自动评分。示例代码使用 LMQL 库将 LLM 输出限制为预期的格式。
    1. automated_comparison.py打开文件,与步骤 4.2.2 类似,取消要包含的模型的注释,编辑 output_dir 变量,或以其他方式进行自定义。请注意,模型输出仍将以类似的方式保存。保存文件。
    2. 通过在终端中运行以下命令来运行步骤 4.3.1 中的代码:
      python3 ./automated_comparison.py

结果

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

来自芝加哥共识工作组管理指南的一组 22 篇出版物用于增强基础 Llama-7b 模型17。使用工具 Llama-Index 将文档转换为向量索引,以生成 Llama-2-7b-CCWG-Embed。流行的 OpenAI 模型,如 GPT-3.5 和 GPT-4,也以类似的方式进行了增强,以生成 GPT-XX-CCWG-Embed 模型。共开发了 20 道多项选择题 (MCQ) 来评估与各种腹膜表面恶性肿瘤管理相关的知识。MCQ 由董事会认证的外科肿瘤学家创建,以符合外科肿瘤学研究员应有的知识水平进行测试。Llama-2-7b-CCWG-Embed 的性能明显优于基本模型(见 表 1),增强的 OpenAI 模型也是如此。这被认为是这种方法的积极结果,因为与基线相比,增强提高了模型性能。

figure-results-1
图 1:从学术论文生成向量数据库的示意图。请单击此处查看此图的较大版本。

figure-results-2
图 2:增强型 LLM 的整体系统图。请单击此处查看此图的较大版本。

figure-results-3
图 3:在 Linux 终端中运行的增强 Llama-2 模型。 请单击此处查看此图的较大版本。

figure-results-4
图 4:增强的 Llama-2 模型的查询结果。请单击此处查看此图的较大版本。

法学硕士分数 (正确百分比)
骆驼-2-7b-chat-hf65%
Llama-2-7b-CCWG-嵌入75%
打开聊天-3.5-01061865%
Mistral-7B-v0.11970%
GPT-3.5 的75%
GPT-3.5-CCWG-嵌入85%
GPT-4 的85%
GPT-4-CCWG-嵌入90%

表 1:与腹膜恶性肿瘤管理相关的 20 个问题的各种 LLM 的分数(正确百分比)。

讨论

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

这里提供的方法旨在促进 LLM 的特定领域应用的研究,而无需从头开始培训或进行广泛的微调。随着 LLM 成为重要研究兴趣的领域,增强知识库和提高响应准确性的方法将变得越来越重要 18,19,20,21。如提供的结果所示,与没有增强的相同 LLM 相比,概述的协议在特定领域的问题上提供了性能改进,并接近更复杂的模型(如 OpenAI GPT 模型)的性能。由于 LLM 可能需要大量的计算资源来生成响应22,23,因此增强更简单的模型可能会为在资源受限的用例中实现提供一条途径。此外,RAG 系统在增强高复杂性模型(例如 OpenAI 提供的模型)时也产生了好处。虽然所呈现的结果是针对腹膜癌管理的,但最近对 RAG 系统的研究具有各种领域和规模的数据源,表明此类系统的广泛适用性 21,24,25,26。然而,由于响应的质量与用于增强的文本数据密切相关,因此用户仔细考虑哪些来源最适合他们的特定领域和所需应用程序是至关重要的。这种考虑在医疗保健等领域尤为重要,这一直是法学硕士相关研究的特别关注点。LLM 用于诊断27,28、临床试验匹配29,30 和许多其他应用正在探索中,并且需要经过验证、值得信赖的文本资源,而不是依赖未知的训练语料库。

绩效是通过腹膜癌专家及其临床管理专家撰写的 MCQ 的正确百分比来衡量的。人工审核将回答分类为正确或不正确;但是,为了最大限度地减少研究人员的重复性任务,我们提供了基本代码,以开始对 LLM 之间的性能进行更自动化的比较。

该协议的一个主要优点是提供的代码可以以编程方式访问各种 LLM。以前,为了评估 MCQ 的性能,没有必要技术能力的用户可能依赖于通过基于 Web 的界面进行重复的手动测试。提供的代码提供了与几种流行的 LLM 交互的基本类,以及如何执行代码的示例。提供这些工具的目标是让更多的研究人员能够朝着自动化工作流程的方向发展,以评估各种 LLM 对提示的响应,从而提高进行比较研究的能力。

此外,概述的方法旨在强调灵活性和可扩展性。虽然代码可以按原样使用,但编写代码的目的是根据需要进一步定制特定用例,例如使用不同的 LLM 和嵌入模型进行增强或比较。随着 LLM 领域的快速发展,这种可扩展性对于满足不同领域用户的不同需求将变得越来越重要。此外,Llama-Index 库提供了大量演示方法中未使用的功能,这些功能可以在创建类似系统时为用户提供更多选择。这些可以在 Llama-Index 官方文档中找到。

读者还应仔细考虑最适合其使用案例的评估方法。虽然 MCQ 由于其易于量化的性质而在 LLM 比较中广受欢迎31,32,但在将它们视为生成系统的综合性能指标时应谨慎。最近的文献实施了多种评估,包括定性方法、人工审查、斯坦福语言模型整体评估 (HELM)33 和标准自然语言处理指标,例如双语评估研究 (BLEU)、一般语言理解评估 (GLUE)、ROUGE、困惑和 F1 分数 34,35,36,37,38,39。

此处提供的这些方法存在限制。例如,虽然为几个领先的 LLM 提供商实施了接口,但考虑到该领域的快速发展性质以及用例的多样性,这种实现可能并不全面。但是,如前所述,该代码在设计时考虑到了这一点。此外,虽然提供了用于转向自动评分的基本代码,但仍有扩展空间,以使用替代工具(如 HELM 或 BLEU)对响应进行评分。此外,额外使用工具根据预定义的语法限制输出,例如语言模型查询语言 (LMQL),可用于扩展这项工作并提高比较 LLM 研究的自动化。此外,鉴于潜在的用例种类繁多,需要进一步研究 RAG 系统对一般域外性能的影响,以描述任何性能权衡。最后,必须继续研究提高 LLM 响应的可靠性和评估的其他方法。

请注意,出于技术原因,需要 python 3.10 或更高版本。Shell 提示符是为 bash、zsh 或其他类似 UNIX 的终端编写的。只需键入文本,然后按 Return 键即可执行命令(在协议中称为"运行命令")。对于协议中的每个步骤,用户可能希望检查正在执行的文件中的代码,以便更全面地了解工作流程背后的机制。

披露

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

作者没有需要声明的利益冲突。

致谢

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

这项工作得到了几个开源库的推动,最著名的是 llama-index (https://www.llamaindex.ai/)、ChromaDB (https://www.trychroma.com/) 和 LMQL (https://lmql.ai/)。

材料

本文使用的材料清单
姓名公司目录编号评论
pip3 版本 22.0.2 
Python 版本 3.10.12

参考文献

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,
  1. Large language models encode clinical knowledge. Nature. 620 (7972), 172-180 (2023).">Singhal, K., et al. Large language models encode clinical knowledge. Nature. 620 (7972), 172-180 (2023).
  2. How does ChatGPT perform on the United States medical licensing examination? The implications of large language models for medical education and knowledge assessment. JMIR Med Educ. 9 (1), e45312(2023).">Gilson, A., et al. How does ChatGPT perform on the United States medical licensing examination? The implications of large language models for medical education and knowledge assessment. JMIR Med Educ. 9 (1), e45312(2023).
  3. GPT-4 artificial intelligence model outperforms ChatGPT, medical students, and neurosurgery residents on neurosurgery written board-like questions. World Neurosurg. 179, e160-e165 (2023).">Guerra, G. A., et al. GPT-4 artificial intelligence model outperforms ChatGPT, medical students, and neurosurgery residents on neurosurgery written board-like questions. World Neurosurg. 179, e160-e165 (2023).
  4. https://mackinstitute.wharton.upenn.edu/wp-content/uploads/2023/01/Christian-Terwiesch-Chat-GTP.pdf (2023).">Terwiesch, C. Would Chat GPT3 get a Wharton MBA? A prediction based on its performance in the Operations Management course. , https://mackinstitute.wharton.upenn.edu/wp-content/uploads/2023/01/Christian-Terwiesch-Chat-GTP.pdf (2023).
  5. ELIZA-a computer program for the study of natural language communication between man and machine. Communications of the ACM. 9 (1), 36-45 (1966).">Weizenbaum, J. ELIZA-a computer program for the study of natural language communication between man and machine. Communications of the ACM. 9 (1), 36-45 (1966).
  6. A brief overview of ChatGPT: The history, status quo and potential future development. IEEE/CAA Journal of Automatica Sinica. 10 (5), 1122-1136 (2023).">Wu, T., et al. A brief overview of ChatGPT: The history, status quo and potential future development. IEEE/CAA Journal of Automatica Sinica. 10 (5), 1122-1136 (2023).
  7. http://arxiv.org/abs/2307.09288 (2023).">Touvron, H., et al. Llama 2: Open foundation and fine-tuned chat models. arXiv [cs.CL]. , http://arxiv.org/abs/2307.09288 (2023).
  8. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. arXiv [cs.CL]. , http://arxiv.org/abs/2311.05232 (2023).">Huang, L., et al. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. arXiv [cs.CL]. , http://arxiv.org/abs/2311.05232 (2023).
  9. Large language models in medicine. Nature Med. 29 (8), 1930-1940 (2023).">Thirunavukarasu, A. J., et al. Large language models in medicine. Nature Med. 29 (8), 1930-1940 (2023).
  10. http://arxiv.org/abs/2005.11401 (2020).">Lewis, P., et al. Retrieval-augmented generation for knowledge-intensive NLP tasks. arXiv [cs.CL]. , http://arxiv.org/abs/2005.11401 (2020).
  11. http://arxiv.org/abs/2403.10446 (2024).">Li, J., Yuan, Y., Zhang, Z. Enhancing LLM factual accuracy with RAG to counter hallucinations: A case study on domain-specific queries in private knowledge-bases. arXiv [cs.CL]. , http://arxiv.org/abs/2403.10446 (2024).
  12. http://arxiv.org/abs/2310.07554 (2023).">Zhang, P., Xiao, S., Liu, Z., Dou, Z., Nie, J. -Y. Retrieve anything to augment large language models. arXiv [cs.IR]. , http://arxiv.org/abs/2310.07554 (2023).
  13. http://arxiv.org/abs/2305.18703 (2023).">Ling, C., et al. Domain specialization as the key to make large language models disruptive: A comprehensive survey. arXiv [cs.CL]. , http://arxiv.org/abs/2305.18703 (2023).
  14. In-Context retrieval-augmented language models. Trans Assoc Comput Linguist. 11, 1316-1331 (2023).">Ram, O., et al. In-Context retrieval-augmented language models. Trans Assoc Comput Linguist. 11, 1316-1331 (2023).
  15. https://wrap.warwick.ac.uk/61310/7/WRAP_THESIS_Cormode_2003.pdf (2003).">Cormode, G. Sequence distance embeddings. , The University of Warwick. https://wrap.warwick.ac.uk/61310/7/WRAP_THESIS_Cormode_2003.pdf (2003).
  16. http://arxiv.org/abs/2310.19736 (2023).">Guo, Z., et al. Evaluating large language models: A comprehensive survey. arXiv [cs.CL]. , http://arxiv.org/abs/2310.19736 (2023).
  17. The Chicago Consensus Guidelines for peritoneal surface malignancies: Introduction. Cancer. 126 (11), 2510-2512 (2020).">Chicago Consensus Working Group. The Chicago Consensus Guidelines for peritoneal surface malignancies: Introduction. Cancer. 126 (11), 2510-2512 (2020).
  18. http://arxiv.org/abs/2309.11235 (2023).">Wang, G., et al. OpenChat: Advancing open-source language models with mixed-quality data. arXiv [cs.CL]. , http://arxiv.org/abs/2309.11235 (2023).
  19. http://arxiv.org/abs/2310.06825 (2023).">Jiang, A. Q., et al. Mistral 7B. arXiv [cs.CL]. , http://arxiv.org/abs/2310.06825 (2023).
  20. http://arxiv.org/abs/2308.13550 (2023).">Megahed, F. M., et al. AI and the future of work in statistical quality control: Insights from a first attempt to augmenting ChatGPT with an SQC knowledge base (ChatSQC). arXiv [cs.HC]. , http://arxiv.org/abs/2308.13550 (2023).
  21. http://arxiv.org/abs/2309.02233 (2023).">Wang, Y., Ma, X., Chen, W. Augmenting black-box LLMs with medical textbooks for clinical question answering. arXiv [cs.CL]. , http://arxiv.org/abs/2309.02233 (2023).
  22. FACCT 2022. , (2022).">Dodge, J., et al. Measuring the carbon intensity of AI in cloud instances. FACCT 2022. , (2022).
  23. http://arxiv.org/abs/2310.03003 (2023).">Samsi, S., et al. From words to watts: Benchmarking the energy costs of large language model inference. arXiv [cs.CL]. , http://arxiv.org/abs/2310.03003 (2023).
  24. Development of a personalized chat model based on the European association of urology oncology guidelines: Harnessing the power of generative artificial intelligence in clinical practice. Eur Urol Oncol. 7 (1), 160-162 (2024).">Khene, Z. -E., Bigot, P., Mathieu, R., Rouprêt, M., Bensalah, K. Development of a personalized chat model based on the European association of urology oncology guidelines: Harnessing the power of generative artificial intelligence in clinical practice. Eur Urol Oncol. 7 (1), 160-162 (2024).
  25. Optimization of hepatological clinical guidelines interpretation by large language models: a retrieval augmented generation-based framework. NPJ Digit Med. 7 (1), 102(2024).">Kresevic, S., et al. Optimization of hepatological clinical guidelines interpretation by large language models: a retrieval augmented generation-based framework. NPJ Digit Med. 7 (1), 102(2024).
  26. medRxiv. , (2023).">Ge, J., et al. Development of a liver disease-specific large language model chat interface using retrieval augmented generation. medRxiv. , (2023).
  27. Rule-augmented artificial intelligence-empowered systems for medical diagnosis using large language models. Panagoulias, D. P., et al. 2023 IEEE 35th International Conference on Tools with Artificial Intelligence (ICTAI), , 70-77 (2023).
  28. Augmenting large language models with rules for enhanced domain-specific interactions: The case of medical diagnosis. Electronics. 13 (2), 320(2024).">Panagoulias, D. P., et al. Augmenting large language models with rules for enhanced domain-specific interactions: The case of medical diagnosis. Electronics. 13 (2), 320(2024).
  29. http://arxiv.org/abs/2307.15051 (2023).">Jin, Q., et al. Matching patients to clinical trials with large language models. arXiv [cs.CL]. , http://arxiv.org/abs/2307.15051 (2023).
  30. http://arxiv.org/abs/2404.15549 (2024).">Gupta, S. K., et al. PRISM: Patient records interpretation for semantic clinical trial matching using large language models. arXiv [cs.CL]. , http://arxiv.org/abs/2404.15549 (2024).
  31. http://arxiv.org/abs/2009.03300 (2020).">Hendrycks, D., et al. Measuring massive multitask language understanding. arXiv [cs.CY]. , http://arxiv.org/abs/2009.03300 (2020).
  32. http://arxiv.org/abs/2109.07958 (2021).">Lin, S., Hilton, J., Evans, O. TruthfulQA: Measuring how models mimic human falsehoods. arXiv [cs.CL]. , http://arxiv.org/abs/2109.07958 (2021).
  33. Holistic evaluation of language models. Ann N Y Acad Sci. 1525 (1), 140-146 (2023).">Bommasani, R., Liang, P., Lee, T. Holistic evaluation of language models. Ann N Y Acad Sci. 1525 (1), 140-146 (2023).
  34. http://arxiv.org/abs/2308.04624 (2023).">Banerjee, D., Singh, P., Avadhanam, A., Srivastava, S. Benchmarking LLM powered Chatbots: Methods and Metrics. arXiv [cs.CL]. , http://arxiv.org/abs/2308.04624 (2023).
  35. Papineni, K., Roukos, S., Ward, T., Zhu, W. -J. Bleu. Proceedings of the 40th Annual Meeting on Association for Computational Linguistics - ACL '02. , (2001).
  36. http://arxiv.org/abs/1804.07461 (2019).">Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., Bowman, S. R. Glue: A multi-task benchmark and analysis platform for natural language understanding. , http://arxiv.org/abs/1804.07461 (2019).
  37. Res Sq. , (2023).">Johnson, D., et al. Assessing the accuracy and reliability of AI-generated medical responses: An evaluation of the chat-GPT model. Res Sq. , (2023).
  38. ROUGE: A package for automatic evaluation of summaries. Text Summarization Branches Out. , 74-81 (2004).">Lin, C. -Y. ROUGE: A package for automatic evaluation of summaries. Text Summarization Branches Out. , 74-81 (2004).
  39. Evaluating the ChatGPT family of models for biomedical reasoning and classification. J Am Med Inform Assoc. 31 (4), 940-948 (2024).">Chen, S., et al. Evaluating the ChatGPT family of models for biomedical reasoning and classification. J Am Med Inform Assoc. 31 (4), 940-948 (2024).

重印与许可

申请许可以重复使用本 JoVE 文章的文本或图表

申请许可

标签

Large Language ModelsVector EmbeddingsDomain Specific AugmentationLlama IndexScientific ManuscriptsModel BenchmarkingOpen Source ToolsVector DatabaseModel EvaluationFoundation Models

相关文章