项目预览
项目数据
项目介绍
Star 增长趋势
本站每日记录该项目 GitHub 星标变化,观测越久曲线越完整
数据来源:GitHub API 逐日快照 · 收录于 2026-08-09 · 当前星标 ★ 39638
使用教程
环境要求
- Python 3.10 或更高版本
- 已安装 pip 包管理工具
- 准备一个可用的大模型服务(README 提到 OpenAI、Anthropic、Mistral、Gemma 等均可)
- 需要读取的本地文件(PDF、TXT、Markdown 等)
安装与启动步骤
-
1安装 quivr-core
用 pip 安装核心包,README 提示安装完成后注意检查是否成功。
pip install quivr-core -
2用 5 行代码跑通 RAG
写入临时文件并创建 Brain,再提问验证链路是否打通;需自行配置所选的 LLM 服务。
import tempfile from quivr_core import Brain if __name__ == "__main__": with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file: temp_file.write("Gold is a liquid of blue-like colour.") temp_file.flush() brain = Brain.from_files( name="test_brain", file_paths=[temp_file.name], ) answer = brain.ask( "what is gold? asnwer in french" ) print("answer:", answer) -
3创建 RAG 配置文件
新建 basic_rag_workflow.yaml,写入重排器与 LLM 参数,后续可只改此文件切换策略。
reranker_config: supplier: "cohere" model: "rerank-multilingual-v3.0" top_n: 5 llm_config: max_input_tokens: 4000 temperature: 0.7 -
4用本地文档建 Brain
把 file_paths 换成你自己的 PDF、TXT 路径,使用默认配置创建 Brain。
from quivr_core import Brain brain = Brain.from_files(name = "my smart brain", file_paths = ["./my_first_doc.pdf", "./my_second_doc.txt"], ) -
5启动命令行对话
加载 yaml 配置后进入循环问答,输入 exit 退出;可继续复用前面创建的 brain 对象。
brain.print_info() from rich.console import Console from rich.panel import Panel from rich.prompt import Prompt from quivr_core.config import RetrievalConfig config_file_name = "./basic_rag_workflow.yaml" retrieval_config = RetrievalConfig.from_yaml(config_file_name) console = Console() console.print(Panel.fit("Ask your brain !", style="bold magenta")) while True: question = Prompt.ask("[bold cyan]Question[/bold cyan]") if question.lower() == "exit": console.print(Panel("Goodbye!", style="bold yellow")) break answer = brain.ask(question, retrieval_config=retrieval_config) console.print(f"[bold green]Quivr Assistant[/bold green]: {answer.answer}") console.print("-" * console.width) brain.print_info() -
6查阅官方文档
README 指明完整文档、更多用法与配置都在官网文档站,遇到问题优先查这里。
关键配置
| 配置项 | 必填 | 说明 | 示例 |
|---|---|---|---|
reranker_config.supplier | 是 | 指定重排器供应商,README 示例为 cohere | cohere |
reranker_config.model | 是 | 重排器使用的模型名称 | rerank-multilingual-v3.0 |
reranker_config.top_n | 否 | 重排后返回给 LLM 的文本块数量 | 5 |
llm_config.max_input_tokens | 否 | 传给 LLM 生成答案的最大 token 数 | 4000 |
llm_config.temperature | 否 | LLM 采样温度,值越高回答越发散 | 0.7 |
如何确认成功
运行脚本后终端打印出 answer: ... 内容,说明 Brain 创建与提问链路已通;对话模式下输入问题能返回 Quivr Assistant 的回答。
常见问题
Q:支持哪些大模型?
A:README 说明可与任意 LLM 配合,例举了 OpenAI、Anthropic、Mistral、Gemma 等,按所选服务自行准备凭证。
Q:支持哪些文件格式?
A:README 说明支持任意文件,如 PDF、TXT、Markdown 等,也允许接入自己编写的解析器。
Q:如何调整检索效果?
A:修改 basic_rag_workflow.yaml 中的 reranker_config 与 llm_config 参数,重新加载 RetrievalConfig 即可切换策略。
Q:想用 Megaparse 处理文件可以吗?
A:可以。README 提到 Quivr 可与 Megaparse 集成,先用 Megaparse 完成文件摄入,再交给 Quivr 做 RAG。
Q:完整安装与更多配置在哪里看?
A:README 指向官方文档 https://core.quivr.com/ ,所有细节以该文档为准。
注意事项
- README 仅给出库的安装方式(pip install quivr-core),未提供 Docker 或前端部署命令,请勿套用其他项目流程。
- Python 版本必须为 3.10 或更高,低版本可能安装或运行失败。
- 调用 LLM 需要相应服务的凭证,README 节选中未列出具体环境变量名,请以官方文档为准。
- 示例中的 ./my_first_doc.pdf、./basic_rag_workflow.yaml 等均为占位路径,需替换为你机器上的真实路径。
核心亮点
- 提供高度可定制的RAG框架,支持多种LLM(GPT4、Groq、Llama)和向量库(PGVector、Faiss),灵活适配不同场景
- 强调易集成性,提供API和前端组件,开发者可快速将GenAI能力嵌入现有产品,专注业务逻辑
- 基于Python和React,技术栈现代,且支持Docker部署,降低环境配置成本
不足之处
- 文档/社区待观察
适用场景
- 企业内部知识库问答系统,利用RAG快速检索内部文档
- SaaS产品中嵌入AI助手,提供个性化对话功能
- 研究或原型开发,快速验证LLM应用集成方案
替代项目
LangChain、LlamaIndex、Haystack
上一篇:llm-app
同类项目推荐
SuperKnowa
开源
像拼乐高一样搭建企业级 RAG 管道,快速落地生成式 AI 应用
Build Enterprise RAG (Retriver Augmented Generation) Pipelines to tackle various Gen···
awesome-artificial-intelligence-···
开源
按主题速查 AI 各方向前沿论文与资源
A curated list of Artificial Intelligence (AI) Research, tracks the cutting edge tre···
HilbertRaum
开源
断网也能问 AI,本地维基百科直接答
AI, fully local on your computer.
colette
开源
本地多模态 RAG,让技术文档里的图和表也能被搜到、问到
Multimodal RAG to search and interact locally with technical documents of any kind
coco-server
开源
一个服务搞定企业所有文件搜索,AI 直接给你答案
Coco AI Server - Search, Connect, Collaborate, AI-powered Enterprise Search, all in ···
documentation-helper
开源
用 RAG 快速搭建文档问答助手,让文档秒变智能客服
Reference implementation of a RAG-based documentation helper using LangChain, Pineco···
awesome-rag
开源
一站式速览RAG论文与系统,快速入门与选型
Awesome-RAG: Collect typical RAG papers and systems.
RivalSearchMCP
开源
免密钥多源搜索,让智能体拿到确定性结构化情报。
Deterministic research MCP server on FastMCP 3 — 5-engine web search, 9-platform so···
deep-searcher
开源
在私有数据上,像专业研究员一样深度搜索并生成报告
Open Source Deep Research Alternative to Reason and Search on Private Data. Written ···
