RAG-powered Telegram support chatbot with an admin dashboard, combining keyword and vector search over a knowledge base to answer trading/TradingView indicator support questions.
A two-service system built for trading/TradingView indicator support: a Node.js/Express backend running a Telegraf-based Telegram bot with a retrieval-augmented generation (RAG) pipeline, and a Next.js admin dashboard for managing the knowledge base, conversations, users, and announcements. User messages are answered by GPT-4o-mini, grounded in context pulled from a hybrid retrieval layer — MongoDB text search over a curated knowledge base plus Atlas vector search over embedded Telegram channel messages. An admin feedback loop lets moderators correct bot answers, with approved corrections injected as highest-priority context in future responses, acting as a lightweight learning loop without model fine-tuning.
Hybrid Retrieval
Curated knowledge-base documents needed exact/keyword-level precision, while noisy, high-volume Telegram channel chat needed semantic matching — a single retrieval strategy couldn't serve both well.
Built a two-tier retrieval layer: MongoDB text search for curated knowledge-base docs and Atlas vector search (text-embedding-ada-002) for embedded channel messages, querying both in parallel and merging the results into the response context.
Bot answers needed to keep improving based on admin review, but retraining or fine-tuning a model for every correction wasn't practical.
Built an admin feedback loop where moderators mark answers correct or needs-improvement and submit corrections; approved corrections are stored and re-injected as highest-priority, in-context guidance ahead of the general knowledge base — a lightweight RLHF-style loop with no fine-tuning required.
Status
Completed
Let's talk about how I can help build and ship your next production application.