A minimal yet practical RAG system built around CREA MLS-style listings, using:
-
Python
-
FAISS (vector search)
-
FastAPI
-
OpenAI embeddings + chat models
This repo is built as a companion to the article:
👉 RAG Explained: Engineering Scalable Search Without Hallucinations
https://nidly.substack.com/p/rag-explained-engineering-scalable?r=a3p8i
If you're coming from that post, this is the hands-on demo.
This project gives you a simple but realistic end-to-end pipeline:
-
Fake CREA listings (structured JSON)
-
Text → Embedding conversion
-
FAISS index for similarity search
-
Retrieval pipeline (Top-K)
-
RAG assembly layer for clean prompts
-
FastAPI endpoint:
/ask
All in less than 300 lines of code.
No frameworks. No junk. Just engineering.
crea-mls-rag-playground/
├── data/
│ └── listings.json ← sample CREA-style listings
├── src/
│ ├── config.py ← env, config
│ ├── embeddings.py ← embedding helper
│ ├── vector_store.py ← FAISS index builder & search
│ ├── ingest_crea_listings.py
│ ├── rag.py ← retrieval + generation
│ └── api.py ← FastAPI server
├── requirements.txt
├── README.md (this file)
Install deps:
pip install -r requirements.txt
Create embeddings + FAISS index:
python -m src.ingest_crea_listings
Run API:
uvicorn src.api:app --reload
Query:
curl -X POST http://localhost:8000/ask \
-H "Content-Type: application/json" \
-d '{"query": "show me condos with ocean view"}'
Real estate has:
-
Rich structured metadata
-
Semi-structured descriptions
-
High-variance natural language
-
Real-world need for relevance ranking
It’s the perfect playground for understanding embeddings, vector-search, and RAG…
and honestly،
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.