Retrieval Augmented Generation based on SQLite
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 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.
# 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
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}")
Use with AI assistants like Claude Desktop:
haiku-rag serve --stdio
Provides tools for document management and search directly in your AI assistant.
Full documentation at: https://ggozad.github.io/haiku.rag/
{ "mcpServers": { "haikurag": { "command": "haiku-rag", "args": [ "serve", "--stdio" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories