SlicerChat:构建3D Slicer的本地聊天机器人
SlicerChat: Building a Local Chatbot for 3D Slicer
AI总结:
本文构建了基于Code-Llama的本地聊天机器人SlicerChat,通过微调、模型大小和文档增强优化回答3D Slicer问题,验证了本地集成AI助手的可行性。
摘要:
3D Slicer是一个用于三维数据可视化和分析的强大平台,但新用户学习曲线陡峭。生成式人工智能应用(如ChatGPT)已成为通过自然语言弥合各种文档来源之间差距的潜在方法。然而,LLM服务对3D Slicer文档的接触有限,导致ChatGPT及相关服务容易出现严重的幻觉。本项目的目标是构建一个名为SlicerChat的聊天机器人架构,该架构针对回答3D Slicer相关问题进行了优化,并能够使用开源模型在本地运行。本研究探讨的核心研究问题围绕微调、模型大小以及提示中包含的领域知识类型所导致的答案质量和速度差异。原型SlicerChat系统作为3D Slicer中的自定义扩展构建,基于Code-Llama Instruct架构。使用低秩适配对1.1B、7B和13B大小的模型进行了微调,并编译了多种3D Slicer文档来源,用于检索增强生成范式。在包含五个3D Slicer问题的基准数据集上测试微调和模型大小的组合,结果显示,与基础架构相比,微调对模型性能或速度没有影响,而较大的模型性能更好,但速度显著下降。在提示中添加3D Slicer文档的实验表明,Python示例代码和Markdown文档是最有用的信息,但添加3D Slicer场景数据和来自Discourse的问题也提高了模型性能。总之,本项目展示了将高质量本地聊天机器人直接集成到3D Slicer中的潜力,以帮助新用户和经验丰富的开发者更高效地使用该软件。
英文摘要:
3D Slicer is a powerful platform for 3D data visualization and analysis, but has a significant learning curve for new users. Generative AI applications, such as ChatGPT, have emerged as a potential method of bridging the gap between various sources of documentation using natural language. The limited exposure of LLM services to 3D Slicer documentation, however, means that ChatGPT and related services tend to suffer from significant hallucination. The objective of this project is to build a chatbot architecture, called SlicerChat, that is optimized to answer 3D Slicer related questions and able to run locally using an open-source model. The core research questions explored in this work revolve around the answer quality and speed differences due to fine-tuning, model size, and the type of domain knowledge included in the prompt. A prototype SlicerChat system was built as a custom extension in 3D Slicer based on the Code-Llama Instruct architecture. Models of size 1.1B, 7B and 13B were fine-tuned using Low rank Adaptation, and various sources of 3D Slicer documentation were compiled for use in a Retrieval Augmented Generation paradigm. Testing combinations of fine-tuning and model sizes on a benchmark dataset of five 3D Slicer questions revealed that fine-tuning had no impact on model performance or speed compared to the base architecture, and that larger models performed better with a significant speed decrease. Experiments with adding 3D Slicer documentation to the prompt showed that Python sample code and Markdown documentation were the most useful information to include, but that adding 3D Slicer scene data and questions taken from Discourse also improved model performance. In conclusion, this project shows the potential for integrating a high quality, local chatbot directly into 3D Slicer to help new users and experienced developers alike to more efficiently use the software.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。