`CapabilityEvidenceRecord` holds the relationships a transcript cannot express: which chunks a capability retrieved, which it cited, in which questions, and at which point in the conversation. RAG and analysis each own one in their own state namespace. Nothing is co-written: the host's state is JSON storage, so a shared record would be overwritten by whichever capability synced last, and merging happens in transient per-request views instead. Both clocks are derived from the conversation rather than counted locally, so every participant computes the same values without sharing a counter. Question identity is the message count when the question arrived; epoch is the message count at an outcome. Epochs are therefore globally comparable, which is what lets `citation_status` require a declaration to follow the newest evidence of every capability, and what makes equal epochs mean one request. A declaration is written only after `resolve_citations` succeeds, so a call naming only unresolvable ids is not a citation. Status is derived, never stored, so refs and status cannot contradict. Resuming a question requires the host to carry the capability state from the run being resumed. Without it the identity of the question in progress is unknowable, and adopting the current message count would relabel that question as a new one and judge every declaration in it against the wrong identity. Nothing reads the records yet and no wire behaviour changes. |
||
|---|---|---|
| .. | ||
| 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