--- title: Property AI emoji: 🏠 colorFrom: blue colorTo: green sdk: gradio sdk_version: "3.44.0" app_file: app.py pinned: false --- # NoBrokerage Chatbot **AI-powered real estate assistant** for NoBrokerage.com that retrieves property data from a FAISS vectorstore, applies structured filters, and generates grounded summaries and property cards using Groq LLM. This project is built using **FastAPI**, **LangChain**, **FAISS**, **HuggingFace embeddings**, **Frontend**, and **Groq LLM**, and is ready for **Docker deployment** and **Hugging Face Spaces**. --- ## Table of Contents - [NoBrokerage Chatbot](#nobrokerage-chatbot) - [Table of Contents](#table-of-contents) - [Project Overview](#project-overview) - [Features](#features) - [Project Structure](#project-structure) - [Example Queries the Chatbot Can Handle](#example-queries-the-chatbot-can-handle) - [How to Run Locally](#how-to-run-locally) - [1. Clone the Repository](#1-clone-the-repository) - [2. Create Virtual Environment](#2-create-virtual-environment) - [3. Install Dependencies](#3-install-dependencies) - [4. Set Up Environment Variables](#4-set-up-environment-variables) - [5. Run the FastAPI Server](#5-run-the-fastapi-server) - [Tech Stack](#tech-stack) - [Features](#features-1) - [Deployment Ready](#deployment-ready) - [👨‍💻 Author](#-author) --- ## Project Overview NoBrokerage Chatbot allows users to query property listings by specifying filters like **city, BHK, budget, status, locality**, and returns **summary text** and **cards** with property details. - **Semantic search**: FAISS vectorstore with HuggingFace embeddings for similarity search. - **Deterministic filters**: Apply structured metadata filters for city, BHK, budget, status, and locality. - **LLM summarization**: Groq LLM produces grounded summaries and card outputs strictly from filtered property records. - **Deployment-ready**: Can run via CLI, FastAPI, Docker, or Hugging Face Spaces. --- ## Features - Parse natural language queries for: - Budget (₹, Cr, Lakh) - BHK - City - Property status (Ready to move / Under construction) - Locality or project - FAISS similarity search over property embeddings - Deterministic filtering of search results - Generate structured JSON output with: - `summary` (text summary) - `cards` (detailed property info) - FastAPI backend with `/chat` endpoint - Dockerized for easy deployment - Compatible with Hugging Face Spaces --- ## Project Structure ```bash NOBROKERAGE/ ├── backend/ │ ├── api.py │ ├── data/ ├── database/ ├── frontend/ ├── processed_data/ ├── src/ │ └── chatbot.py ├── subha/ ├── vectorstore/ │ └── index.faiss ├── .env ├── .gitignore ├── Dockerfile ├── README.md └── requirements.txt ``` --- ## Example Queries the Chatbot Can Handle The chatbot can intelligently respond to natural language queries like: - " Find 2BHK apartments in Chembur " - " 3BHK flat in Pune under ₹1.2 Cr " - " Under-construction 3BHK in Mumbai " - " 2bhk flat in pune " - " 3bhk in Mumbai " It uses: - **FAISS** to find the most relevant property documents. - **LangChain + Groq LLM** (`llama-3.1-8b-instant`) to summarize matching results. - **Structured filters** for city, budget, BHK, locality, and status. --- ## How to Run Locally ### 1. Clone the Repository ```bash git clone https://github.com/yourusername/nobrokerage.git cd nobrokerage ``` ### 2. Create Virtual Environment ```bash python -m venv venv venv\Scripts\activate # on Windows # OR source venv/bin/activate # on Mac/Linux ``` ### 3. Install Dependencies ```bash pip install -r requirements.txt ``` ### 4. Set Up Environment Variables ```bash GROQ_API_KEY=your_groq_api_key_here ``` ### 5. Run the FastAPI Server ```bash cd backend uvicorn api:app --reload ``` --- ## Tech Stack - **FastAPI** — Backend API framework - **Frontend** - index.html, style.css, script.js - **LangChain** — LLM orchestration - **Groq LLM (llama-3.1-8b-instant)** — Summarization & reasoning - **FAISS** — Semantic vector search - **HuggingFace Sentence Transformer** — Embeddings - **Docker** — Containerization - **Python 3.11** --- ## Features ✅ Semantic property search using FAISS ✅ Intelligent summaries and cards generated by Groq LLM ✅ Handles filters like city, budget, BHK, and project status ✅ Ready for Hugging Face Spaces or cloud deployment ✅ Modular architecture (backend + src separation) --- ## Deployment Ready This backend is designed to work seamlessly with **Docker** and can deploy directly to **Hugging Face Spaces**. Make sure `vectorstore/` and `.env` are included in your project before building the Docker image. --- ## 👨‍💻 Author **Subhakanta Rath** 🎓 MSc AI & ML — IIIT Lucknow 💡 Focused on ML, Data Engineering & Agentic AI Systems 📍 Lucknow, India