Skip to content
Dimitri Robiere PerrietD. R. PerrietCaen, FR — --:--:--EN · FR

RAG AI assistant for Starmat and Matplus sales staff

Under contract · Mediapilote● Live
Client
Starmat / Matplus
Role
Full-stack developer
Duration
ongoing
Year
2026
Stack
TypeScript · Next.js · Fastify · PostgreSQL · pgvector · PaddleOCR · OVH AI Endpoints
RAG AI assistant for Starmat and Matplus sales staff — illustration
Fig. 01 — RAG AI assistant for Starmat and Matplus sales staff, illustration
(00) — In short

An AI assistant for sales staff in Starmat and Matplus DIY stores: RAG answers with sources using pgvector, a project sheet, and photo, plan and voice input.

(01)

Context

Starmat and Matplus wanted to give sales staff in their DIY stores an AI assistant that could scope a customer’s project, break it into steps and answer questions on materials, tools, safety and regulations. The pilot department is bathrooms.

The starting point was a proof of concept. The client had split the rest into three stages: V0 (sourced text chat, document management, multi-tenancy), V0+ (photo, floor plan and voice), then V1 (NEGOGUIDE product catalogue, roles, cost and quality tracking).

(02)

Challenge

A salesperson cannot rely on a made-up answer. Every statement had to point to a specific passage in a manual, a data sheet or a regulatory text, and the assistant had to know when to abstain. Documents came in every shape: web pages, clean PDFs, scanned PDFs.

Hosting added its own limits: a shared server with a capped number of processes, and models served by OVH AI Endpoints with their own rate and batch-size limits. The pipeline had to fit within that without losing documents along the way.

(03)

Approach

I rewrote the foundation in TypeScript: a Fastify API, a worker that drains the indexing queue and a Next.js app for the chat and the back office. The pipeline fetches pages and PDFs, extracts text (pdftotext, then PaddleOCR and Tesseract for scanned pages), chunks it, computes embeddings and stores everything in PostgreSQL with pgvector. Search combines vector and BM25, then a reranker reorders passages before the answer is written.

For sales staff, the chat streams its answers with clickable citations, keeps a live project sheet and accepts a photo, a dimensioned floor plan or voice input. For administrators, I built document management with CSV import of URLs, versioned system prompts and project sheets, roles, conversation annotation and an evaluation bench with an LLM judge for regression testing. The NEGOGUIDE catalogue is synced by the worker and shows up in the chat as product cards.

(04) — Results

Key figures
142
commits
32
versioned SQL migrations
4
inputs: text, photo, floor plan, voice
40
labelled queries in the retrieval bench
← Previous project05 · RAG AI chatbot for WordPress and PrestaShop sitesNext project07GEO Mediapilote, a brand visibility audit for AI search