Skip to content

parity-byte/Agentic-Product-Search

Repository files navigation

🛍️ Semantic Shopping AI Agent

A stateful, multi-agent E-commerce Shopping Assistant built on LangGraph, FastAPI, Qdrant, and Supabase.

The "Why"

Traditional E-commerce relies on users manually clicking checkboxes (e.g., ✅ "Black", ✅ "Under $100") and scrolling through paginated SQL results. This project introduces a conversational Semantic Routing Engine. Users state their intent naturally ("I need a cheap, dark winter jacket for a ski trip"), and the intelligent LangGraph state machine handles the hybrid vector/relational querying autonomously.

Architecture

graph TD
    User([User Request]) --> UI[Streamlit Frontend]
    UI --> Orchestrator{LangGraph State Manager}
    
    Orchestrator --> Router[Groq LLM Llama-3.3-70B]
    Router -- Extracts Constraints & Intent --> Orchestrator
    
    Orchestrator -- Intent: Search --> Embedder[FastEmbed BAAI/bge-small]
    Embedder -- Vectors --> Qdrant[(Qdrant Vector DB)]
    
    Qdrant -- Hybrid Search --> Supabase[(Supabase PostgreSQL)]
    Supabase -- Filtered Product Data --> Orchestrator
    
    Orchestrator -- Intent: Chat --> LLM[Groq LLM Conversational]
    LLM --> UI
Loading
  1. State Orchestrator (LangGraph): Manages conversational flow, memory, and cart state across multiple agent nodes.
  2. The LLM Brain (Groq): Llama-3.3-70B running at 0.0 temperature processes structured Pydantic outputs to extract exact user constraints (e.g. max_price_inr: 100).
  3. The Vector Engine (Qdrant + FastEmbed): Embedded high-dimensional product matrices queried for semantic similarity.
  4. Relational Constraints (Supabase): PostgreSQL handles the hard boundaries (e.g. strict price limits) wrapped inside Qdrant Hybrid filters.

Local Setup (Lightning Fast with uv)

This project uses uv, an extremely fast Python package and project manager written in Rust.

  1. Install uv:

    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone and Setup:

    git clone https://github.com/yourusername/Shopping-AI-Agent.git
    cd Shopping-AI-Agent
    uv venv
    source .venv/bin/activate
    uv pip install -r requirements.txt
  3. Configure Environment: Create a .env file from the .env.example and add your Groq/Supabase keys.

  4. Seed the Databases (One-Time):

    uv run scripts/data_seeder.py

    This automatically generates realistic e-commerce data and syncs your local Qdrant vectors with your Supabase tables.

  5. Run the Front-End Chat:

    uv run streamlit run app.py

Live Deployment

Live Streamlit Application

About

A stateful, multi-agent E-commerce Shopping Assistant built on LangGraph, FastAPI, Qdrant, and Supabase.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages