惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Last Week in AI
Last Week in AI
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
宝玉的分享
宝玉的分享
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 司徒正美
罗磊的独立博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
小众软件
小众软件
Jina AI
Jina AI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building an AI Telegram Bot That's Helped 10,000 Students...
EnrollAI & E · 2026-05-07 · via DEV Community

Building an AI Telegram Bot That's Helped 10,000 Students: Lessons Learned

When I started EnrollAI in 2023, I had a simple problem to solve: India's 16 million NEET and JEE aspirants were drowning in expensive coaching classes, fragmented resources, and the inability to get instant feedback on their doubts. After 14 years of mentoring students directly, I knew exactly what they needed. So I built a Telegram bot.

Today, EnrollAI has 10,000+ active users solving curated MCQs and getting AI-powered explanations for their doubts. But the journey to get here wasn't straightforward. Let me share the technical and strategic lessons that shaped this product.

Why Telegram? Why Not a Native App?

My first instinct was to build a web or mobile app. But after talking to 200+ students, I realized they already lived on Telegram. It's where they connect with peer groups, share resources, and spend hours daily. Building on Telegram meant zero friction for onboarding — no app store approval, no installation barriers, just one tap to start.

The technical decision paid off. We achieved 8,000+ users in 4 months without a single dollar spent on acquisition. Peer-to-peer sharing did the heavy lifting.

Architecture: Simplicity at Scale

Our tech stack is deliberately lean:

  • Python with Telegram Bot API (using python-telegram-bot library)
  • SQLite for question storage and user progress tracking
  • spaCy and NLTK for NLP-based doubt classification
  • FastAPI for backend services running on a single Ubuntu server

We deliberately chose SQLite over PostgreSQL initially. Was this a mistake? Partially. At 10,000 users with ~50,000 queries/day, SQLite started showing its limitations around concurrent writes. But the lesson here is important: start simple, scale when you hit real bottlenecks, not imagined ones.

In month 8, we migrated to PostgreSQL. The migration took 2 weeks because our data model was clean and our ORM queries were straightforward. Premature optimization would have cost us months of engineering time we didn't have.

The Question Bank: Quality Over Quantity

We launched with 2,000 MCQs. Today we have 10,000+. But the real differentiator isn't the number—it's the metadata.

Each question is tagged with:

  • Topic and subtopic (e.g., "Organic Chemistry > Alkanes > Nomenclature")
  • Difficulty level (beginner, intermediate, advanced)
  • Success rate (what % of users answer correctly)
  • Common misconceptions (extracted from user responses)
  • Detailed explanations (written by subject matter experts, then validated by AI)

This taxonomy took 3 months to build properly. We use a PostgreSQL jsonb field to store tags, enabling fuzzy matching for NLP queries. When a student asks "Why do benzene rings not undergo addition reactions?", our NLP engine classifies it under Organic Chemistry > Aromatics > Stability, then retrieves the 3-4 most relevant MCQs and written explanations.

# Simplified NLP classification logic
def classify_doubt(user_query):
    doc = nlp(user_query)
    entities = extract_entities(doc)
    topic_vector = encode_topic_context(entities)
    closest_topics = find_nearest_topics(topic_vector, threshold=0.75)
    return closest_topics

Enter fullscreen mode Exit fullscreen mode

The Doubt-Solving Engine: Where NLP Met Reality

Our initial NLP pipeline was overly complex. We tried fine-tuning a BERT model on our question dataset. It took 2 weeks to set up, consumed 60% of our server resources, and improved accuracy by only 3% over a simpler TF-IDF + cosine similarity baseline.

The lesson: Occam's Razor applies to ML too. We reverted to a hybrid approach:

  1. TF-IDF vectorization on question text and tags (fast, interpretable, 87% accuracy)
  2. Fallback to keyword matching for edge cases
  3. Manual curation for the remaining 5% of queries that need human review

This stack processes doubts in under 200ms, costs next to nothing to run, and is easy for anyone to understand and debug.

Scaling Challenges We Actually Hit

Challenge 1: Telegram API rate limits. We were hitting rate limits at 3,000 concurrent users. Solution: Implement a message queue (Bull.js initially, now Redis) with workers processing messages asynchronously. Doubled our throughput overnight.

Challenge 2: Cold start latency. Users asked "How long for an answer?" The first 10,000 queries took 5-8 seconds. We were loading the entire question bank into memory on every request. Solution: Cache the top 500 questions + implement lazy loading. Now average response time is 400ms.

Challenge 3: Misinformation. A user pointed out a factually wrong explanation in our chemistry section. We had no validation workflow. Now every explanation is reviewed by at least 2 subject experts before being pushed live.

What Actually Drove Growth

It wasn't the fancy tech. It was:

  1. Word of mouth from actual students (72% of new users)
  2. Free access (no paywall or freemium trap)
  3. Speed (instant doubt-solving beats waiting for a tutor reply by hours)
  4. Accountability (showing students their progress over time)

Our best feature? A simple dashboard showing "You've solved 342 questions this month. Your accuracy in Biology improved from 68% to 74%." Data-driven feedback works.

What I'd Do Differently

  • Start with PostgreSQL, not SQLite. The migration is easy