A production-grade RAG pipeline — ingest company docs, embed them into MongoDB Atlas Vector Search, and serve context-aware AI responses in real-time. Built end-to-end with Next.js, Express architecture, and OpenAI.
Each request generates a semantic embedding, runs a cosine similarity search over the org's indexed knowledge base, then feeds the top-matching chunks as context to GPT-4o-mini — all within a single Next.js API route.
Text gets split into chunks, embedded via OpenAI, and stored as 1536-D vectors in MongoDB Atlas.
Simulates a customer support bot. Questions are matched to indexed docs via vector similarity.
All conversations are persisted to MongoDB and auto-synced every 4s.
Syncing with MongoDB...