haiku.rag

by ggozad

Not rated
GitHub

About

Agentic RAG over your own documents on an embedded LanceDB, no database server to run. Hybrid search with reranking, Docling parsing for PDFs and 40+ formats, multimodal retrieval, and answers cited to page numbers and section headings.

Details

Author
ggozad
Categories
Search, Knowledge Base, Other

Setup

Install haiku.rag in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/ggozad/haiku.rag

Follow the installation instructions in the repository README, then restart your MCP client.

Agentic RAG that answers questions about your own documents with citations to page numbers and section headings. Runs locally on an embedded database, no server required.

Built onLanceDB,Pydantic AI, andDocling. Full documentation atggozad.github.io/haiku.rag.

New: vision and multimodal search.Picture-aware ingestion captures embedded figure bytes; vision-capable QA models receive them alongside text. Multimodal embedders put picture vectors in the same space as text, enabling text-as-query → figure hits and image-as-query retrieval.

- Hybrid search— Vector + full-text with Reciprocal Rank Fusion
- Multimodal & cross-modal search— Multimodal embedders (vLLM, VoyageAI, Cohere) put picture vectors in the same space as text; supports text-as-query → figure hits and image-as-query
- Question answering— RAG capability with citations (page numbers, section headings)
- Vision QA— Vision-capable models receive figure bytes alongside chunk text; attach your own images to questions inask,analyze, MCP, and the chat TUI
- Reranking— local cross-encoders, Cohere, Zero Entropy, or vLLM
- Analysis capability— Complex analytical tasks via sandboxed Python code execution (aggregation, computation, multi-document analysis)
- Evidence compaction— Optional capability that replaces earlier questions' search results on the request with the evidence they cited, so long conversations stop resending everything they retrieved
- Citation policy— Optional capability that requires every answer to declare what grounds it, including declaring that nothing does
- Conversational RAG— Chat TUI and web application for multi-turn conversations with session memory
- Document structure— Stores full
DoclingDocument, enabling structure-aware context expansion
- Multiple providers— Embeddings: Ollama, OpenAI, VoyageAI, Cohere, LM Studio, vLLM (multimodal viamultimodal: trueon vLLM/VoyageAI/Cohere). QA: any model supported by Pydantic AI
- Local-first— Embedded LanceDB, no servers required. Also supports S3, GCS, Azure, and LanceDB Cloud
- CLI & Python API— Full functionality from command line or code
- MCP server— Expose as tools for AI assistants (Claude Desktop, etc.)
- Visual grounding— View chunks highlighted on original page images
- Production ingester— Long-livedhaiku-ingesterservice with persistent SQLite queue, async worker pool with retries and a dead-letter queue, FS / HTTP / S3 / WebDAV source adapters, FastAPI control plane, and a browser dashboard for operators. See
docs/ingester.md.
- Tags— Name database states withhaiku-rag tagand roll back to them
- Inspector— TUI for browsing documents, chunks, and search results

Includes all features: document processing, all embedding providers, and rerankers.

Install only the extras you need. See theInstallationdocumentation for available options.

Note: Requires an embedding provider (Ollama, OpenAI, etc.). See theTutorialfor setup instructions.

# Index a PDF haiku-rag add-src paper.pdf # Search haiku-rag search "attention mechanism" # Ask questions with citations haiku-rag ask "What datasets were used for evaluation?" # Ask about an image (vision-capable model) haiku-rag ask "Does this figure match the spec in the design doc?" --image figure.png # Analyze — complex analytical tasks via code execution haiku-rag analyze "How many documents mention transformers?" # Interactive chat — multi-turn conversations with memory haiku-rag chat # Continuously ingest from configured sources (FS, HTTP, S3, WebDAV) haiku-ingester serve

SeeConfigurationfor customization options.

from haiku.rag.client import HaikuRAG async with HaikuRAG("knowledge.lancedb", create=True) as rag: # Index documents await rag.create_document_from_source("paper.pdf") await rag.create_document_from_source("https://arxiv.org/pdf/1706.03762") # Search — returns chunks with provenance results = await rag.search("self-attention") for result in results: print(f"{result.score:.2f} | p.{result.page_numbers} | {result.content[:100]}") # QA with citations answer, citations = await rag.ask("What is the complexity of self-attention?") print(answer) for cite in citations: print(f" [{cite.chunk_id}] p.{cite.page_numbers}: {cite.content[:80]}")

For direct agent composition, see thecapabilities documentation.

Use with AI assistants like Claude Desktop:

Add to your Claude Desktop configuration:

{ "mcpServers": { "haiku-rag": { "command": "haiku-rag", "args": ["mcp", "--stdio"] } } }

Provides tools for document management, search, QA, and analysis directly in your AI assistant.

See theexamples directoryfor working examples:

- Docker Setup- Complete Docker deployment with continuous ingestion (haiku-ingester) and MCP server
-
Web Application- Full-stack conversational RAG with CopilotKit frontend

Full documentation at:https://ggozad.github.io/haiku.rag/

- Quickstart- Provider setup and first ingestion
-
Installation- Packages and extras
-
Configuration- YAML reference
-
CLI- Command reference
-
Python API- Complete API docs
-
Capabilities- Native Pydantic AI RAG and analysis capabilities
-
Tuning- Retrieval and answer-quality tuning
-
Ingester- Production ingester for continuous indexing from FS, HTTP, S3, and WebDAV
-
MCP- Model Context Protocol integration
-
Remote processing- Offload conversion to docling-serve
-
Applications- Chat TUI, web app, and inspector
-
Benchmarks- Performance benchmarks
-
Changelog- Version history

This project is licensed under theMIT License.

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Local RAG system for Claude Code with hybrid search (semantic + BM25), cross-encoder reranking, markdown-aware chunking, 9 file formats, file watcher, and 12 MCP tools. Zero external servers. pip install knowledge-rag

A server for RAG-based document search and management using Qdrant vector database with Ollama or OpenAI embeddings.

A local MCP server implementing Retrieval-Augmented Generation (RAG) with sentence window retrieval and support for multiple file types.

A Python server providing Retrieval-Augmented Generation (RAG) functionality. It indexes various document formats and requires a PostgreSQL database with pgvector.

Production-ready RAG out of the box to search and retrieve data from your own documents.

Search scientific papers with structured experimental data extracted from full-text studies. Returns 25+ fields per paper including methods, results, sample sizes, limitations, and quality scores.

Codicil indexes a repo's Markdown/YAML/TOML docs into a local Chroma store and exposes query_docs/reindex_docs over MCP. Uses Ollama embeddings when available; with zero infra beyond that, it degrades to live keyword search off disk instead of failing.

A server for Retrieval-Augmented Generation (RAG) using the Contextual AI platform.

Creates a personal, always-current knowledge base for AI by indexing documentation from websites, GitHub, npm, PyPI, and local files.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.