Intro

Hello! I’m El Mehdi Salih, a Master’s student in Intelligent Processing Systems (IPS) at the Faculty of Sciences of Rabat, specializing in Artificial Intelligence, Retrieval-Augmented Generation (RAG), and data-driven systems.

I design and build AI-powered applications that combine modern software engineering practices (Spring Boot, Angular, microservices) with local and privacy-preserving AI pipelines. My work focuses on transforming research concepts into practical, efficient systems, particularly in document intelligence, adaptive retrieval, and AI-assisted decision support.

Feel free to explore my portfolio to see projects and skills that define my journey!

Projects

DocBot Offline RAG Chatbot

DocBot: Offline PDF Chatbot using Local RAG

Technologies: Python, LangChain, Ollama, PostgreSQL, pgvector, Gradio, Docker

Designed and implemented a fully offline, privacy-preserving AI chatbot that enables users to interact with PDF documents using Retrieval-Augmented Generation (RAG):

  • Local RAG Pipeline: Built with Qwen3-1.7B (LLM) and nomic-embed-text for embeddings, eliminating cloud dependency
  • Vector Storage: PostgreSQL + pgvector with cleanable, session-based indices
  • Real-Time Streaming: Token-level response streaming using threaded callbacks
  • Evaluation: Benchmarked across academic PDFs using human-judged F1 score and latency analysis
  • Low-Resource Optimization: Designed to run efficiently on ≤8GB RAM systems
Research Extension:
  • Proposed Adaptive Context Budgeting (ACB) to dynamically adjust retrieval depth
  • Reduced latency by ~30% and prompt size by ~38% while preserving answer quality

GLHF Prosocial Gaming Platform

GLHF: AI-Powered "Loyalty-as-a-Service" for Gaming

Technologies: Python, TinyBERT, LoRA (PEFT), Qwen/Llama (Ollama), FAISS, LangChain, Flask

Developed a B2B platform designed to combat the "Toxicity Crisis" in competitive gaming. GLHF shifts the moderation paradigm from purely punitive bans to restorative justice and positive reinforcement:

  • Hybrid AI Architecture: Orchestrated a three-layer system combining a high-speed classifier, a contextual RAG engine, and an incentive ledger.
  • Gatekeeper Layer: Fine-tuned TinyBERT with LoRA adapters to achieve <50ms latency for real-time moderation, handling 90% of traffic locally.
  • Contextual RAG Engine: Integrated a Retrieval-Augmented Generation pipeline using FAISS and Ollama to resolve cultural nuances and distinguish "competitive banter" from identity-based hate.
  • Incentive Engine: Built a universal "Honor Profile" that translates prosocial behavior into economic rewards (skins, currency), effectively reducing "smurfing" incentives.
  • Domain Adaptation: Leveraged PEFT to create tiny (~3MB) game-specific adapters (Valorant, LoL) instead of maintaining multiple large-scale models.
Impact & Ethical Focus:
  • Addressed the $29B annual industry loss caused by toxicity by focusing on player retention and community sustainability.
  • Implemented Radical Transparency by providing natural-language explanations for moderation decisions to rebuild player trust.
  • Optimized for low-resource environments, allowing the entire "Judge" model and vector database to run locally without cloud API costs.

Multi-Robot Delivery Coordination

Autonomous Multi-Robot Warehouse Coordination System

Technologies: Python, Mesa Framework, Pygame, A* Algorithm, Matplotlib, Seaborn, FIPA-ACL

Developed a robust Multi-Agent System (MAS) to simulate and optimize autonomous delivery robots within a warehouse environment. The project focused on comparing coordination strategies for task allocation and collision-free navigation:

  • AEIO Architecture: Structured the system into Coordination, Execution, and Environmental planes for scalable agent logic.
  • Coordination Mechanisms: Implemented and benchmarked Contract Net Protocol (CNP) and Market-Based Auctions against greedy baselines to optimize battery efficiency.
  • Pathfinding & Navigation: Integrated A* Search with Manhattan distance for optimal routing, complemented by reactive collision avoidance.
  • Failure Recovery Logic: Designed a "Rescue Order" system where functional robots autonomously take over tasks from agents with battery failures or faults.
  • Decision Modeling: Built agent logic using Finite State Machines (FSM) to manage transitions between Idle, Pickup, Delivery, and Recovery states.
Key Achievements:
  • Evaluated performance metrics across Low, Medium, and High traffic scenarios to identify optimal agent-to-task ratios.
  • Reduced delivery delays by implementing capacity penalties, ensuring large robots prioritized heavy packages.
  • Visualized system dynamics (battery depletion, message cost, throughput) using real-time Mesa dashboards.

AgriStore Smart Microservices Platform

AgriStore: Smart Agricultural E-commerce Platform

Technologies: Spring Boot (microservices), Angular, Docker, OpenAI API, PostgreSQL

Developed a containerized, AI-powered web application for selling agricultural products. Key features:

  • AI Chatbot Assistant: Integrated OpenAI API using RAG techniques to offer product guidance and seasonal recommendations.
  • Smart Search: Implemented ChatGPT-4o Mini-based search engine for intuitive product discovery.
  • DevOps: Fully dockerized microservices for easy deployment and scalability.
Impact: Improved user engagement and streamlined customer support with intelligent automation.

View On GitHub
AgriMar Agricultural Chatbot

AgriMar: AI-Powered Agricultural Assistant

Technologies: Python, Flask, OpenAI API, OpenStreetMap, OpenCage

Developed an intelligent agricultural assistant that combines AI conversation with precise geospatial analysis to empower Moroccan farmers:

  • Smart Chat Interface: Engineered a context-aware chatbot that understands agricultural queries and provides location-specific recommendations
  • Precision Weather System: Implemented dynamic forecasting that analyzes microclimate conditions based on exact GPS coordinates
  • Automated Soil Reports: Designed a system that generates comprehensive soil analysis PDFs with visualized data trends and actionable insights
  • Conversation Memory: Developed a robust chat history system that maintains context across sessions for continuous advisory support
  • Advanced Geomapping: Solved regional data challenges by integrating OpenStreetMap with custom spatial filters for accurate location services
Key Achievements:
  • Boosted response relevance by 40% through advanced prompt engineering techniques
  • Reduced farmers' research time by providing instant, hyper-localized agricultural intelligence
  • Transformed raw data into decision-ready insights through automated visualization and reporting

Library Management System

Library Management System – Business Intelligence Project

Technologies: PMB, PHP, MySQL, Python (pandas), Power BI

Designed and deployed a library system based on real-world CSV datasets in Arabic and French:

  • Preprocessing: Cleaned and normalized 20k+ multilingual records for integration into PMB.
  • MCD Customization: Simplified and adapted the database schema to essential business needs.
  • Visualization: Generated insights and performance reports using Power BI and Chart.js.
Impact: Enabled efficient library cataloging and inventory tracking across language barriers.

View On GitHub
House Energy Data Mining

House Energy Consumption Analysis – Data Mining

Technologies: Python, Scikit-learn, Pandas, Matplotlib , Mlextend

Analyzed a large energy dataset to uncover usage patterns and predict consumption:

  • Clustering: Applied K-means to segment homes based on usage behavior.
  • Association Rules: Extracted high-confidence rules for appliance usage timing.
  • Prediction: Implemented k-NN to predict daily energy consumption per household.
Impact: Provided actionable insights into energy saving for households.

View On GitHub

About

My work focuses on designing intelligent systems that remain efficient, reliable, and scalable under real-world constraints. I am particularly interested in applied artificial intelligence, data-driven architectures, and Retrieval-Augmented Generation (RAG), with an emphasis on performance optimization, privacy, and system robustness.

Through academic and engineering projects, I have developed a structured approach that spans problem analysis, algorithmic design, and end-to-end implementation. This includes building local RAG pipelines, optimizing context usage, designing data and microservices architectures, and evaluating system performance using both quantitative and human-centered metrics.

I value discipline, consistency, and long-term improvement, principles reinforced through regular gym training and weightlifting, which naturally influence how I approach complex engineering problems, iterate on solutions, and deliver reliable systems.