Skip to content

X-Seb/PolyEDI-Chatbot

Repository files navigation

🤖 PolyEDI - AI Teamwork & Equity Coach

An AI-powered chatbot designed to teach university students how to promote Equity, Diversity, and Inclusion (EDI) within collaborative teams.

Live Demo: poly-edi-chatbot.vercel.app

Case Study: https://www.builtbyseb.dev/projects/edi-ai-chatbot


💡 The Concept

In late 2025, for a humanities class focused on team collaboration, my team was challenged to teach the class about EDI principles. Instead of a standard slideshow, I lead the technical implementation of a custom RAG (Retrieval-Augmented Generation) Chatbot.

The bot acts as a virtual coach, answering student questions based on a curated knowledge base of academic resources, class notes, and research papers.


🛠️ Tech Stack

  • Engine: Botpress (NLP & Knowledge Base)
  • Frontend: React (Vite/Next.js)
  • Styling: Tailwind CSS (Custom University Palette)
  • Hosting: Vercel

🧠 How It Works (RAG Pipeline)

The bot doesn't just hallucinate answers; it follows a strict data pipeline:

  1. Curated Data: We scraped authoritative websites on teamwork dynamics and digitized a semester's worth of class notes.
  2. Knowledge Base: Data was cleaned, condensed, and uploaded to Botpress vector stores.
  3. Prompt Engineering: The system prompt enforces a specific 4-step response algorithm:
    • Identify: Acknowledge the specific student concern.
    • Connect: Link the issue to a pillar of EDI.
    • Propose: Offer concrete, actionable solutions.
    • Follow Up: Ask a question to keep the user engaged.

🚧 Challenges & Solutions

The Session Persistence Bug Integrating the Botpress webchat into a custom React UI caused session issues. The bot would create a new session on every page reload, wiping context.

Solution: I implemented custom session management logic in the React useEffect hooks to check for existing conversation IDs in localStorage before initializing a new connection. This ensured conversation history persisted across reloads.


About

A RAG-based AI chatbot built with Botpress and React to teach Equity, Diversity, and Inclusion principles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors