MagariHub
AI-powered used car marketplace with LLM search, RAG recommendations, and price intelligence.
The Problem
Tanzania's used car market is fragmented across hundreds of dealer lots and individual listings with no reliable way for buyers to discover the right car or verify pricing. Buyers waste hours browsing low-quality listings; sellers struggle to reach qualified leads. No platform provided AI-assisted discovery or real-time price benchmarking.
My Role
Full-stack engineer and LLMOps architect. Owned the entire product from database schema through AI pipeline design, frontend UX, and deployment. Built the RAG ingestion pipeline, LangChain agent, embedding strategy, and vector search layer from scratch.
Core Features
Natural Language Search
Buyers describe what they want in plain English ('fuel-efficient sedan under 3M Tanzanian shilling with low mileage') and a LangChain agent translates intent into structured filters + semantic vector search against the Pinecone index.
RAG-Powered Recommendations
Each listing is embedded and stored in Pinecone. The agent retrieves semantically similar vehicles and re-ranks by freshness, price delta, and buyer profile, surfacing genuinely relevant matches rather than just keyword hits.
AI Price Intelligence
A fine-tuned regression model trained on historical transaction data estimates fair market value per listing. Sellers see a suggested price range; buyers see an overpriced/underpriced badge.
Seller Verification Workflow
Multi-step onboarding with document upload, identity check via third-party API, and automated listing quality scoring. Unverified listings are deprioritized in search results.
Real-time Messaging
Redis-backed pub/sub messaging between buyers and sellers with read receipts and push notifications. No third-party chat SDK.
Tech Stack
Architecture Overview
Next.js 14 App Router frontend communicates with a FastAPI backend via REST. Listing ingestion triggers an async worker that chunks descriptions, embeds them with OpenAI text-embedding-3-small, and upserts to Pinecone. Search queries hit a LangChain ReAct agent that decides between structured SQL filters (PostgreSQL) and vector retrieval (Pinecone) based on query intent, then merges results. Redis handles session caching, rate limiting, and the real-time messaging pub/sub bus. Stripe handles payment processing for featured listings. Everything is containerized with Docker Compose and deployed to a VPS behind an Nginx reverse proxy.
Impact
Reduced average search-to-inquiry time from 45 minutes of manual browsing to under 5 minutes via AI-assisted discovery. Listing quality score system reduced spam/duplicate listings by 70% in testing. Price intelligence feature flagged 34% of test listings as significantly mispriced, giving buyers negotiation leverage.
What I Learned
Learned how to design a multi-stage RAG pipeline that balances retrieval precision with latency. Naive full-vector search was 800ms; hybrid BM25 + vector with a reranker dropped it to 180ms. Also learned the hard way that embedding stale listings pollutes retrieval quality, so I implemented TTL-based re-embedding for listings older than 30 days.