Cohort 4 2026

ML Mfano Bora ChatBot

An intelligent AI-powered chatbot integrated into the Mfano Bora Africa website, built from the ground up as a full machine learning system. The chatbot combines a TF-IDF + Linear SVM intent classifier with a semantic FAQ search engine (Sentence Transformers) and a verified knowledge base to answer visitor questions in natural language. The ML model classifies user messages into 83 distinct intents covering company info, attachment programs, ICT courses, careers, awards, mentorship, road safety and more. A hybrid retrieval pipeline routes each message through FAQ search, then ML classification, then fallback layers — ensuring the user always gets the most relevant verified answer. The chatbot is deployed as a FastAPI backend exposed via ngrok, with a floating chat widget integrated into the live website. Every interaction is logged to SQLite for continuous improvement, and the system uses session state to handle follow-up conversations naturally — asking questions, tracking replies, and guiding users through topics like a real assistant.

Launch App → ← Back to All Projects
Mfano Bora AI chat widget open on the live website, showing a real conversation Chatbot listing the ICT Hub courses offered by Mfano Bora Africa Chatbot demonstrating follow-up conversation flow, answering questions in sequence

Project Overview

The Problem

Website visitors previously had to navigate multiple static pages to find basic information about Mfano Bora Africa — services, attachment opportunities, ICT courses, careers, awards, contact details and application procedures. This was slow and frustrating. Many visitors left without finding what they needed. Customer care received repetitive questions. And there was no way to understand what visitors were actually asking about most often. Existing solutions were also brittle: simple FAQ-based chatbots broke whenever phrasing varied, while generic rule-based bots produced wrong or incomplete answers.

The Solution

We designed and deployed a production-grade AI chatbot with a multi-layer retrieval architecture: 1. Hybrid Retrieval Pipeline - FAQ semantic search (Sentence Transformers + keyword overlap) - ML intent classifier (TF-IDF + Linear SVM, 83 intents) - Disambiguation logic — only returns FAQ if confident AND top-1 beats top-2 by a clear margin - FAQ fallback layer for safety - Final generic fallback if nothing matches 2. Trained ML Model - Custom training dataset (~4,000 labeled examples across 83 intents) - Automated best-of-configuration sweep during training - Saved artifacts: model.pkl, vectorizer.pkl, label_encoder.pkl - Test accuracy: 84.6% 3. Verified Knowledge Base - 83 intent response entries in knowledge_base.json - 1,778 verified FAQ entries in faq.json - Chained follow-up questions guide users through topics naturally 4. Session-Aware Follow-Ups - Pending follow-up state stored per session - Handles "yes", "no", "tell me more" naturally - Carry-forward logic keeps the conversation on topic 5. Production Deployment - FastAPI backend running on a Windows production machine - Uvicorn server with hot-reload - ngrok tunnel for public HTTPS access - SQLite logging of every message (intent, confidence, source, FAQ ID, next intent) The chatbot handles ~80% of common queries autonomously, reduces customer care load, and continuously improves through conversation logging.

Target Users & Impact

Target Users: - Prospective students seeking attachment and internship opportunities - Graduates and early-career professionals exploring careers and mentorship - Businesses looking for ICT training, consultancy or partnerships - Award nominees, indus

Technologies Used

Python FastAPI scikit-learn TF-IDF Vectorization Linear SVM Classifier Calibrated Classifier Sentence Transformers BAAI/bge-small-en-v1.5 pandas NumPy joblib Uvicorn SQLite PHP JavaScript HTML5 CSS3 ngrok

Built by

AT
Attachment Team
ML Engineer & Full-Stack Developer
M
Mfano Bora Assistant
Online