Skip to main content
RAGTelegramSupabase

RAG over Telegram Chats Without Magic

In the discussion, a real RAG case study over Telegram chats emerged: the archive was loaded into a database, an agent with web search and anti-hallucination was placed on top, but they hit limits in support and cost. For AI automation, this is a useful signal: without hybrid search and reranking, quality quickly hits a ceiling.

Technical Context

I love stories like this more than press releases: someone actually built search over Telegram chats, loaded messages into a database, hooked up an agent with RAG, web search, and anti‑hallucination, and then honestly told where it started creaking. Not in theory, but in real combat. Now that looks like a proper AI implementation, not a demo for likes.

The key here is not the word RAG, but the details. The chat archive turned out to be quite useful for searching by topics and contacts, the author rated quality as "pretty decent," but only after tuning. His conclusion resonates with me: on such a corpus you need hybrid search, because embeddings alone poorly capture nicknames, company names, slang, and exact phrases.

The second important part is reranking. I’ve seen the same problem many times: vector search brings back seemingly relevant chunks, but not the ones that actually answer the question. On short Telegram messages this is especially noticeable, so a proper reranker is not an option but almost a required layer.

Another strong point in the case: the author stopped hauling all the noise into the index and started structuring discussions into a separate knowledge base. That is the right turn. If you don’t clean up chatter, forwards, reply fragments, and duplicates, any AI integration quickly turns into a probability‑based answer generator rather than a working tool.

On money, a figure around $20 per month for Supabase was mentioned. I wouldn’t take it as a universal price, because costs depend on archive size, queries, and storage scheme. But as a benchmark for a small prototype it sounds plausible: you can start cheap, but living on that forever without optimization is not always feasible.

Business and Automation Impact

The practical takeaway is simple. If your team is drowning in chats, such a RAG can reclaim hours of time: searching for solutions, contacts, agreements, and old technical discussions stops being archaeology.

Winning teams are those with lively knowledge flows: outsourcing, product, community, support, sales. The losers are those trying to build a “chatbot for messaging” without data cleaning, metadata filters, and reranking. Disappointment arrives quickly there.

I’d add an uncomfortable truth: finding a message is not the same as finding the truth. LLMs still work probabilistically, and that’s why architecture matters more than a fancy prompt. At Nahornyi AI Lab, we solve such challenges for clients through AI solution development with a proper data pipeline, not through the magic of “we’ll hook up a bot in an evening.”

If you have a similar pain with chats, a knowledge base, or internal search, let’s look at your process soberly. Sometimes careful AI automation on top of existing data is enough, and sometimes it’s better to build a custom agent so that it saves time rather than generating new noise. This is exactly the kind of case where, as Vadym Nahornyi, I find it more interesting to first break everything in tests and then assemble it into a working system for business.

We previously discussed how to measure the reliability of an LLM judge using IRT metrics. This is directly related to the rerank stage in our bot, where having stable relevance scores is critical.

Share this article