Tab, a Telegram anti-spam bot built on a custom fine-tuned neural network, is now available
Tab, a new anti-spam bot for Telegram, classifies messages with a custom neural network rather than an off-the-shelf model. The author built a dataset of Russian-language spam by hand, now up to 25,000 messages, added fine-tuning through moderator feedback and launched two operating modes: manual and automatic. The project is already used in chats. The bot is free and open for testing.
AI-processed from Habr AI; edited by Hamidun News
A new anti-spam bot for Telegram, Tab, uses not a third-party off-the-shelf model but the author's own neural network. The project has been running in chats for several months, remains free to test and collects data for further fine-tuning.
How the bot works
Tab is built around a binary message classification model: the bot decides whether a text is spam or not. The author did not take ready-made solutions from Hugging Face and built the architecture from scratch, based on an LSTM approach. The logic is straightforward: for short Telegram messages it is important to retain context, and a recurrent network combined with attention mechanisms is a lighter, more manageable alternative to large general-purpose models.
Several rules run on top of the neural network itself. They handle not only detecting suspicious messages but also reducing the number of false bans. The bot separately checks whether the user is in a spammer database and, depending on the result, either deletes the message immediately or leaves the final decision to a moderator. This hybrid approach looks more practical than pure automation: text classification still carries a risk of error, especially in live chats with conversational language.
Data and training
The hardest part of the project turned out to be not the bot's code but data preparation. The author found no fresh, ready-made dataset for Russian-language Telegram spam, so the corpus had to be built by hand: scraping public groups, going through chats known to be flooded with spam and labeling messages one by one. The dataset has now grown to more than 25,000 examples, and the classifier's core accuracy rests on it.
The bot also has a built-in feedback mechanism for moderators. If a message was wrongly flagged as spam, a moderator can confirm that it is normal text, and the case goes into the dataset as a false positive. This lets the model improve gradually on real borderline examples, which are usually what degrades the quality of anti-spam systems, rather than merely cleaning up the chat.
"I do not position this solution as a killer of all spam."
Modes and limitations
Tab currently supports two operating scenarios: a more cautious standard mode and a stricter automatic mode. In standard mode the bot first runs the message through the model, then looks at additional signals, including whether the user is in the spammer database. If confidence is insufficient, a human makes the decision. This reduces the risk of punishing an ordinary chat member for a borderline message.
- In standard mode, a suspicious message can be sent to a moderator for review
- In automatic mode, spam is deleted immediately after the model triggers
- A ban is more strictly tied to two factors matching: the spam classification and presence in the database
- Users can report messages with the /spam command
- Chat admins can switch the bot's operating mode
The main problem for such systems is the evolution of spam itself. Spammers disguise words with look-alike characters from other alphabets, insert spaces between letters and change how a message is framed and what context it uses. This means a model cannot be trained once and left unattended: it needs a constant stream of new examples, retraining and checks.
The author plans a public dashboard with real-time statistics and further automation of labeling, because the manual stage is currently the biggest limit on scaling.
What this means
Tab shows that even without a large team or access to heavy infrastructure, it is possible to build a working applied AI tool for a specific pain point of Telegram chats. For the market it is one more signal: niche models and careful human moderation often deliver more useful results than trying to solve everything with one big general-purpose neural network.
- Dec 2, 2026Qwen3.8-27B at 4-Bit Quantization Weighs 16.6 GB Instead of 55 GB: How to Read the Filename
- Dec 2, 2026T-Decision-1 9B scores 71.6 points and beats a model six times its size
- Dec 2, 2026T-Decision-1 with 9B Parameters Beats Copernicus-57B on Russian: 71.6 vs. 71.2 Points
- Dec 2, 2026DeepMind Releases CellGemma: A Cell Model 6x Smaller Than Its Predecessor That Runs on a Single GPU
Key Questions Answered
How the bot works?
Tab is built around a binary message classification model: the bot decides whether a text is spam or not. The author did not take ready-made solutions from Hugging Face and built the architecture from scratch, based on an LSTM approach. The logic is straightforward: for short Telegram messages it is important to retain context, and a recurrent network combined with attention mechanisms is a lighter, more manageable alternative to large general-purpose models. Several rules run on top of the neural network itself.
What are the key details on Data and training?
The hardest part of the project turned out to be not the bot's code but data preparation. The author found no fresh, ready-made dataset for Russian-language Telegram spam, so the corpus had to be built by hand: scraping public groups, going through chats known to be flooded with spam and labeling messages one by one. The dataset has now grown to more than 25,000 examples, and the classifier's core accuracy rests on it. The bot also has a built-in feedback mechanism for moderators.
What are the key details on Modes and limitations?
Tab currently supports two operating scenarios: a more cautious standard mode and a stricter automatic mode. In standard mode the bot first runs the message through the model, then looks at additional signals, including whether the user is in the spammer database. If confidence is insufficient, a human makes the decision. This reduces the risk of punishing an ordinary chat member for a borderline message.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
