Kashish
added port
08d6aa3
|
Raw
History Blame Contribute Delete
1.51 kB
metadata
title: CSFAQ Project
emoji: 💻
colorFrom: purple
colorTo: red
sdk: docker
app_port: 7860
pinned: false

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. Activate virtualenv:
cd C:\Users\gupta\Desktop\faq-ai-chatbot
myenv\Scripts\Activate.ps1
  1. Install packages:
pip install -r requirements.txt
  1. Copy .env and add keys:
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:

myenv\Scripts\python.exe build_index.py

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

Run CLI

myenv\Scripts\python.exe cli.py

Run API

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

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

{ "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.