3 KiB
3 KiB
haiku.rag
Agentic RAG built on LanceDB, Pydantic AI, and Docling.
Features
- Hybrid search — Vector + full-text with Reciprocal Rank Fusion
- Reranking — MxBAI, Cohere, Zero Entropy, or vLLM
- Question answering — QA agents with citations (page numbers, section headings)
- Research agents — Multi-agent workflows via pydantic-graph: plan, search, evaluate, synthesize
- Conversational RAG — Chat TUI and web application for multi-turn conversations with session memory
- Document structure — Stores full DoclingDocument, enabling structure-aware context expansion and visual grounding
- Multiple providers — Embeddings: Ollama, OpenAI, VoyageAI, LM Studio, vLLM. QA/Research: any model supported by Pydantic AI
- Local-first — Embedded LanceDB, no servers required. Also supports S3, GCS, Azure, and LanceDB Cloud
- MCP server — Expose as tools for AI assistants (Claude Desktop, etc.)
- File monitoring — Watch directories and auto-index on changes
- Inspector — TUI for browsing documents, chunks, and search results
- CLI & Python API — Full functionality from command line or code
Quick Start
Install haiku.rag:
uv pip install haiku.rag
Use from Python:
from haiku.rag.client import HaikuRAG
async with HaikuRAG("database.lancedb", create=True) as client:
# Add a document
doc = await client.create_document("Your content here")
# Search documents
results = await client.search("query")
# Ask questions (returns answer and citations)
answer, citations = await client.ask("Who is the author of haiku.rag?")
Or use the CLI:
haiku-rag add "Your document content"
haiku-rag add "Your document content" --meta author=alice
haiku-rag add-src /path/to/document.pdf --title "Q3 Financial Report" --meta source=manual
haiku-rag search "query"
haiku-rag ask "Who is the author of haiku.rag?"
haiku-rag chat # Interactive conversation mode
Documentation
- Getting started - Tutorial
- Installation - Install haiku.rag with different providers
- Architecture - System overview and data flow
- Configuration - Environment variables and settings
- CLI - Command line interface usage
- Python - Python API reference
- Custom Pipelines - Build custom processing workflows
- Agents - QA, chat, and research agents
- Applications - Chat TUI, web app, and inspector
- Server - File monitoring and server mode
- MCP - Model Context Protocol integration
- Remote processing - Remote document processing with docling-serve
License
This project is licensed under the MIT License.