Vectorless:无RAG的开源PDF聊天机器人

2作者: richardmeng大约 1 个月前原帖
开源“Vectorless”,一款不使用嵌入向量的新型PDF聊天机器人。 <p>Github 仓库: https://github.com/roe-ai/vectorless-chatbot 演示应用: https://vectorless-chatbot.vercel.app/ <p>工作原理: 1. 选择最佳文档 – 向大型语言模型(LLM)提供高层次描述和文档名称。它会选择使用哪些文档。 2. 选择最佳页面 – 代理会浏览文档页面,并提取出与您的问题最相关的页面。 3. 收集并回答 – 代理从第二步中获取所有相关页面,并给出最终答案。 <p>优势: 1. 比向量更具可预测性。您可以准确告诉代理您希望如何分析文件。 2. 您可以提出抽象问题,例如:“在风险方面,NVIDIA与AMD相比如何?” 3. 您可以提出汇总问题,例如:“这份SOC 2报告中有多少个问题被标记为负面?” 4. 本质上支持多模态问题和文档。 <p>劣势: 1. 为了在可扩展的设置中工作,第一步依赖于文档的高质量元数据。 2. 如果用户提出简单的后续问题,第二步可能会浪费资源,因为上下文可以被重用。 3. 比向量搜索聊天速度慢。 <p>如何扩展: 1. 我们设想通过文本转SQL的结构化元数据检索,根据用户在第一步中的问题定位文档路径。 2. 第二步可以通过缓存来改进。我们设想在文档被查询一次后,可以存储、演变并利用内容目录,以应对未来的问题。
查看原文
Open-sourcing &quot;Vectorless&quot;, a new PDF chatbot without embedding vectors.<p>Github Repo: https:&#x2F;&#x2F;github.com&#x2F;roe-ai&#x2F;vectorless-chatbot Demo app: https:&#x2F;&#x2F;vectorless-chatbot.vercel.app&#x2F;<p>How it works: 1. Select best docs – Feed the LLM high-level descriptions + doc names. It picks which docs to use. 2. Select best pages – The Agent goes through the doc pages and pulls out the most relevant pages for your question. 3. Gather and answer – Agent takes all the relevant pages from step 2 and gives you the final answer.<p>Advantages 1. It&#x27;s more predictable than vectors. You can tell the Agent exactly how you want to analyze your files. 2. You can ask abstract questions like: “How does NVIDIA compare to AMD in terms of risk?” 3. You can ask aggregate questions like: “How many questions in this SOC 2 report are marked negative?” 4. It supports multimodal questions and documents by nature.<p>Disadvantages 1. To work in a scalable setup, step 1 relies on high quality metadata over the documents. 2. Step 2 can be wasteful if the user asks a simple follow-up question, the context can be reused. 3. Slower than vector search chat.<p>How it will scale: 1. We envision a structured metadata retrieval via text to SQL to locate the paths of documents based on the user&#x27;s questions at step 1. 3. Step 2 can be improved by caching. We envision when a document is queried once, a table of content can be stored, evolved, and leveraged as future questions come in.