Semantic Search for Real Estate Listings using FAISS + Sentence Transformers
This repository contains the reference implementation for the Substack article:
What Is FAISS? Building Your Own Zillow AI Search Engine
A practical, production-minded example showing how to build a mini Zillow-style semantic search engine using modern vector search.
Traditional search engines rely on keywords.
Real users don’t.
This repo demonstrates how to replace keyword search with meaning-based retrieval:
- Turn listings into embeddings
- Index them with FAISS
- Search with natural language
- Retrieve listings based on semantic similarity
No toy demos.
No buzzwords.
Just the engineering.
Client → FastAPI → Embedding Model → FAISS Index → Ranked Listings
Components:
- FastAPI for serving search requests
- Sentence Transformers for embedding listings
- FAISS IndexFlatIP for cosine-style similarity
- CSV listing dataset
- Clean structure ready for MLS integration
- Natural language search
- Vector embeddings (normalized)
- FAISS similarity search (IndexFlatIP)
- Easy to extend with filters
- Clean project layout for real pipelines
- Ready for IVFFlat or HNSW upgrades
git clone https://github.com/<your-username>/mini-zillow-faiss
cd mini-zillow-faiss
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtuvicorn app.api:app --reloadGET http://localhost:8000/search?q=modern+studio+in+new+york
Response:
[
{
"score": 0.87,
"id": 5,
"title": "Modern studio",
"city": "New York",
"price": 550000
}
]Use real MLS feeds (BrightMLS, CREA, RESO WebAPI, RETS).
Price, bedrooms, city, property type.
IndexFlatIPsimple and effectiveIVFFlatfor large datasetsHNSWfor lower memory and fast recall
Docker-ize and ship to GPU or CPU servers.
Full article with deeper explanations: 👉 What Is FAISS? Building Your Own Zillow AI Search Engine
Covers:
- How FAISS works internally
- Cosine similarity intuition
- Semantic search vs keyword search
- Real engineering pitfalls
- Lessons from production vector search
Built by Alireza Rahmani Khalili
Principal Software Engineer • AI Engineering • DDD • MLS Systems
-
Substack: https://nidly.substack.com
-
Personal Website: https://alireza.engineer
Alireza writes about:
-
AI engineering
-
Vector databases
-
Domain-Driven Design
-
Real-estate listing systems
-
Building nation-scale data pipelines
If you're into engineering that actually works in production, subscribe.
MIT License.