Skip to content

Repository files navigation

GAF-AI: RAG Sales Intelligence Dashboard

An AI-powered B2B sales intelligence platform built for GAF Roofing that automates contractor research, comparison, and lead generation for enterprise sales teams.

Overview

What it does: The platform enables sales teams to query contractor data, receive AI-driven insights, and compare vendors across multiple dimensions—automating work that previously required manual research.

Business impact: Reduces sales research time from hours to minutes, helping GAF's sales team identify high-value leads and competitive opportunities in the roofing contractor space.

Technical highlights:

  • Retrieval-Augmented Generation (RAG) with agent-driven intelligence
  • Web scraping pipeline with Selenium for dynamic content extraction
  • Vector database (ChromaDB) for semantic search across contractor networks
  • Full-stack deployment from data ingestion to interactive UI

Architecture

image

The platform follows a three-tier architecture:

1. Data Collection & Processing

  • Selenium web scraper extracts contractor data from multiple sources with dynamic JavaScript rendering
  • BeautifulSoup (BS4) parses HTML and structures raw web data
  • Fallback mock data (CSV-based) ensures reliability during scraper optimization
  • Data normalized into key-value pairs for downstream processing

2. AI Insights Engine

  • FastAPI backend serves as the orchestration layer
  • Hugging Face Transformers & Agents handle intelligent data extraction and reasoning
  • GPT-based extraction converts unstructured contractor reviews/data into structured intelligence
  • ChromaDB vector database enables semantic search and retrieval for agent context
  • Tool-calling agents autonomously decompose queries and fetch relevant contractor comparisons

3. Frontend Interface

  • React + Vite provides a lightweight, responsive UI for sales teams
  • Real-time API communication with the FastAPI backend
  • Interactive contractor comparison view

Tech Stack

Layer Technology Why This Choice
Frontend React, Vite Fast development, minimal bundle size, hot module reloading
Backend FastAPI Type safety via Pydantic, async performance, automatic OpenAPI docs
AI/ML Hugging Face Agents, GPT Interoperable tool-calling for agent decomposition, built-in debugging
Vector DB ChromaDB Fast semantic search, lightweight, easy integration with agents
Data Source Selenium, BeautifulSoup Dynamic rendering capability, reliable HTML parsing

Key Features

Intelligent Contractor Queries – Ask natural language questions about contractors; agents decompose queries and retrieve relevant data
Automated Comparisons – Side-by-side contractor analysis with AI-extracted insights
Semantic Search – Vector embeddings enable fuzzy matching on reviews and contractor attributes
Scalable Pipeline – Web scraping + processing + vectorization handles hundreds of contractors
Agent Transparency – Built-in logging of agent reasoning steps for debugging and validation


Getting Started

Prerequisites

  • Python 3.13+
  • Node.js 16+
  • API keys: OpenAI (GPT), Hugging Face

Installation

  1. Clone the repository

    git clone <repo-url>
    cd gaf-ai
  2. Set up environment variables

    OPENAI_API_KEY=your_openai_key
    HUGGINGFACE_API_TOKEN=your_hf_token
    USE_HUGGINGFACE=yes
  3. Create and activate Python virtual environment

    python3.13 -m virtualenv venv
    source venv/bin/activate  # On Windows: .\venv\scripts\activate
  4. Install Python dependencies

    pip install -r requirements.txt
  5. Install frontend dependencies

    npm install

Running the Application

Start the backend (ensure you're in the virtual environment):

fastapi run backend/app.py

Backend will run on http://localhost:8000

Start the frontend (in a new terminal):

npx vite --port=4000

Frontend will run on http://localhost:4000

⚠️ Important: Start the backend before the frontend—the UI makes API requests on load.


Current State & Future Work

What's Working

  • ✅ End-to-end agent pipeline for contractor queries
  • ✅ Mock data from CSV imports (reliable)
  • ✅ FastAPI + React integration
  • ✅ Agent reasoning visibility via logging

Next Steps (Priority Order)

  1. Dynamic Web Scraping Integration – Integrate Selenium scraper into ToolCallingAgent for live data (currently 10% reliability; needs retry logic & proxy rotation)
  2. Response Structuring – Improve agent output formatting for UI consistency
  3. Performance Optimization – Reduce agent inference latency (target: <2s per query)
  4. UI Expansion – Build out advanced filtering, drill-down views, and export capabilities

Performance Notes

  • Current bottleneck: Agent inference latency (~5-10s per query)
  • Optimization targets: Model quantization, prompt caching, batched queries
  • Scraping reliability: Selenium reliability at 10%; switching to headless browser pooling + proxy rotation in progress

Project Links

About

An AI-powered B2B sales intelligence platform built for GAF Roofing that automates contractor research, comparison, and lead generation for enterprise sales teams.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages