rryam/VecturaKit
Swift-based vector database for on-device RAG using MLTensor and MLX Embedders
What it solves
VecturaKit is a Swift-based vector database designed for on-device applications. It allows developers to store, index, and retrieve vector embeddings locally on Apple platforms, eliminating the need for external cloud-based vector databases for basic semantic search and retrieval tasks.
How it works
The framework provides a core vector database engine with a pluggable architecture. It supports multiple embedding providers, including Apple's native NaturalLanguage framework, OpenAI-compatible APIs (for local servers like Ollama or hosted services), and GPU-accelerated embeddings via MLX. It combines vector similarity with BM25 text search to provide hybrid search capabilities. The system is highly customizable, allowing developers to implement their own storage backends (e.g., SQLite, Core Data) or search algorithms by conforming to specific protocols.
Who it’s for
Swift developers building apps for iOS, macOS, tvOS, visionOS, and watchOS who need local semantic search, RAG (Retrieval-Augmented Generation) capabilities, or on-device document management without relying on external infrastructure.
Highlights
- Pluggable Embeddings: Supports various providers including Apple's NaturalLanguage, MLX, and OpenAI-compatible endpoints.
- Hybrid Search: Combines vector similarity and BM25 text search for more relevant results.
- On-Device Storage: Local persistence of embeddings and documents across app sessions.
- Flexible Memory Management: Offers automatic, full-memory, or indexed modes to handle datasets from thousands to millions of documents.
- Customizable Architecture: Allows for custom storage providers and search engine implementations.