CoolFace
Apppublic

kashishgupta/Crowd_sourced_FAQ_Project

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

FAQ RAG Chatbot

RAG chatbot for a FAQ knowledge base. Uses FAISS for vector search with dense embeddings and a BM25 hybrid retriever.

Requirements

  • Python 3.11+ (this repo uses 3.13 in the dev environment)
  • Virtualenv with dependencies in requirements.txt

Quick setup

  1. 1.Activate virtualenv:
powershell
cd C:\Users\gupta\Desktop\faq-ai-chatbot
myenv\Scripts\Activate.ps1
  1. 1.Install packages:
powershell
pip install -r requirements.txt
  1. 1.Copy .env and add keys:
powershell
copy .env.example .env

Environment variables (.env)

  • GOOGLE_GENAI_API_KEY — API key for the Google GenAI LLM
  • HF_TOKEN — Hugging Face token to avoid unauthenticated download slowdowns

Build the vectorstore

Run once to compute embeddings and persist the FAISS index:

powershell
myenv\Scripts\python.exe build_index.py

On first run this can take ~15–25s depending on hardware and network.

Run CLI

powershell
myenv\Scripts\python.exe cli.py

Run API

powershell
myenv\Scripts\python.exe -m uvicorn app:app --reload

Then POST JSON to http://127.0.0.1:8000/chat:

json
{ "question": "What is VINS?" }

Notes

  • The first run must compute embeddings if the index does not exist.
  • To avoid repeated downloads and speed up startup: set HF_TOKEN and run build_index.py once.
  • Do not commit vectorstore/, myenv/, or .env.