MeMemo:面向私密与个性化文本生成的设备端检索增强
MeMemo: On-device Retrieval Augmentation for Private and Personalized Text Generation
AI总结:
本文提出开源 JavaScript 工具包 MeMemo,利用 IndexedDB、Web Workers 与 HNSW 在浏览器中实现大规模设备端稠密检索,从而支持隐私保护和个性化的 RAG 文本生成。
摘要:
检索增强文本生成(RAG)通过从可更新的外部知识库中检索信息,解决大型语言模型(LLM)的常见局限,例如幻觉。然而,现有方法通常需要专用后端服务器进行数据存储和检索,因此限制了其在个人金融、教育和医疗等要求严格数据隐私的用例中的适用性。为满足对客户端稠密检索的迫切需求,我们推出 MeMemo,这是首个将最先进的近似最近邻搜索技术 HNSW 适配到浏览器环境的开源 JavaScript 工具包。该工具包使用 IndexedDB 和 Web Workers 等现代原生 Web 技术开发,利用客户端硬件能力,使研究人员和开发者能够在浏览器中高效搜索数百万个高维向量。正如示例应用 RAG Playground 所展示的,MeMemo 带来了令人期待的全新设计与研究机会,例如私密且个性化的内容创作和交互式原型设计。结合本工作,我们讨论了设备端稠密检索的机遇与挑战。MeMemo 可在 https://github.com/poloclub/mememo 获取。
英文摘要:
Retrieval-augmented text generation (RAG) addresses the common limitations of large language models (LLMs), such as hallucination, by retrieving information from an updatable external knowledge base. However, existing approaches often require dedicated backend servers for data storage and retrieval, thereby limiting their applicability in use cases that require strict data privacy, such as personal finance, education, and medicine. To address the pressing need for client-side dense retrieval, we introduce MeMemo, the first open-source JavaScript toolkit that adapts the state-of-the-art approximate nearest neighbor search technique HNSW to browser environments. Developed with modern and native Web technologies, such as IndexedDB and Web Workers, our toolkit leverages client-side hardware capabilities to enable researchers and developers to efficiently search through millions of high-dimensional vectors in the browser. MeMemo enables exciting new design and research opportunities, such as private and personalized content creation and interactive prototyping, as demonstrated in our example application RAG Playground. Reflecting on our work, we discuss the opportunities and challenges for on-device dense retrieval. MeMemo is available at https://github.com/poloclub/mememo.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。