PROJECT · 01/08 · shopyverse ← cd ..

// projet académique · décembre 2025

ShopyVerse.

Plateforme e-commerce IA avec architecture microservices : recommandation par LLM, chatbot RAG et API core.

Python · FastAPITypeScript · NestJS LangChainLlama-3.1-8B QdrantDockerPostgreSQL
reco-service ↗ chatbot-service ↗ api-core ↗ infra ↗

// Overview

ShopyVerse est une plateforme e-commerce construite avec une architecture microservices, intégrant l'IA au cœur de l'expérience utilisateur. Le projet se compose de 4 services indépendants : un service de recommandation propulsé par LLM, un chatbot RAG conversationnel, une API core NestJS et une infrastructure Docker.

// Reco Service · LLM

Micro-service Python (FastAPI) qui utilise un LLM (Llama-3.1-8B-Instruct) via LangChain et Hugging Face pour recommander des produits pertinents.

// pipeline

  1. Récupération du produit cible en base PostgreSQL
  2. Pré-filtrage des candidats (même catégorie, prix ±20%)
  3. Construction d'un prompt listant le produit et les candidats
  4. Envoi au LLM via LangChain / HuggingFaceEndpoint
  5. Parsing JSON et filtrage des hallucinations (IDs inexistants en DB)

// Chatbot · RAG

Microservice TypeScript (Fastify) implémentant le Retrieval-Augmented Generation avec Qdrant comme vector store.

// En place

  • Chatbot RAG : recherche vectorielle + réponse contextuelle
  • Ingestion FAQ (route /api/v1/ingest)
  • Authentification par x-api-key
  • Logs Pino + métriques Prometheus

// En développement

  • NLU : classification FAQ / produit / autre
  • Index sémantique du catalogue produits
  • Widget chat front-end (iframe / Web Component)
  • Tableau de bord IA (analytics)

// Architecture

flowchart LR
  RECO["reco-service\nFastAPI/Python\n+ Llama-3.1 LLM"]
  CHAT["chatbot-service\nFastify/TS\n+ Qdrant RAG"]
  RECO --> CORE
  CHAT --> CORE
  CORE["api-core (NestJS)\n+ PostgreSQL"]
  CORE --> INFRA["infra (Docker)"]
        

// Points techniques

// Anti-hallucination

Le reco-service filtre les IDs produits retournés par le LLM qui n'existent pas en base, évitant les recommandations fantaisistes.

// Vector Search

Qdrant pour la recherche sémantique dans la base FAQ, avec embeddings HuggingFace.

// Pré-filtrage

Réduction du bruit avant l'appel LLM : même catégorie + gamme de prix ±20%.

// Observabilité

Logs structurés Pino + endpoint /metrics Prometheus pour le monitoring du chatbot.