
haiku.rag
io.github.ggozad由 GitHub 帳號 ggozad 發布v0.109.0更新於 Nov 7, 2026
Local-first agentic RAG with citations - hybrid search, reranking, multimodal document retrieval
概覽
本地優先的 RAG 伺服器,讓助理檢索、閱讀並依據你自己的文件回答問題,並附上頁碼與標題層級的引用。
- 可以做什麼
- 以向量與全文混合檢索搜尋已索引文件,可選用重排序與依章節擴充上下文,並能同時查詢多個具名資料庫。
- 閱讀並回答已入库文件的问题,答案附上頁碼與標題引用。
- 在文件上執行沙箱 Python 進行計數與彙總,並把圖表交給視覺模型。
- 匯入 PDF、辦公室文件、HTML、Markdown 與圖片,保留標題、表格、圖片與頁碼來源。
- 適用情境
- 當你希望助理依據私有文件集(例如論文、報告或手冊)作答,並能指出每個答案的出處時使用。也適合文件需留在本機、偏好本地離線運作的場景。
- 執行需求
- 以 stdio 本地程序執行,透過 uvx 或 pip 從 PyPI 安裝,需要 Python 3.12 或更新版本。預設使用 Ollama 提供嵌入與回答,需先在本機拉取模型;其他模型供應商以及 S3、GCS、Azure 或 LanceDB Cloud 儲存為選用擴充。需先初始化資料庫並索引文件。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 haiku.rag,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
haiku.rag
[PyPI] [Python] [Downloads] [Docs] [Tests] [codecov]
Agentic RAG that answers questions about your own documents with citations to page numbers and section headings. It runs on an embedded LanceDB database with open models through Ollama by default, so no server or API key is needed. Any provider Pydantic AI supports works in their place, and the same database can live on S3, GCS, Azure or LanceDB Cloud.
Built on LanceDB, Pydantic AI and Docling. Documentation: ggozad.github.io/haiku.rag.
Features
- Ingest PDFs, office documents, HTML, Markdown and images with Docling, in-process or on docling-serve. The stored DoclingDocument keeps headings, tables, pictures and page provenance.
- Search with hybrid vector and full-text retrieval, optional reranking (cross-encoders, Jina, Cohere, Zero Entropy, vLLM, OpenRouter), section-aware context expansion, and image search with a multimodal embedder (vLLM, OpenRouter, VoyageAI, Cohere). Across several named databases at once.
- Answer with the RAG capability: it searches, runs sandboxed Python over the documents for counting and aggregation, and cites page numbers and headings. Vision models receive the figures. Optional capabilities compact earlier evidence in long conversations and require every answer to declare its grounding.
- Check a citation by drawing its chunk on the page image, from the CLI, the chat TUI or Python.
- Integrate through the Python API, native Pydantic AI capabilities, plugin hooks that observe document writes and transform searches, an MCP server for Claude Code, Codex and Claude Desktop, and a reference web app.
- Operate with the
haiku-ingesterservice (filesystem, HTTP, S3 and WebDAV sources, a SQLite or Postgres job queue with retries, a control plane and dashboard), tags and rollback, vacuum, andhaiku-rag doctorhealth checks.
Installation
Python 3.12 or newer.
The ingester, S3 access and model providers other than Ollama and OpenAI-compatible endpoints are extras. See Installation.
Quick start
The default configuration uses Ollama for embeddings and answers. The quickstart covers the models to pull and using OpenAI instead.
Continuous ingestion from configured sources runs as a separate service, with the ingester extra (pip install 'haiku.rag[ingester]'):
Python API
To compose your own agent, see Capabilities.
MCP server
The server gives an assistant search, document reading and a Python sandbox over the documents. In Claude Code, the plugin registers it with a skill:
Codex and Claude Desktop setup is in the MCP docs.
Examples
- Docker setup: docling-serve, the ingester and the MCP server
- Web application: chat, ingestion, inspector and doctor in the browser
Documentation
- Quickstart: install, index, chat
- Installation: packages and extras
- Architecture: how a document becomes a cited answer
- CLI and Chat and inspector
- Capabilities: native Pydantic AI capabilities
- Configuration: every setting, and tuning
- Ingester, MCP and remote processing
- Python API and custom pipelines
- Benchmarks and the changelog
License
MIT.
mcp-name: io.github.ggozad/haiku-rag
來源:README.md,提交 ee0c087
工具
0版本歷史
27- v0.109.0最新Nov 7, 2026
- v0.108.0Nov 5, 2026
- v0.107.0Nov 4, 2026
- v0.106.0Nov 3, 2026
- v0.105.0Nov 3, 2026
- v0.104.0Oct 30, 2026
- v0.103.0Oct 29, 2026
- v0.101.1Oct 26, 2026
- v0.101.0Oct 23, 2026
- v0.100.0Oct 22, 2026
- v0.99.0Oct 21, 2026
- v0.98.0Oct 16, 2026
- v0.97.0Oct 12, 2026
- v0.96.1Oct 9, 2026
- v0.96.0Oct 9, 2026
- v0.95.0Oct 8, 2026
- v0.94.0Oct 7, 2026
- v0.93.0Oct 6, 2026
- v0.92.0Oct 2, 2026
- v0.91.0Sep 30, 2026
- v0.90.0Sep 28, 2026
- v0.89.0Sep 25, 2026
- v0.88.2Sep 24, 2026
- v0.88.1Sep 23, 2026
- v0.88.0Sep 21, 2026
- v0.87.0Sep 17, 2026
- v0.86.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
