VectorSphere is a high-performance AI-powered vector search system designed for semantic search and retrieval at scale. It integrates multiple embedding models, advanced vector search algorithms, and retrieval techniques, making it ideal for recommendation systems, intelligent search, and knowledge retrieval.
- β
Supports multiple embedding models:
SentenceTransformers,OpenAI,Hugging Face,Custom Fine-tuned Models - β Optimized embedding caching for efficiency
- β Supports fine-tuning models for domain-specific embeddings
- β HNSW algorithm for fast approximate nearest neighbor search
- β FAISS-based indexing for scalable retrieval
- β Hybrid Search (BM25 + Vector Similarity) for improved results
- β Combines BM25 text search with vector similarity
- β Re-ranking pipeline to refine search results
- β Retrieval-Augmented Generation (RAG) using LLMs
- β MLOps pipeline for model deployment & monitoring
- β Observability with Prometheus & Grafana
- β Performance benchmarking tools
VectorSphere follows a modular and scalable architecture:
- Multiple embedding model support (
SentenceTransformers,OpenAI,Custom Models) - Fine-tuning pipeline for adapting embeddings to specific domains
- Caching and optimization for efficient query processing
- Primary:
Weaviateintegration for scalable vector storage - Secondary:
FAISSfor rapid prototyping and experimentation - Hybrid:
PGVectorfor vector storage insidePostgreSQL
- Hybrid search: combines traditional BM25 text search with vector similarity
- Re-ranking pipeline: uses AI models to improve search relevance
- Retrieval-Augmented Generation (RAG) with LLM backends
- Built with FastAPI for high-performance APIs
- Async support for handling high-load requests
- Security mechanisms (rate limiting, authentication)
- Containerized using Docker
- Kubeflow pipelines for model training & deployment
- Monitoring & Observability with
PrometheusandGrafana
| Category | Technology Used |
|---|---|
| Backend Framework | FastAPI |
| Machine Learning | PyTorch, Hugging Face Transformers |
| Vector Search | Weaviate, FAISS, PGVector |
| Text Search | Elasticsearch |
| Data Processing | Ray, Dask |
| MLOps | Docker, Kubeflow |
| Monitoring | Prometheus, Grafana |
Before running the project, ensure you have the following installed:
- Python 3.9+
- Docker & Docker Compose
- Git
# Clone the repository
git clone https://github.com/MHHamdan/VectorSphere.git
cd VectorSphere
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
## π Running the Project
```bash
# Start the services
docker-compose up -d
# Run the API
uvicorn app.main:app --reload| Service | URL |
|---|---|
| API Documentation | http://localhost:8000/docs |
| Vector Database Console | http://localhost:8080 |
VectorSphere/
β
βββ app/
β βββ main.py # FastAPI application
β βββ services/
β β βββ embedding.py # Embedding service
β β βββ vector_db.py # Vector database service
β β βββ hybrid_search.py # BM25 + Vector hybrid search
β β βββ reranking.py # Re-ranking module
β β βββ streaming.py # Real-time vector ingestion
β βββ core/
β β βββ config.py # Configuration module
β β βββ dependencies.py # API dependencies
β βββ routes/
β βββ search.py # API endpoints for search
β βββ embeddings.py # API endpoints for embeddings
β βββ health.py # Health check routes
β
βββ tests/
β βββ test_embedding_service.py
β βββ test_vector_db_service.py
β βββ test_api.py
β
βββ scripts/ # Utility scripts
β βββ benchmark.py # Benchmarking FAISS vs Weaviate
β βββ ingest_vectors.py # Vector ingestion
β βββ update_index.py # Refresh FAISS index
β
βββ Dockerfile
βββ docker-compose.yml
βββ requirements.txt
βββ README.md
βββ .envβ
Phase 1: Core Implementation
- Base embedding functionality
- Vector search system
- REST API
π Phase 2: Advanced Features
- Hybrid search implementation (BM25 + Vectors)
- RAG integration
- Performance optimization
π Phase 3: Production Readiness
- MLOps pipeline
- Monitoring & observability
- Documentation and examplesWe welcome contributions! Please check out our Contributor Guide before submitting pull requests.
This project is licensed under the MIT License.
For questions or suggestions, open an issue on GitHub:
π VectorSphere GitHub Repo
