An AI-powered Telegram Study Assistant built using Node.js, Telegraf, Ollama, and Qwen/LLaVA. The bot helps students prepare for competitive exams by generating vocabulary, solving image-based questions, and providing previous year practice questions directly inside Telegram.
Current Version: v1.0
Generate 10 SSC CGL vocabulary words along with:
- Meaning
- Example sentence
Command:
/vocabs
Students can send an image of a question and receive a step-by-step explanation.
Workflow:
/question
β
Send Image
β
LLaVA Vision Model
β
Step-by-step Solution
Generate SSC CGL-style previous year questions for any topic.
Example:
/pyp Profit and Loss
or
/pyp
then send the topic name.
/guide
Displays all available commands and usage instructions.
- Node.js
- Telegraf
- Axios
- Dotenv
- Ollama
- Qwen 2.5 (Text Generation)
- LLaVA (Vision Question Solving)
- Telegram Bot API
Clone the repository
git clone <your_repo_url>
cd StudyBot-AIInstall dependencies
npm installCreate a .env file
APIBOTKEY=YOUR_TELEGRAM_BOT_TOKENInstall Ollama
Pull required models
ollama pull qwen2.5:3b
ollama pull llavaStart Ollama
ollama serveRun the bot
node bot.jsStudyBot-AI/
β
βββ bot.js
βββ package.json
βββ .env
βββ README.md
| Command | Description |
|---|---|
/start |
Starts the bot |
/guide |
Shows available commands |
/vocabs |
Generates 10 SSC CGL vocabulary words |
/question |
Solves image-based questions |
/pyp |
Generates previous year questions |
Telegram
β
/vocabs
β
Qwen 2.5
β
Vocabulary Response
Telegram
β
Image Upload
β
Base64 Conversion
β
LLaVA Vision Model
β
Step-by-step Solution
User Topic
β
Qwen 2.5
β
Generated SSC-style Questions
The current version establishes the core AI functionality. Version 2 will transform the bot into a complete AI study assistant.
StudyBot-AI/
β
βββ commands/
β
βββ handlers/
β
βββ services/
β
βββ utils/
β
βββ database/
β
βββ prompts/
β
βββ downloads/
β
βββ bot.js
Talk naturally with the bot without commands.
Example
Explain Binary Search.
What is Dijkstra Algorithm?
Give me a Java program for Linked List.
Upload notes or PDFs.
Receive
- Summary
- Important points
- Revision notes
Upload voice notes.
β
Speech-to-Text
β
LLM
β
Answer
Generate topic-wise quizzes.
Example
/quiz Graphs
Returns
- MCQs
- Answer Key
- Difficulty Levels
Generate revision flashcards for any topic.
Example
/flashcards Operating System
Generate code snippets.
Example
/code Merge Sort in C++
Paste code.
Receive
- Bug Explanation
- Fixed Code
- Time Complexity
- Optimization Tips
Generate personalized daily study schedules.
Example
/studyplan
Recommend problems based on
- Topic
- Difficulty
- Company
Example
/leetcode Graphs Medium
Store every generated vocabulary list.
Features
- Daily Revision
- Search
- Random Revision
- Quiz from Saved Words
Track
- Questions Solved
- Vocabulary Learned
- Daily Streak
- Quiz Scores
- XP System
- Daily Streaks
- Badges
- Leaderboard
Replace temporary memory with persistent storage.
Possible choices
- SQLite
- MongoDB
Separate prompt management for
- Vocabulary
- Question Solving
- Coding
- Quiz
- Notes
- Flashcards
Build an AI-powered Telegram assistant capable of serving as a personal study companion by integrating:
- Large Language Models
- Vision Models
- Document Understanding
- Speech Recognition
- Progress Tracking
- Personalized Learning
The goal is to provide students with an intelligent, always-available assistant for exam preparation, coding practice, revision, and doubt solvingβall within Telegram.
Yash Goyal
If you found this project interesting, feel free to star the repository and contribute.