Five call sites repeated the same post-conversion preparation: store the Docling representation and resolve a title when none was supplied. _prepare_and_title now owns that sequence. update_document continues to call _prepare_document_from_docling directly because an explicit update must preserve an existing empty title. create_document, both content-replacement branches of update_document, and source ingestion embedded eagerly before passing chunks to a persistence funnel that checked them again. The funnels now own embedding, including the checks required by import_document and import_documents for caller-supplied chunks. Move the document.embed span into ensure_chunks_embedded after its early return. Every path that performs embedding is now instrumented, while operations whose chunks are already embedded emit no span. convert() previously used its own HTTP client and temporary-file path. Route URL conversion through HTTPSource, matching source ingestion, and move _write_fetch_body to processing.py so both paths share temporary file handling without an import cycle. Add walk_files for filesystem enumeration and use it from both FSSource.discover and one-shot directory ingestion. Symlink escape filtering now has one implementation. |
||
|---|---|---|
| .. | ||
| haiku/rag | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
haiku.rag-slim
Opinionated agentic RAG powered by LanceDB, Pydantic AI, and Docling - Core package with minimal dependencies.
haiku.rag-slim is the core package for users who want to install only the dependencies they need. Document processing (docling), and reranker support are all optional extras.
For most users, we recommend installing haiku.rag instead, which includes all features out of the box.
Installation
Python 3.12 or newer required
Minimal Installation
uv pip install haiku.rag-slim
Core functionality with OpenAI/Ollama support, MCP server, and Logfire observability. Document processing (docling) is optional.
With Document Processing
uv pip install haiku.rag-slim[docling]
Adds support for 40+ file formats including PDF, DOCX, HTML, and more.
Available Extras
Document Processing:
docling- PDF, DOCX, HTML, and 40+ file formats
Embedding Providers:
voyageai- VoyageAI embeddings
Rerankers:
cross-encoder- Local reranking via sentence-transformerscohere- Coherezeroentropy- Zero Entropy
Model Providers:
- OpenAI/Ollama - included in core (OpenAI-compatible APIs)
anthropic- Anthropic Claudegroq- Groqgoogle- Google Geminimistral- Mistral AIbedrock- AWS Bedrockvertexai- Google Vertex AI
# Common combinations
uv pip install haiku.rag-slim[docling,anthropic,cross-encoder]
uv pip install haiku.rag-slim[docling,groq]
Usage
See the main haiku.rag repository for:
- Quick start guide
- CLI examples
- Python API usage
- MCP server setup
Documentation
Full documentation: https://ggozad.github.io/haiku.rag/
- Installation - Provider setup
- Configuration - YAML configuration
- CLI - Command reference
- Python API - Complete API docs