A modern property search system using Qdrant vector database with sentence transformers for semantic search capabilities.
- π Property Data Processing - Intelligent text extraction and preprocessing
- π Semantic Search - Natural language queries using sentence transformers
- οΏ½ Vector Database - Fast similarity search with Qdrant
- π Web Interface - Clean, responsive search frontend
- οΏ½ Real-time Status - Collection health and document count monitoring
- β‘ No Training Required - Pre-trained embeddings, ready to use
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Data Layer ββββββ Vector Engine ββββββ Frontend β
β β β β β β
β β’ CSV Loading β β β’ Qdrant DB β β β’ Flask API β
β β’ Text Processingβ β β’ Sentence Trans β β β’ Search UI β
β β’ Data Cleaning β β β’ 384-dim vectorsβ β β’ Status Check β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
multiagent/
βββ data/
β βββ loader.py # CSV data loading utilities
β βββ processing.py # Data preprocessing and text preparation
βββ qdrant/
β βββ client.py # Qdrant vector database client
β βββ ingestion.py # High-level ingestion interface
βββ frontend/
β βββ app.py # Flask web application
β βββ templates/ # HTML templates
β βββ static/ # CSS, JavaScript assets
βββ scripts/
β βββ ingestor.py # Data ingestion script
βββ settings.py # Configuration management
βββ .env # Environment variables
βββ README.md
- Python 3.8+
- Docker (for Qdrant)
- Virtual environment (recommended)
# Create virtual environment
python -m venv venv
# Activate (Windows)
venv\Scripts\activate
# Activate (Linux/Mac)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt# Using Docker
docker run -p 6333:6333 qdrant/qdrant:v1.15.5
# Or using Docker Compose
docker-compose up -dCreate .env file:
# Embedding Model (Sentence Transformers)
EMBEDDING_MODEL=all-MiniLM-L6-v2
VECTOR_SIZE=384
# Qdrant Configuration
QDRANT_URL=http://localhost:6333
COLLECTION_NAME=property_data
# Data Configuration
PROPERTY_DATA_FILE=property_data.csv# Run data ingestion
python scripts/ingestor.py# Start Flask application
cd frontend
python app.pyOpen http://localhost:5000 in your browser.
The system uses sentence-transformers for semantic embeddings:
- Default:
all-MiniLM-L6-v2(384 dimensions) - Alternative:
all-mpnet-base-v2(768 dimensions, better quality) - Lightweight:
paraphrase-MiniLM-L3-v2(384 dimensions, faster)
- Automatic text detection from CSV columns
- Content combination for rich search context
- Batch processing for efficient ingestion
- Memory-optimized workflow
# Natural language search
"luxury apartment with pool downtown"
"commercial office space for rent"
"family house with garden near school"
"modern condo with parking"# Search properties
POST /search
{
"query": "luxury apartment",
"limit": 10
}
# Check system status
GET /statusfrom qdrant.client import QdrantVectorClient
# Initialize client
client = QdrantVectorClient(
collection_name="property_data",
embedding_model="all-MiniLM-L6-v2"
)
# Search properties
results = client.search("downtown apartment", limit=5)- Search Speed: < 100ms for typical queries
- Embedding Generation: Real-time with sentence transformers
- Scalability: Handles 10K+ documents efficiently
- Memory Usage: ~2GB for model + data
- Extend
DataLoaderclass indata/loader.py - Update
DataProcessorfor new data formats - Configure field mappings in
settings.py
# Update client initialization
client = QdrantVectorClient(
embedding_model="your-custom-model",
collection_name="your_collection"
)- Templates: Modify
frontend/templates/index.html - Styling: Update
frontend/static/style.css - Behavior: Extend
frontend/static/script.js
qdrant-client>=1.7.1 # Vector database client
sentence-transformers # Pre-trained embeddings
pandas>=2.1.4 # Data manipulation
flask>=2.3.0 # Web framework
python-dotenv>=1.0.0 # Environment configuration
torch # Deep learning backend
transformers # Model infrastructure
scikit-learn # Additional ML utilities
# Build application image
docker build -t property-search .
# Run with Docker Compose
docker-compose upQdrant Connection Error
# Check if Qdrant is running
curl http://localhost:6333/healthModel Download Issues
# Pre-download models
python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"Memory Issues
# Use lighter model
EMBEDDING_MODEL=paraphrase-MiniLM-L3-v2- Health Check:
/statusendpoint - Document Count: Automatic validation
- Search Performance: Built-in timing
- Error Logging: Comprehensive logging system
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Qdrant - Vector database engine
- Sentence Transformers - Pre-trained embedding models
- Hugging Face - Model infrastructure
- Flask - Web framework