haiku.rag


Namehaiku.rag JSON
Version 0.3.3 PyPI version JSON
download
home_pageNone
SummaryRetrieval Augmented Generation (RAG) with SQLite
upload_time2025-07-09 07:50:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords rag mcp ml sqlite sqlite-vec
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Haiku SQLite RAG

Retrieval-Augmented Generation (RAG) library on SQLite.

`haiku.rag` is a Retrieval-Augmented Generation (RAG) library built to work on SQLite alone without the need for external vector databases. It uses [sqlite-vec](https://github.com/asg017/sqlite-vec) for storing the embeddings and performs semantic (vector) search as well as full-text search combined through Reciprocal Rank Fusion. Both open-source (Ollama) as well as commercial (OpenAI, VoyageAI) embedding providers are supported.

## Features

- **Local SQLite**: No external servers required
- **Multiple embedding providers**: Ollama, VoyageAI, OpenAI
- **Multiple QA providers**: Ollama, OpenAI, Anthropic
- **Hybrid search**: Vector + full-text search with Reciprocal Rank Fusion
- **Question answering**: Built-in QA agents on your documents
- **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

```bash
# 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"

# Ask questions
haiku-rag ask "Who is the author of haiku.rag?"

# Rebuild database (re-chunk and re-embed all documents)
haiku-rag rebuild

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

## Python Usage

```python
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}")

    # Ask questions
    answer = await client.ask("Who is the author of haiku.rag?")
    print(answer)
```

## MCP Server

Use with AI assistants like Claude Desktop:

```bash
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/

- [Installation](https://ggozad.github.io/haiku.rag/installation/) - Provider setup
- [Configuration](https://ggozad.github.io/haiku.rag/configuration/) - Environment variables
- [CLI](https://ggozad.github.io/haiku.rag/cli/) - Command reference
- [Python API](https://ggozad.github.io/haiku.rag/python/) - Complete API docs
- [Benchmarks](https://ggozad.github.io/haiku.rag/benchmarks/) - Performance Benchmarks

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "haiku.rag",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "RAG, mcp, ml, sqlite, sqlite-vec",
    "author": null,
    "author_email": "Yiorgis Gozadinos <ggozadinos@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/65/7a/e00e3141c16d8f95534e5d8ac6463e9a0c80ac4fc688231478c18df3e634/haiku_rag-0.3.3.tar.gz",
    "platform": null,
    "description": "# Haiku SQLite RAG\n\nRetrieval-Augmented Generation (RAG) library on SQLite.\n\n`haiku.rag` is a Retrieval-Augmented Generation (RAG) library built to work on SQLite alone without the need for external vector databases. It uses [sqlite-vec](https://github.com/asg017/sqlite-vec) for storing the embeddings and performs semantic (vector) search as well as full-text search combined through Reciprocal Rank Fusion. Both open-source (Ollama) as well as commercial (OpenAI, VoyageAI) embedding providers are supported.\n\n## Features\n\n- **Local SQLite**: No external servers required\n- **Multiple embedding providers**: Ollama, VoyageAI, OpenAI\n- **Multiple QA providers**: Ollama, OpenAI, Anthropic\n- **Hybrid search**: Vector + full-text search with Reciprocal Rank Fusion\n- **Question answering**: Built-in QA agents on your documents\n- **File monitoring**: Auto-index files when run as server\n- **40+ file formats**: PDF, DOCX, HTML, Markdown, audio, URLs\n- **MCP server**: Expose as tools for AI assistants\n- **CLI & Python API**: Use from command line or Python\n\n## Quick Start\n\n```bash\n# Install\nuv pip install haiku.rag\n\n# Add documents\nhaiku-rag add \"Your content here\"\nhaiku-rag add-src document.pdf\n\n# Search\nhaiku-rag search \"query\"\n\n# Ask questions\nhaiku-rag ask \"Who is the author of haiku.rag?\"\n\n# Rebuild database (re-chunk and re-embed all documents)\nhaiku-rag rebuild\n\n# Start server with file monitoring\nexport MONITOR_DIRECTORIES=\"/path/to/docs\"\nhaiku-rag serve\n```\n\n## Python Usage\n\n```python\nfrom haiku.rag.client import HaikuRAG\n\nasync with HaikuRAG(\"database.db\") as client:\n    # Add document\n    doc = await client.create_document(\"Your content\")\n\n    # Search\n    results = await client.search(\"query\")\n    for chunk, score in results:\n        print(f\"{score:.3f}: {chunk.content}\")\n\n    # Ask questions\n    answer = await client.ask(\"Who is the author of haiku.rag?\")\n    print(answer)\n```\n\n## MCP Server\n\nUse with AI assistants like Claude Desktop:\n\n```bash\nhaiku-rag serve --stdio\n```\n\nProvides tools for document management and search directly in your AI assistant.\n\n## Documentation\n\nFull documentation at: https://ggozad.github.io/haiku.rag/\n\n- [Installation](https://ggozad.github.io/haiku.rag/installation/) - Provider setup\n- [Configuration](https://ggozad.github.io/haiku.rag/configuration/) - Environment variables\n- [CLI](https://ggozad.github.io/haiku.rag/cli/) - Command reference\n- [Python API](https://ggozad.github.io/haiku.rag/python/) - Complete API docs\n- [Benchmarks](https://ggozad.github.io/haiku.rag/benchmarks/) - Performance Benchmarks\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Retrieval Augmented Generation (RAG) with SQLite",
    "version": "0.3.3",
    "project_urls": null,
    "split_keywords": [
        "rag",
        " mcp",
        " ml",
        " sqlite",
        " sqlite-vec"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8c66d732fc02cf1d73a772598261947f1df68397c661e5440f09671dadc3c901",
                "md5": "a9d10340a92461705525f71e4d6a8cb3",
                "sha256": "758c41fea731fc9048b103aba3c1276f831d5361c1a186f9943b4e2b301498f0"
            },
            "downloads": -1,
            "filename": "haiku_rag-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9d10340a92461705525f71e4d6a8cb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 31061,
            "upload_time": "2025-07-09T07:50:25",
            "upload_time_iso_8601": "2025-07-09T07:50:25.647825Z",
            "url": "https://files.pythonhosted.org/packages/8c/66/d732fc02cf1d73a772598261947f1df68397c661e5440f09671dadc3c901/haiku_rag-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "657ae00e3141c16d8f95534e5d8ac6463e9a0c80ac4fc688231478c18df3e634",
                "md5": "27f2091e71f6bad648c63b8637690af4",
                "sha256": "5f023121fa4c7b8641a92c27f3d0b3742f5970ca744dd10950d1be85b3246196"
            },
            "downloads": -1,
            "filename": "haiku_rag-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "27f2091e71f6bad648c63b8637690af4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 222897,
            "upload_time": "2025-07-09T07:50:26",
            "upload_time_iso_8601": "2025-07-09T07:50:26.495101Z",
            "url": "https://files.pythonhosted.org/packages/65/7a/e00e3141c16d8f95534e5d8ac6463e9a0c80ac4fc688231478c18df3e634/haiku_rag-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 07:50:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "haiku.rag"
}
        
Elapsed time: 0.57118s