-
Notifications
You must be signed in to change notification settings - Fork 0
feat(rag): Pure-Rust Vector Store & RAG Pipeline (DIR-24) #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rag): Pure-Rust Vector Store & RAG Pipeline (DIR-24) #3
Conversation
- Add ares-vector crate: pure-Rust vector DB with HNSW indexing
- Memory-mapped persistence via memmap2
- Multiple distance metrics (Cosine, Euclidean, Dot Product)
- Thread-safe with parking_lot RwLocks
- No external dependencies (Qdrant/Milvus not required)
- Add comprehensive RAG pipeline:
- Document ingestion with chunking (word/semantic/character)
- Multi-model embedding service (BGE, MiniLM, Nomic, Qwen3, GTE)
- Multi-strategy search (semantic, BM25, fuzzy, hybrid)
- Cross-encoder reranking (MiniLM-L6-v2, BGE Reranker)
- Add RAG API endpoints:
- POST /api/rag/ingest - Document ingestion
- POST /api/rag/search - Multi-strategy search
- GET /api/rag/collections - List collections
- DELETE /api/rag/collections/{name} - Delete collection
- Add VectorStore trait abstraction for pluggable backends
- Add RagConfig to ares.toml with full configuration options
- Update CI workflow to test ares-vector on all platforms
- Update documentation (README, PROJECT_STATUS, CHANGELOG)
Tests: 130 library tests passing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a comprehensive RAG (Retrieval Augmented Generation) system with a pure-Rust vector database, bringing A.R.E.S to v0.3.0. The implementation adds local-first vector storage with HNSW indexing, multi-model embedding support, multiple search strategies, and reranking capabilities—all without requiring external service dependencies.
Changes:
- Pure-Rust
ares-vectorcrate with HNSW indexing and memory-mapped persistence - Multi-strategy search engine (semantic, BM25, fuzzy, hybrid with RRF fusion)
- Comprehensive embedding service supporting 38+ models via FastEmbed/Candle
- Document chunking with word/semantic/character strategies
- Cross-encoder reranking for improved relevance
- New RAG API endpoints for ingestion, search, and collection management
- 130+ new tests including live integration tests with real models
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/rag_live_tests.rs |
Live integration tests with real embedding models (ignored by default) |
src/utils/toml_config.rs |
Expanded RAG configuration with hybrid weights and reranking options |
src/types/mod.rs |
New RAG API request/response types with OpenAPI schemas |
src/rag/search.rs |
Multi-strategy search engine (BM25, fuzzy, hybrid with RRF) |
src/rag/reranker.rs |
Cross-encoder reranking service with 4 model options |
src/rag/embeddings.rs |
Comprehensive embedding service with 38+ models |
src/rag/chunker.rs |
Text chunking with semantic boundary awareness |
src/db/vectorstore.rs |
Abstract vector store trait with multi-provider support |
src/db/lancedb.rs |
LanceDB vector store implementation (888 lines) |
src/db/ares_vector.rs |
Pure-Rust vector store using ares-vector crate |
src/api/routes.rs |
New RAG API routes for ingestion and search |
src/api/handlers/rag.rs |
RAG endpoint handlers with global service initialization |
docs/PROJECT_STATUS.md |
Updated with Iteration 5 completion summary |
docs/FUTURE_ENHANCEMENTS.md |
Documented deferred features (GPU, caching, protocols) |
docs/DIR-24_RAG_IMPLEMENTATION_PLAN.md |
Comprehensive implementation plan with research findings |
crates/ares-vector/* |
Pure-Rust vector database crate (separate package) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix rustdoc warnings for Vec<String> by wrapping in backticks - Fix bare URL warnings by using angle brackets or backticks - Add empty [workspace] table to ui/Cargo.toml to prevent trunk workspace confusion
feat(rag): Pure-Rust Vector Store & RAG Pipeline (DIR-24)
Summary
Implements a complete RAG (Retrieval Augmented Generation) system with a pure-Rust vector database, eliminating external service dependencies. This release brings A.R.E.S to v0.3.0.
New Crate:
ares-vectormemmap2ares-vector@0.1.1RAG Pipeline
New API Endpoints
/api/rag/ingest/api/rag/search/api/rag/collections/api/rag/collections/{name}Configuration
New
[rag]section inares.tomlwith full configuration options.Breaking Changes
None - all new functionality is additive behind the
ares-vectorfeature flag.Documentation
docs/DIR-24_RAG_IMPLEMENTATION_PLAN.mddocs/FUTURE_ENHANCEMENTS.mdfor deferred featuresTest Coverage
ares-vectoron all platforms (Ubuntu, Windows, macOS)What's Deferred
Closes DIR-24