Commit graph

4 commits

Author SHA1 Message Date
rUv
eb1227047d feat(postgres): Add 7 advanced AI modules to ruvector-postgres
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>
2025-12-02 20:12:48 +00:00
rUv
f08ea45d04 docs(postgres): Add comprehensive integration plans for advanced features
Add detailed implementation, optimization, and benchmarking plans for:

1. Self-Learning / ReasoningBank
   - Trajectory tracking, verdict judgment, memory distillation
   - Adaptive search parameter optimization

2. Attention Mechanisms (39 types)
   - Core: Scaled dot-product, multi-head, Flash v2, linear
   - Graph: GAT, GATv2, sparse patterns
   - Specialized: MoE, cross-attention, sliding window
   - Hyperbolic: Poincaré, Lorentz attention

3. GNN Layers
   - GCN, GraphSAGE, GAT, GIN layers
   - Message passing framework
   - PostgreSQL graph storage integration

4. Hyperbolic Embeddings
   - Poincaré ball and Lorentz models
   - Möbius operations, exp/log maps
   - Hyperbolic HNSW index

5. Sparse Vectors
   - COO/CSR formats, SPLADE support
   - Inverted index, WAND algorithm
   - Hybrid dense+sparse search

6. Graph Operations & Cypher
   - Full Cypher query language support
   - Property graph storage
   - Vector-enhanced traversals
   - Graph algorithms (PageRank, community detection)

7. Tiny Dancer Routing
   - FastGRNN neural inference
   - Semantic route matching
   - Cost/latency optimization
   - Agent registry and pool management

8. Optimization Strategy
   - SIMD dispatch (AVX-512/AVX2/NEON)
   - Zero-copy operations, memory pools
   - Query plan caching, parallel execution
   - PostgreSQL-specific tuning

9. Benchmarking Plan
   - Micro-benchmarks for all operations
   - Competitor comparison methodology
   - Stress testing and recall analysis
   - CI/CD integration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:15:20 +00:00
rUv
6a0ce6a637 docs: Reorganize documentation and add postgres README
ruvector-postgres:
- Add comprehensive README.md with features, comparison, tutorials
- Create docs/implementation/ and docs/guides/ subdirectories
- Move implementation summaries to organized locations

Root docs reorganization:
- Move HNSW docs to docs/hnsw/
- Move postgres docs to docs/postgres/
- Move zero-copy docs to docs/postgres/zero-copy/
- Move guides to docs/guides/
- Move architecture to docs/architecture/
- Move benchmarks docs to benchmarks/docs/
- Move benchmark source to benchmarks/src/

Cleanup:
- Remove duplicate install/ from root (now in crates/ruvector-postgres/install/)
- Remove stale benchmark results
- Remove duplicate binary files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:45:44 +00:00
rUv
1cfc29f357
feat(postgres): Add ruvector-postgres extension with SIMD optimizations (#42) 2025-12-02 09:55:07 -05:00