Logo Lanfrica

aminebouanani/chatbot-hcp-project

Domain:

natural language processing

Record type:

software
Creator:
ami
Host:
Chatbot en Darija pour les données du HCP. Projet de stage. # HCP Darija Chatbot: A RAG-Powered Assistant for Moroccan Socio-Economic Data This project is an advanced RAG (Retrieval-Augmented Generation) chatbot designed to bridge the gap between complex socio-economic data and the Moroccan public. By leveraging a powerful AI stack, this chatbot can understand and answer questions in **Darija (Moroccan Arabic)**, providing insights directly from **Human Capital Project (HCP)** data. The core of the project is a Retrieval-Augmented Generation (RAG) architecture that ensures answers are accurate, context-aware, and grounded in the provided data, minimizing the risk of AI hallucinations. ## ✨ Key Features - **Natural Language Interaction in Darija**: Users can ask complex questions in Moroccan Arabic, making critical data accessible to a wider audience. - **Retrieval-Augmented Generation (RAG)**: Provides accurate, fact-based answers by retrieving relevant information before generating a response. - **High-Speed Vector Search**: Powered by **FAISS (Facebook AI Similarity Search)** for instant, efficient retrieval of the most relevant data passages. - **Advanced AI Model**: Utilizes the **Google Gemini API** for state-of-the-art natural language understanding and generation. - **Specialized Knowledge Base**: Integrated with **Human Capital Project (HCP)** data to provide specific socio-economic insights and analysis. ## ⚙️ How It Works (Architecture) The chatbot follows a sophisticated RAG workflow to ensure high-quality responses: 1. **User Query**: A user asks a question in Darija (e.g., "Chno homa l'ahdaf dyal l'proje dyal HCP?"). 2. **Vector Embedding**: The user's question is converted into a numerical representation (vector embedding) using a `sentence-transformers` model. 3. **Similarity Search**: **FAISS** instantly searches its pre-built index of HCP data vectors to find the most semantically similar and relevant text chunks. 4. **Context-Augmented Prompt**: The original question and the retrieved t …