
ggozad/haiku.rag
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
ローカルおよびセルフホスト文書検索のためのエージェントRAG:組み込みLanceDB上でハイブリッド取得、再ランク付け、マルチモーダルRAG、Docling解析とMCPサーバーを組み合わせた
概要
自分の文書に関する質問にページ番号やセクション見出しの引用で答えるエージェント型RAG。組み込みデータベース上でローカルで動作し、サーバーは不要です。 LanceDB、Pydantic AI、Doclingを基に構築されています。完全なドキュメントは ggozad.github.io/haiku.rag にあります。 - — ベクトル+全文、逆順位融合付き - — マルチモーダル埋め込み(vLLM、VoyageAI、Cohere)は画像ベクターをテキストと同じ空間に配置します;テキストアズクエリ→図ヒットおよび画像アズクエリをサポートしています。— 引用(ページ番号、セクション見出し)を含むRAG機能支援。— ビジョン対応モデルはチャンクテキストの横に図バイトを表示します。Ask、analyze、MCP、チャットTUIで自分の画像を質問に添付できます。— ローカルクロスエンコーダー、Cohere、Zero Entropy、vLLM。— サンドボックス化されたPythonコード実行による複雑な分析タスク(集計、計算、多文書分析)— — リクエストの検索結果を引用した証拠に置き換え、長い会話を止めるオプション機能...
概要(AI 翻訳)
ページ番号やセクション見出しの引用で自分の文書に関する質問に答えるエージェント型RAG。デフォルトでOllamaを通じてオープンモデルを持つ組み込みのLanceDBデータベース上で動作するため、サーバーやAPIキーは不要です。Pydantic AIがサポートするどのプロバイダーもその代わりに動作し、同じデータベースはS3、GCS、Azure、またはLanceDB Cloud上で存在可能です。
LanceDB、Pydantic AI、Doclingを基に構築されています。ドキュメント:ggozad.github.io/haiku.rag。
特徴
- Ingest PDF、オフィス文書、HTML、Markdown、画像をDoclingで、進行中またはdocling-serve上で管理してください。保存されたDoclingDocumentは見出し、表、画像、ページの出所を保持します。
- **ハイブリッドベクターと全文検索、オプションの再ランキング(クロスエンコーダー、Jina、Cohere、Zero Entropy、vLLM、OpenRouter)、セクション認識コンテキスト拡張、マルチモーダル埋め込みによる画像検索(vLLM、OpenRouter、VoyageAI、Cohere)による検索。複数の名前付きデータベースを同時に。
- RAG機能による回答:検索、サンドボックス化されたPythonで文書のカウントや集計を行い、ページ番号や見出しを引用します。ビジョンモデルは図を受け取ります。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
haiku.rag
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.
pip install haiku.rag # Docling, the VoyageAI and Cohere embedders, every reranker, the TUI
pip install haiku.rag-slim # the core, with extras chosen by you
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →