🤯 ChatGPT for Classroom Knowledge base with Supabase pgvector 🤯
Learn how ClassroomIO.com, the Google Classroom alternative empowers teachers and bootcamps to scale their training all on top of Supabase
Hey there, this is officially the first blog post from ClassroomIO and we are pumped to talk about how we use Supabase to power all of our application. In this Supabase Content Storm, I will be sharing how we use Supabase to help educators create courses in minutes and how we help them scale teaching and learning to millions of students.
🖥️ What is ClassroomIO? 🖥️
ClassroomIO is a learning management system (LMS - I don’t like this term but people understand the product when I mention it) that helps educators (basically anyone with students) teach in and outside the classroom. I initially built ClassroomIO as a customizable alternative to Google classroom. Some years ago around 2020, the company I worked at in Ukraine used to bring in junior developers, teach them React.js, then employ the best amongst each batch. I was brought on to help build the curriculum and be one of the teachers. I participated in training 5 different batches, we hired about 2 from each batch and it was the first time I felt some kind of fulfilment deep down seeing people who were struggling to get some of the concepts now work with me on key production features.
🦾 Why build another LMS? 🦾
It wasn’t always amazing though, especially during the classes. I struggled with a lot of things like gathering materials, creating assignments, grading the students and sharing the materials with them. We used a mix of tools to achieve all of this like Google Sheets for grading, multiple docs that needed sharing permissions for gathering the lesson materials, Google Slides for live presentations and after each lesson all these materials will be organised in a Google drive and shared with the students, basically links were our best friend. This really frustrated me, I did my research looking for tools we could use internally to run a kind of Hyrid learning but couldn’t find anything reasonable. Either they all focused on online learning like Khajabi, Learnworlds and the rest or they were more enterprisy like CanvaLMS, Blackboard and so on. Google Classroom seemed interesting at the time because it was popular with schools trying to teach their students online which was the intersection that interested me. However my problem with Google Classroom is its rigid interface, no customization - we couldn’t make it look like it belongs to our company instead from the name you see that it is Google’s Classroom, we couldn’t create landing pages to share with students and we couldn’t collaborate amongst ourselves as teachers. With all of these limitations, I started building a tool to solve these problems.
😍 Why Supabase? 😍
At the time I needed a solution that allowed my the move very quickly and Supabase ticked all the box, Authentication, Storage and Database were all the things I really needed to get a prototype out. I built the first version in 2 weeks, it wasn’t really good 😂 but it solved part of the problem.
Supabase really helped me ship 10x faster, I didn’t have to run any servers, create endpoints for each feature I needed on the frontend thanks to PostGREST, worry about authentication and deal with uploading images, all these came out of the box. When I shared it with some of my colleagues, they didn’t believe it was possible because we all were used to building large PHP and Nodejs servers and built API docs with Swagger that frontend devs would use to consume our API’s. After feedbacks and iterations we used ClassroomIO internally to teach the last batch. I left the company and continued working on it, few weeks later, I beta tested it with a teaching org who was looking to solve a similar problem we had.
🤖 ClassroomIO Today 🤖
Today ClassroomIO has more features, some key features I’ve added so far are
More organisation customisations
A Forum for students to ask questions
More advanced course builder with a landing page, video upload with AI generated transcriptions, Live chat, certificates builder, quiz generator and a trello like grading board.
AI intergration with OpenAI
Knowledge base with Supabase pgvector (Experimental)
Here is a quick demo of how ClassroomIO has become today:
Supabase pgvector 🔥
With the rise of ChatGPT and Large Language Models (LLMs), from the video you’d see how I’ve integrated OpenAI into the course creation process and this allows educators be 10x more productive. My mission ultimately is to help educators save more time and actually focus on doing what they love “Teaching”. From my experience teaching, one of the things that takes an educators time is answering the same questions over and over again, which is why we added a forum where educators could share links to answered questions if they ask. However students tend to ask questions the past batch already asked and the educator already answered in the forum leading to duplicate question.
With all these features shipped, educators now have lots of students and learning data at their finger tips. With this data, thanks to LLMs we can now use this knowledge base to create embeddings we can feed to it, in order to provide contextual answers to any question.
Once I heard that Supabase shipped pgvectors and I could get this up and running right within my existing stack, this was amazing. Right away I started going through the docs to see how I could use it and I was extremely amazed with the amount of resources I found. This video in particular was the most useful - How I Built Supabase’s OpenAI Doc Search.
In a few days I built the first prototpe very similar to Supabase’s Doc Search that is triggered when you hit Command/Ctrl + K.
Right now we are beta testing it internally with a ton of data just to make sure it provides the some value to students and educators.
How does it work? 😎
Students open the LMS
They hit
Command/Ctrl + K
The Search comes up and they ask any question they have
We send it to a Supabase edge function
The function converts the search into embeddings
Checks the nearest match of the embedding in Supabase and returns the closest match.
Then I take the string form of that embedding which was also stored in the db
Send it to Open AI as the context and add the question of the student
Then stream the response of OpenAI back to the frontend.
If we don’t find the answer really useful, we automatically create a question in the forum and allow them expand the question more if they way to
Example of the Prompt I send to OpenAI:
You are a very passionate and create help representative of a teacher on ClassroomIO. Given the following questions and answers from various conversations between the teacher and other students, answer the question only using that information outputted in html. If you are unsure and the answer hasn’t been discussed before, say: “Sorry, I can’t help with that question, should I help you ask the question in the forum?”
Conclusion 🫡
We are super existed so far with the results we are seeing, people find it more interesting to ask the AI questions before even going to the forum, which is the main goal we set out to achieve. I am even more pumped to share it with the public once it gets out of Beta. Supabase has really helped me ship really valuable features to my users 10x faster than I would have without it. The pgvector is now my most interesting feature because it helps make ClassroomIO not just an average LMS but an Intelligent LMS that saves Educators time and gives us a competitive advantage.
Have you got any questions, you can always reach out to me on Twitter @rotimi_best