ASAysha Shafiq
← All project blogs

How I built an AI-powered Slack bot to answer student questions

Students were already asking assignment questions in Slack, so I built a Gemini-powered assistant that could answer where the conversation was happening, with the course material needed to stay relevant.

STAT_01Answers grounded in assignment manuals
STAT_02Thread-aware conversations with image context
STAT_03Four Slack-native commands

The questions were already in Slack

Students in CS 382 were using Slack to ask about assignments. I did not want to send them to another portal or make them repeat the context of a conversation, so I built the assistant where they were already talking.

The bot could respond to direct questions, continue a conversation inside a thread, and understand attached screenshots or diagrams. It felt like part of the course workspace rather than a separate chatbot students had to learn.

I gave the bot the course context it needed

A general AI model knows programming, but it does not know the exact assignment a student is working on. To make its answers relevant, I gave Gemini access to the assignment manuals, starter code, test drivers, and course workflow notes.

That context let the bot answer from the same material the students had. I also prompted it to guide students toward the next step instead of writing the completed assignment for them. The goal was to unblock learning, not replace it.

For follow-up questions, the bot included the current Slack thread and any attached images. Students could ask “why did this fail?” without restating everything that had already been discussed.

I made it feel native to the course

I built the service in Python with Slack Bolt, Socket Mode, and Gemini. It supported four slash commands for help, anonymous posts, participation statistics, and (because a course bot should have some personality) a sarcasm mode. The jokes were playful rather than mean: just enough to make routine reminders and conversations more fun.

The most important result was not the number of commands. It was making help easier to reach and more relevant by combining the place students already used, the material they were actually studying, and enough conversational context to understand the question.

Next articleHow I benchmarked NVIDIA Sirius and fixed two GPU bugs