mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 05:43:58 +00:00
Comprehensive implementation of advanced AI capabilities: ## New Modules (23,541 lines of code) ### 1. Self-Learning / ReasoningBank (`src/learning/`) - Trajectory tracking for query optimization - Pattern extraction using K-means clustering - ReasoningBank for pattern storage and matching - Adaptive search parameter optimization ### 2. Attention Mechanisms (`src/attention/`) - Scaled dot-product attention (core) - Multi-head attention with parallel heads - Flash Attention v2 (memory-efficient) - 10 attention types with PostgresEnum support ### 3. GNN Layers (`src/gnn/`) - Message passing framework - GCN (Graph Convolutional Network) - GraphSAGE with mean/max aggregation - Configurable aggregation methods ### 4. Hyperbolic Embeddings (`src/hyperbolic/`) - Poincaré ball model - Lorentz hyperboloid model - Hyperbolic distance metrics - Möbius operations ### 5. Sparse Vectors (`src/sparse/`) - COO format sparse vector type - Efficient sparse-sparse distance functions - BM25/SPLADE compatible - Top-k pruning operations ### 6. Graph Operations & Cypher (`src/graph/`) - Property graph storage (nodes/edges) - BFS, DFS, Dijkstra traversal - Cypher query parser (AST-based) - Query executor with pattern matching ### 7. Tiny Dancer Routing (`src/routing/`) - FastGRNN neural network - Agent registry with capabilities - Multi-objective routing optimization - Cost/latency/quality balancing ## Docker Infrastructure - Dockerfile with pgrx 0.12.6 and PostgreSQL 16 - docker-compose.yml with test runner - Initialization SQL with test tables - Shell scripts for dev/test/benchmark ## Feature Flags - `learning`, `attention`, `gnn`, `hyperbolic` - `sparse`, `graph`, `routing` - `ai-complete` and `graph-complete` bundles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
79 lines
2 KiB
YAML
79 lines
2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Development PostgreSQL with ruvector extension
|
|
postgres:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: crates/ruvector-postgres/docker/Dockerfile
|
|
container_name: ruvector-postgres
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: ruvector
|
|
POSTGRES_PASSWORD: ruvector
|
|
POSTGRES_DB: ruvector_test
|
|
# Performance tuning
|
|
POSTGRES_INITDB_ARGS: "--data-checksums"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ruvector -d ruvector_test"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- ruvector-network
|
|
|
|
# Test runner container
|
|
test-runner:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: crates/ruvector-postgres/docker/Dockerfile.test
|
|
container_name: ruvector-test-runner
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://ruvector:ruvector@postgres:5432/ruvector_test
|
|
RUST_LOG: info
|
|
RUST_BACKTRACE: 1
|
|
volumes:
|
|
- ../../..:/app
|
|
- cargo_cache:/usr/local/cargo/registry
|
|
- target_cache:/app/target
|
|
networks:
|
|
- ruvector-network
|
|
command: ["cargo", "test", "--features", "pg_test"]
|
|
|
|
# Benchmark runner
|
|
benchmark:
|
|
build:
|
|
context: ../../..
|
|
dockerfile: crates/ruvector-postgres/docker/Dockerfile.test
|
|
container_name: ruvector-benchmark
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgres://ruvector:ruvector@postgres:5432/ruvector_test
|
|
RUST_LOG: info
|
|
volumes:
|
|
- ../../..:/app
|
|
- cargo_cache:/usr/local/cargo/registry
|
|
- target_cache:/app/target
|
|
networks:
|
|
- ruvector-network
|
|
command: ["cargo", "bench", "--features", "pg_test"]
|
|
profiles:
|
|
- benchmark
|
|
|
|
volumes:
|
|
postgres_data:
|
|
cargo_cache:
|
|
target_cache:
|
|
|
|
networks:
|
|
ruvector-network:
|
|
driver: bridge
|