·AI·Health

allobobo

allobobo

A Retrieval-Augmented Generation (RAG) chatbot for French health data from Haute Autorité de Santé (HAS). Provides intelligent responses based on processed health data using embeddings and semantic search.

🚀 Key Features

  • 🤖 RAG Chatbot: Context-aware AI responses using Mistral LLM
  • 🏥 French Health Data: Integrates HAS open data for reliable medical info
  • 🔄 Advanced Processing: Automated ingestion, chunking, and embedding of XML docs
  • 🗄️ Vector Database: Self-hosted Qdrant for semantic search
  • 🔒 Type-Safe Architecture: End-to-end TypeScript reliability

🏗️ Architecture Highlights

Frontend

  • React: Interactive chat interface with real-time streaming
  • Vite: Fast development and bundling
  • TypeScript: Type-safe components

Backend

  • Hono: Lightweight API for chat and vector queries
  • Qdrant: High-performance semantic search
  • Vercel AI SDK: Integration with Mistral LLM

Development & Deployment

  • Bun: High-performance runtime and package manager
  • Turbo: Monorepo orchestration for builds
  • Docker: Containerized environments

⚖️ Trade-offs

Qdrant, self-hosted — pure RAG, no relational data

Self-hosting is a default preference, and this was also a deliberate chance to work with a dedicated vector database rather than bolting pgvector onto Postgres. HAS data has no tabular structure to join against — it’s pure unstructured text — so there was no relational store pulling the decision toward Postgres+pgvector in the first place.

Chunking: fixed size with boundary awareness, not naive splitting

Chunks target 1000 characters with a 100-character overlap between them, but the split point isn’t a hard cut — it looks for the nearest paragraph break, then sentence boundary, then line break before falling back to a hard cut, and won’t walk back further than 60% of the target size to find one. Small trailing chunks get merged into their neighbor afterward rather than left as noise. Fairly standard RAG chunking, but the boundary-seeking avoids the common failure of splitting mid-sentence.

Mistral for a health RAG

Sovereignty and trust matter more here than on a recipe app — this is French public health data (HAS), and staying with an EU model provider is a deliberate choice, not just continuity with DishNow’s stack (though that helped too).

React + Vite instead of Vue/Nuxt

A conscious departure from my default frontend stack: Vite’s simplicity is worth using directly, and staying hands-on with React keeps that skill from atrophying — most of my other projects don’t force it.

Tags:#TypeScript#React#Vite#Bun#Hono#Turbo#Qdrant#Vercel AI#Mistral AI