Skip to content

03 — Production AI

Conversational AI platform

A conversational AI serving ten enterprise brands across eight channels, qualifying leads around the clock in Darija and French and handing the qualified ones to sales with the context attached.

Role
AI engineer — design, build and test
Period
2026 — present
lead-to-visit, against 30% by hand
58%
per qualified lead
$0.10–0.80

Hybrid retrieval and validation

Retrieval runs on pgvector as a hybrid pipeline: semantic search for meaning, BM25 lexical search for exact model names and part numbers, and HyDE for queries phrased in terms absent from the source material.

Content is ingested with Playwright so the client’s live site remains the source of truth rather than a periodic export. Nine layers of output validation run before any response reaches a customer, as an incorrect price presented to a customer carries commercial and contractual risk.

QuestionSemanticpgvectorLexicalBM25HyDEhypothetical doc9-layervalidationAnswer
Hybrid retrieval. Semantic search resolves meaning, lexical search matches exact model and part numbers, HyDE handles queries phrased in absent terms; nine validation layers run before any response is returned.

“Semantic, lexical and HyDE retrieval, followed by nine validation layers before any response reaches a customer.”

Voice, vision and Darija

Customers frequently communicate through voice notes and photographs rather than text. GPT-4o handles transcription, Gemini TTS provides responses across thirty voices, and Gemini Vision matches photographed products against the client catalogue.

The system supports Moroccan Darija, the register customers predominantly use in this market and one that general-purpose assistants handle poorly.

Escalation and reliability

An eight-condition eligibility engine determines per conversation whether the AI continues or a human agent takes over, evaluating sentiment, deal value, complexity, explicit request and repetition, so escalation occurs before customer satisfaction degrades.

The platform runs on Java 21 virtual threads and Spring Boot 3.3, with 138 Flyway migrations, Quartz batch jobs and Resilience4j circuit breakers, sustaining 100+ webhooks per second.

Built with

  • Gemini
  • Claude
  • OpenAI
  • Java 21
  • Spring Boot 3.3
  • pgvector
  • Redis
  • Quartz
  • Docker