HybridRAG: 一种基于预生成问答的LLM聊天机器人框架
HybridRAG: A Practical LLM-based ChatBot Framework based on Pre-Generated Q&A over Raw Unstructured Documents
AI总结:
HybridRAG通过预生成问答库和实时生成相结合,提升聊天机器人在处理无结构文档时的准确性和效率。
摘要:
检索增强生成(RAG)已成为一种强大的方法,用于将大型语言模型(LLM)基于聊天机器人响应与外部知识相结合。然而,现有的RAG研究通常假设结构良好的文本来源(例如维基百科或精选数据集),并在查询时执行检索和生成,这限制了它们在现实世界聊天机器人场景中的适用性。在本文中,我们提出了HybridRAG,一种新的且实用的RAG框架,以实现更准确和更快的聊天机器人响应。首先,HybridRAG通过光学字符识别(OCR)和布局分析,将包含复杂布局(文本、表格、图表)的原始无结构PDF文档转换为分层文本块。然后,它使用LLM从整理后的块中预生成一个合理的问答(QA)知识库。在查询时,用户的问题会与这个QA库匹配,以检索可能的即时答案,如果找不到合适的QA匹配,我们的框架将回退到实时响应生成。在OHRBench上的实验表明,我们的HybridRAG在答案质量和延迟方面优于标准RAG基线。我们相信HybridRAG可以成为一种实用的解决方案,用于必须处理大量无结构文档和大量用户,但计算资源有限的现实世界聊天机器人应用。
英文摘要:
Retrieval-Augmented Generation (RAG) has emerged as a powerful approach for grounding Large Language Model (LLM)-based chatbot responses on external knowledge. However, existing RAG studies typically assume well-structured textual sources (e.g. Wikipedia or curated datasets) and perform retrieval and generation at query time, which can limit their applicability in real-world chatbot scenarios. In this paper, we present HybridRAG, a novel and practical RAG framework towards more accurate and faster chatbot responses. First, HybridRAG ingests raw, unstructured PDF documents containing complex layouts (text, tables, figures) via Optical Character Recognition (OCR) and layout analysis, and convert them into hierarchical text chunks. Then, it pre-generates a plausible question-answer (QA) knowledge base from the organized chunks using an LLM. At query time, user questions are matched against this QA bank to retrieve immediate answers when possible, and only if no suitable QA match is found does our framework fall back to an on-the-fly response generation. Experiments on OHRBench demonstrate that our HybridRAG provides higher answer quality and lower latency compared to a standard RAG baseline. We believe that HybridRAG could be a practical solution for real-world chatbot applications that must handle large volumes of unstructured documents and lots of users under limited computational resources.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。