haiku.rag/README.md
Yiorgis Gozadinos cf9ec04170
Fix docs
2025-06-26 11:46:23 +03:00

1.7 KiB

Haiku SQLite RAG

Retrieval-Augmented Generation (RAG) library on SQLite.

Features

  • Local SQLite: No external servers required
  • Multiple embedding providers: Ollama, VoyageAI, OpenAI
  • Hybrid search: Vector + full-text search with Reciprocal Rank Fusion
  • File monitoring: Auto-index files when run as server
  • 40+ file formats: PDF, DOCX, HTML, Markdown, audio, URLs
  • MCP server: Expose as tools for AI assistants
  • CLI & Python API: Use from command line or Python

Quick Start

# Install
uv pip install haiku.rag

# Add documents
haiku-rag add "Your content here"
haiku-rag add-src document.pdf

# Search
haiku-rag search "query"

# Start server with file monitoring
export MONITOR_DIRECTORIES="/path/to/docs"
haiku-rag serve

Python Usage

from haiku.rag.client import HaikuRAG

async with HaikuRAG("database.db") as client:
    # Add document
    doc = await client.create_document("Your content")

    # Search
    results = await client.search("query")
    for chunk, score in results:
        print(f"{score:.3f}: {chunk.content}")

MCP Server

Use with AI assistants like Claude Desktop:

haiku-rag serve --stdio

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

Documentation

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