haiku.rag/docs/index.md
Yiorgis Gozadinos 5fc4ddff69
Docs
2026-02-11 12:55:09 +02:00

3.3 KiB

haiku.rag

Agentic RAG built on LanceDB, Pydantic AI, and Docling.

Features

  • Hybrid search — Vector + full-text with Reciprocal Rank Fusion
  • Question answering — QA agents with citations (page numbers, section headings)
  • Reranking — MxBAI, Cohere, Zero Entropy, or vLLM
  • Research agents — Multi-agent workflows via pydantic-graph: plan, search, evaluate, synthesize
  • RLM agent — Complex analytical tasks via sandboxed Python code execution (aggregation, computation, multi-document analysis)
  • 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, 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
  • 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
  • File monitoring — Watch directories and auto-index on changes
  • Time travel — Query the database at any historical point with --before
  • Inspector — TUI for browsing documents, chunks, and search results

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

License

This project is licensed under the MIT License.