Logo Lanfrica

AhmadCM01/Afrilabs-AI

Domain:

digital infrastructure

Record type:

softwaretools
Creator:
Ahm
Host:
AfriLabs AI is a Retrieval-Augmented Generation (RAG) powered AI chatbot designed for AfriLabs, the largest network of over 500 innovation hubs across 53 African countries. It enables users, hub managers, researchers, and partners to query, gain insights from, and navigate AfriLabs' rich ecosystem data # AfriLabs AI — Africa's Wisdom Assistant AfriLabs AI is a RAG-powered chatbot designed for **AfriLabs**, Africa's largest network of 500+ innovation hubs across 53 countries. AfriLabs AI helps users query and gain insights from AfriLabs' programs, ecosystem reports, member hubs, blog content, and funding opportunities. ## Architecture AfriLabs AI follows a decoupled Client-Server RAG (Retrieval-Augmented Generation) architecture: ```mermaid graph TD A[Next.js 15 Workstation Client] |HTTP /api/chat| B[FastAPI Backend Server] B -->|RAG Chain Execution| C[LangChain Orchestrator] C -->|Query Embeddings| D[FastEmbed Model] C -->|Vector Search| E[Chroma Vector Database] C -->|Llama 3 70B Query| F[Groq Cloud API] B -->|Ingestion Pipeline| G[Data Scrapers & Extractors] ``` ### Flow Breakdown 1. **Data Ingestion & Processing**: Web scrapers and extractors output cleaned text and metadata to `data/processed/`. 2. **Indexing**: Chunks are processed and embedded locally using FastEmbed and stored in a persistent ChromaDB instance. 3. **Retrieval**: When a query comes in, the retriever fetches relevant context matching the query. 4. **Generation**: The RAG chain feeds the retrieved context and user query into the Groq-hosted Llama 3 70B model to generate an answer with source citations. 5. **Presentation**: The Next.js frontend (deployed on Vercel) calls the FastAPI backend (deployed on Render), providing a premium, interactive chat user interface. ## Live Deployments - **Frontend (Next.js + Vercel)**: afrilabs-ai.vercel.app - **Backend (FastAPI + Render)**: afrilabs-ai.onrender.com ## Tech Stack Overview This implementation uses: - **Local Embeddings** (FastEmbed BGE-small-en-v1.5) — runs on a lightweight ONNX runtime without PyTorch (fits under 512MB RAM, 100% free) - **Groq API** (llama-3.3-70b-versatile) for fast LLM inference - **ChromaDB** for persistent vector storage - **Next.js & TypeScript** for the premium frontend UI - **FastAPI** for the b …