College Assistant Telegram Bot

College Assistant Telegram Bot

Enhancing the academic and social experience for college students

Demo Link: Link
Github Repo Url: Link

The Challenge

College students often face challenges in managing their academic workload, seeking career guidance, and staying connected with campus life. Traditional methods like manual scheduling, fragmented resources, and lack of real-time assistance lead to inefficiencies and stress among students.

The Solution

We developed a comprehensive Telegram bot that addresses these challenges by providing a suite of tools for assignment solving, career guidance, campus life management, and social connection. The bot's intuitive interface and smart features significantly reduce the time and effort required for these tasks, enhancing the overall student experience.

Tech Mastery Showcase

PythonPython

Used for building the core logic and integrating various services.

FlaskFlask

Employed for creating a lightweight web server to handle bot interactions.

PyTelegramBotAPIPyTelegramBotAPI

Utilized for seamless integration with the Telegram API.

PyMuPDFPyMuPDF

Implemented for processing and extracting text from PDF documents.

PillowPillow

Used for image processing and OCR tasks.

Google Sheets APIGoogle Sheets API

Integrated for logging interactions and storing data in Google Sheets.

Innovative Logic & Implementation

Assignment Solver

Developed a feature that allows students to upload assignments as PDFs or images and receive solutions or guidance.

1def handle_assignment(message: Message):
2    if message.document:
3        file_info = bot.get_file(message.document.file_id)
4        downloaded_file = bot.download_file(file_info.file_path)
5        assignment_text = extract_text_from_pdf(downloaded_file)
6    elif message.photo:
7        file_info = bot.get_file(message.photo[-1].file_id)
8        downloaded_file = bot.download_file(file_info.file_path)
9        assignment_text = extract_text_from_image(downloaded_file)
10    answers = process_text(f"Generate answers for this assignment: {assignment_text}")
11    output_path = generate_document(answers)
12    with open(output_path, 'rb') as doc:
13        bot.send_document(message.chat.id, doc, caption="Here's your solved assignment!")

Career Guide

Implemented a feature that provides career advice, resume reviews, job search tips, and more.

1def career_option_callback(call):
2    if call.data == "resume_review":
3        response = "Please upload your resume as a PDF or image for review."
4    elif call.data == "job_search":
5        response = "What kind of job are you looking for? Please provide details like industry, position, and location."
6    elif call.data == "interview_tips":
7        tips = process_text("Provide 5 key interview tips for college students.")
8        response = f"Here are some interview tips:\n\n{tips}"
9    bot.send_message(call.message.chat.id, response, parse_mode="Markdown")

Overcoming Challenges

Handling Diverse User Queries

The bot needed to handle a wide range of user queries, from academic questions to career advice.

Solution:

We implemented a robust natural language processing (NLP) system using the Llama Vision model to understand and respond to diverse queries accurately.

Processing Various Document Formats

Students upload assignments in different formats, including PDFs and images.

Solution:

We integrated PyMuPDF for PDF processing and Pillow with pytesseract for OCR on images, ensuring accurate text extraction from various formats.

Ensuring Real-time Performance

The bot needed to provide real-time responses to user queries and document uploads.

Solution:

We optimized the bot's performance by using efficient algorithms for text processing and caching frequently accessed data.

Key Learnings & Growth

  • 🚀

    Gained insights into the challenges faced by college students in managing their academic and career-related tasks.

  • 🚀

    Mastered the integration of various Python libraries for document processing and natural language understanding.

  • 🚀

    Developed expertise in building and deploying Telegram bots with real-time interaction capabilities.

  • 🚀

    Honed skills in designing intuitive user interfaces for chat-based applications.

  • 🚀

    Improved ability to balance technical considerations with user experience, especially in handling diverse user queries.