Discord RAG FAQ Bot: PDFs are ingested, chunked, and indexed (Sentence-Transformers + FAISS) in a FastAPI backend. On /ask, relevant passages are retrieved, sent to Groq LLM, and returned as Discord embeds with source citations. Users give π/π feedback (with modal comments). Entire stack is Dockerized for cloud deployment.
/ask
command in Discord with RAGβpowered answers- PDF ingestion via
/api/ingest
- Feedback collection (π/π + modal)
- Metrics at
/metrics
- Clone
git clone https://github.com/<YOU>/faqbot.git cd faqbot
- Environment Copy .env.example β .env and fill in:
DISCORD_TOKEN=β¦ CLIENT_ID=β¦ GUILD_ID=β¦ GROQ_API_KEY=β¦ GROQ_MODEL=β¦
- Run locally with Docker
docker build -t faq-backend:latest ./backend
docker run -d -p 8000:8000 --name faq-backend
-e GROQ_API_KEY=$GROQ_API_KEY
-e GROQ_MODEL=$GROQ_MODEL
faq-backend:latest
docker build -t faq-bot:latest .
docker run -d --name faq-bot
-e DISCORD_TOKEN=$DISCORD_TOKEN
-e CLIENT_ID=$CLIENT_ID
-e GUILD_ID=$GUILD_ID
-e RAG_API=http://host.docker.internal:8000/api/rag-query
-e FEEDBACK_API=http://host.docker.internal:8000/api/feedback
faq-bot:latest
- Ingest documents
curl -X POST http://localhost:8000/api/ingest -F "file=@./data/backend.pdf"
- Try it In your Discord server, /ask What is the FAQ bot?