1st Place, NEXT Challenge (Solo)

Agent IA BH Assurance, Le Conseiller Augmenté

Agent IA BH Assurance, Le Conseiller Augmenté
Role
Solo Engineer, Full Stack & AI
Timeline
August – September 2025
Duration
Month-long challenge
Team
Solo (vs teams of 3)

Overview

Le Conseiller Augmenté is an AI advisor for insurance agents, built solo for BH Assurance's month-long NEXT Challenge, where it won first place against teams of three. A front-desk agent reads each question and routes it to the right specialist: the product documents, a client's own records, or pricing. The hard part was never the model. It was the data.

The problem

BH Assurance's advisors lose hours digging through hundreds of product documents across six insurance lines to answer a single client. The source material is a mess: French, Arabic, and mixed, spread across inconsistent PDFs and spreadsheets. Off-the-shelf chatbots choke on it, because garbage in means garbage out.

What I built

  1. 01

    Data first, model second

    Before writing any AI, I used a strong model to pull the entire product catalog out of dozens of messy, multilingual PDFs and spreadsheets and rebuild it as clean, consistent records. That groundwork is what made the whole thing work; without it, search just returns noise.

  2. 02

    Retrieval that stays honest

    A question runs through semantic search, a re-ranking step, and careful context-building before the model answers, under a strict instruction to stick to what it retrieved and refuse to invent anything.

  3. 03

    A front desk that routes

    A receptionist agent classifies each question and hands it to exactly one specialist, product knowledge, client data, or scenario analysis, so answers stay fast and focused instead of everything running every time.

  4. 04

    The app around it

    A chat frontend and backend handle accounts and conversation history, one service looks up real client records, and another handles insurance quotes.

Architecture

01 · Client & Backend02 · Orchestrator03 · ExpertsNext.js 14Express.jsPrisma · JWTReceptionist Agentn8n · intent routingRAG ExpertQdrant + Qwen3-4BClient DataOracle DBScenarioQuoteSQLAlchemy

A Next.js frontend and an Express backend send every question to a receptionist agent, which routes it to one of four experts: retrieval over the product catalog, client-data lookups, scenario analysis, or pricing. Only the expert a question needs actually runs.

Tech stack

Qwen3-Embedding-8B (4096-dim)

Ollama-served embedding model for high-dimensional insurance document vectors, stored in Qdrant collection `bh_assurance`

Qwen3-4B-Instruct-2507

GGUF Q4_K_M quantized LLM via Ollama, strict factuality prompts, 15K context window, 0.3 temperature default

FlashRank Re-ranker

Advanced hybrid re-ranking with score breakdown: semantic match + domain expertise + transport-specific bonuses

Qdrant Vector Database

Category-aware payload filtering across 6 insurance branches, automobile, vie, santé, engineering, transport, IARD

Gemini 2.5 Pro (Data Pipeline)

Used for bulk extraction, translation (French/Arabic/mixed), and structuring of unstructured PDFs/CSVs into augmented JSON, Flash model couldn't handle the data quality

Next.js 14 + Express.js + Prisma

Chat frontend (Zustand, react-markdown, Framer Motion) with PostgreSQL-backed conversation persistence and JWT auth

n8n MoE Workflows (4 Agents)

Receptionist router + 3 experts (RAG, client data, scenario), only the relevant expert is activated per query, like a MoE gating mechanism

Docker Compose

Individual docker-compose.yml per service, one-command deployment for each component

Results

1st Place

Won solo against teams of 3 at BH Assurance's NEXT Challenge

Solo vs Teams of 3

Engineered the entire 4-service platform, data pipeline, and n8n workflows alone

4096-dim Embeddings

Qwen3-Embedding-8B vectors in Qdrant, high-dimensional insurance domain search

6 Insurance Categories

Complete coverage: automobile, vie, santé, engineering, transport, IARD

100% Local Inference

All LLM processing via Ollama, zero data leaves BH Assurance infrastructure

Augmented Data Pipeline

Extracted, translated, and structured entire product catalog using Gemini 2.5 Pro

Moments

First place at the BH Assurance NEXT Challenge, September 2025. Solo, against teams of three.
First place at the BH Assurance NEXT Challenge, September 2025. Solo, against teams of three.

What I took away

  1. 01

    RAG's power comes from data quality, not model size. Investing a significant portion of the month into data augmentation, extracting from unstructured PDFs/CSVs, translating between French and Arabic, normalizing product categories, and structuring into rich JSON with keywords and key_points, was what made the system actually useful. The Gemini 2.5 Pro model was essential for this: the Flash model couldn't reliably parse the messy, multilingual source documents.

  2. 02

    Going solo against teams of 3 forced absolute prioritization. I chose to build 4 focused services rather than one monolithic app, this let me test each service independently and iterate faster without the coordination overhead that teams face.

  3. 03

    Qwen3-4B is a beast for its size via Ollama, the GGUF Q4_K_M quantization runs on consumer hardware while maintaining strong instruction-following. Combined with the 15K context window and strict factuality prompts, it answers insurance questions accurately without hallucinating.

  4. 04

    FlashRank re-ranking was the biggest accuracy win after data quality. The difference between naive vector search and re-ranked results was dramatic, it eliminated the 'right category, wrong product' failure mode that plagued early iterations.

  5. 05

    Docker Compose per service is the solo developer's secret weapon for hackathons. Each service has its own docker-compose.yml, which means I could demo any subset of the system even if other parts were still in development.