Building an AI answer engine with RAG and semantic vector search
Business111.com
Challenge
The UK's 5.5 million businesses face a constant stream of operational questions — VAT, hiring, licences, funding, compliance. The answers exist, but they're scattered across gov.uk, local councils, and trade bodies, often written in jargon and out of date. Generic AI chatbots answer confidently but hallucinate, cite nothing, and miss UK-specific and local detail. Business111 needed a trustworthy answer engine: grounded, cited, hyperlocal, and always current.
Solution
DevNest engineered a full-stack AI platform around retrieval-augmented generation (RAG): every answer is generated exclusively from retrieved, trust-scored documents and streamed token-by-token over Server-Sent Events with inline citations back to each source. A multi-turn conversational layer resolves follow-up questions into standalone queries, and geo-intelligence blends national guidance with postcode-level local detail. Alongside search, an owned semantic stack — OpenAI embeddings, Elasticsearch dense-vector kNN, and an interpretable business-concept vector space — powers explainable content matching, AI enrichment, and automated distribution.
Business111.com is a trusted answer engine for UK business — ask a question in plain English and get a clear, sourced answer instead of a confident guess. DevNest built the entire platform: four applications and a Python worker fleet in one TypeScript monorepo, spanning roughly 55 backend feature modules. The flagship conversational search understands each question with an LLM, retrieves from a continuously updated Elasticsearch index, and generates answers that never leave their sources behind. The in-house AI infrastructure goes further: content embeddings are projected onto a hand-curated vocabulary of business concepts, so semantic matches come with human-readable explanations rather than opaque scores; Whisper transcription, text-to-speech, and ffmpeg combine to render social video automatically from a single article. Every AI call fails soft, spend is controlled through caching, heuristic gates, and rate limits — and no managed AI-search vendor sits in the middle.
Technologies
· TypeScript monorepo — Next.js 15 (App Router, SSR), React 19, NestJS, Prisma, MUI
· RAG pipeline — OpenAI GPT answers streamed over SSE, grounded with inline citations
· Vector search — text-embedding-3-small embeddings, Elasticsearch dense_vector kNN, cosine similarity
· Elasticsearch 8, MySQL, Redis (conversation state, queues, rate limiting)
· Python AI data plane — Whisper speech-to-text, TTS narration, AI-rendered social video, resilient web scraping
· Docker Compose environments (dev/staging/prod), GitLab CI
