https://github.com/leoantony72/multi_model_vectorsearch
Multi Model vector search with Redis
https://github.com/leoantony72/multi_model_vectorsearch
database graph python redis redis-cache vector
Last synced: 2 months ago
JSON representation
Multi Model vector search with Redis
- Host: GitHub
- URL: https://github.com/leoantony72/multi_model_vectorsearch
- Owner: leoantony72
- Created: 2025-07-27T04:03:02.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T17:06:52.000Z (11 months ago)
- Last Synced: 2025-09-29T08:37:31.922Z (9 months ago)
- Topics: database, graph, python, redis, redis-cache, vector
- Language: HTML
- Homepage:
- Size: 79.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Real-Time Multi-Modal Semantic Search System
This project is a **real-time, multi-modal semantic search system** that combines **vector similarity search** with **graph-based context expansion**.
It supports both **text** and **image** search using locally computed **CLIP embeddings**.
---
## 📜 What I Built
- **Local CLIP embeddings** for text and images (`openai/clip-vit-base-patch16`, 512-dim)
- **Redis 8 vector index** with cosine similarity and KNN search
- **Result caching** in Redis for low latency and reduced recompute
- **NetworkX semantic graph** to link and rank related items beyond the initial top-K
→ enables richer, more explainable retrieval
- **Duplicate prevention** using SHA-256 content hashing
- **Endpoints** for:
- `submit` (ingest)
- `search` (retrieve)
---
## 🛠 Architecture Overview
1. **Embed**: Text and images embedded locally via CLIP
2. **Index**: Vectors stored in Redis 8 (cosine similarity)
3. **Search**: Fast KNN lookups in Redis
4. **Expand**: Related items discovered via semantic graph traversal in NetworkX
5. **Cache**: Query results cached in Redis
6. **Serve**: Python handles API layer, embedding and indexing
---
## 🚀 Getting Started
### 1️⃣ Start the required services
```bash
docker-compose up -d
```
```bash
python app.py
```
```bash
fastapi dev main.py
```
### Running Addr
```bash
localhost:8000
```