ggozad/haiku.rag
Opinionated agentic RAG powered by LanceDB, Pydantic AI, and Docling
What it solves
Haiku RAG provides a comprehensive system for retrieving information from documents, allowing users to ask questions and perform complex analysis on their data. It solves the problem of limited context windows in LLMs by indexing documents and retrieving the most relevant chunks of text and images, providing citations to the original source material.
How it works
The system uses a combination of vector and full-text search (hybrid search) with Reciprocal Rank Fusion to find relevant content. It integrates with Docling for document structure awareness and LanceDB for local-first embedded storage. For advanced queries, it uses vision-capable models to analyze images embedded in documents, and a sandboxed Python environment to execute code for analytical tasks like aggregation and computation.
Who it’s for
Developers and researchers who need a production-ready RAG system that supports multimodal search (text and images), local-first storage, and integration with AI assistants via the Model Context Protocol (MCP).
Highlights
- Multimodal Search: Supports text-as-query for finding images and image-as-query for retrieval.
- Agentic Capabilities: Includes a sandboxed Python environment for complex analytical tasks and multi-turn conversational memory.
- Production Ingester: A long-lived service with a persistent queue and worker pool for continuous indexing from S3, HTTP, and local filesystems.
- Extensible Provider Support: Compatible with multiple embedding and QA providers including Ollama, OpenAI, and vLLM.
- Visual Grounding: Allows users to view highlighted chunks on original page images for verification.