RAGViz:诊断与可视化检索增强生成
RAGViz: Diagnose and Visualize Retrieval-Augmented Generation
AI总结:
提出RAGViz工具,可视化RAG中令牌对检索文档的关注度,支持文档增删对比,高效运行,开源可用。
摘要:
检索增强生成(RAG)将领域特定来源的知识整合到大型语言模型中,以锚定答案生成。当前的RAG系统缺乏对上下文文档及模型对这些文档关注度的可定制可视化。我们提出RAGViz,一种RAG诊断工具,可视化生成令牌在检索文档中的关注度。凭借内置用户界面、检索索引和大型语言模型(LLM)骨干,RAGViz提供两大主要功能:(1)令牌和文档级注意力可视化,及(2)上下文文档添加和移除时的生成对比。作为开源工具包,RAGViz可轻松托管自定义嵌入模型和HuggingFace支持的LLM骨干。利用混合ANN(近似最近邻)索引、内存高效的LLM推理工具和自定义上下文片段方法,RAGViz在中等GPU节点上以约5秒的中位查询时间高效运行。我们的代码可在https://github.com/cxcscmu/RAGViz获取。RAGViz的演示视频可在https://youtu.be/cTAbuTu6ur4观看。
英文摘要:
Retrieval-augmented generation (RAG) combines knowledge from domain-specific sources into large language models to ground answer generation. Current RAG systems lack customizable visibility on the context documents and the model's attentiveness towards such documents. We propose RAGViz, a RAG diagnosis tool that visualizes the attentiveness of the generated tokens in retrieved documents. With a built-in user interface, retrieval index, and Large Language Model (LLM) backbone, RAGViz provides two main functionalities: (1) token and document-level attention visualization, and (2) generation comparison upon context document addition and removal. As an open-source toolkit, RAGViz can be easily hosted with a custom embedding model and HuggingFace-supported LLM backbone. Using a hybrid ANN (Approximate Nearest Neighbor) index, memory-efficient LLM inference tool, and custom context snippet method, RAGViz operates efficiently with a median query time of about 5 seconds on a moderate GPU node. Our code is available at https://github.com/cxcscmu/RAGViz. A demo video of RAGViz can be found at https://youtu.be/cTAbuTu6ur4.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。