How I Built an AI Tutor That Actually Remembers You — Using Groq + Hindsight Memory
A hackathon project that gives students a personalized AI study companion with persistent memory
The Problem Nobody Talks About
Every student has been there. You open an AI chatbot, ask it to help you with algebra, get a great explanation — then come back the next day and it has absolutely no idea who you are. You start from zero. Every. Single. Time.
Most AI tools today are amnesiac by design. They're stateless. They don't know you struggled with quadratic equations last Tuesday. They don't remember you aced the English quiz but bombed the Science one. And because of that, they can never truly personalize their help.
That's the problem I set out to solve at this hackathon.
**
What I Built
AI Study Companion is a web app that gives students a personal AI tutor powered by persistent memory. It remembers past quiz scores, tracks weak topics, and uses that history to give smarter, more personalized responses every single time a student comes back.
Here's what the app does:
Students take quizzes in Math, Science, and English
Every quiz result — including wrong answers — gets saved to memory
When a student opens the Chat Tutor, the AI retrieves their past performance and tailors its responses accordingly
A Dashboard shows their full learning history and weak topics at a glance
No more starting from scratch. The AI knows your struggles.
The Tech Stack
Next.js — Full-stack React framework for the frontend and API routes
Tailwind CSS — Fast, clean styling
Groq API (model: qwen/qwen3-32b) — Blazing fast LLM inference for the AI tutor
Hindsight by Vectorize — The memory layer that makes everything persistent
The stack is lean, fast, and fully deployable on Vercel in minutes.
How Hindsight Memory Works in This App
This is the core of the project. Hindsight is a memory system built for AI agents — it lets you store, retrieve, and reason over past interactions using semantic search.
Here's the flow I implemented:
- After every quiz: Student finishes quiz → API route captures score + wrong answers → Saved to Hindsight as a memory entry with subject, score, and mistakes
- When the student opens Chat Tutor: Student sends a message → API retrieves relevant memories from Hindsight → Memories injected into the system prompt → Groq generates a personalized response So when a student asks "Can you help me with Science?" — the AI already knows they scored 40% on the last Science quiz and got the photosynthesis question wrong. It doesn't ask them to repeat themselves. It just helps. That's the magic of giving AI a memory layer.
The System Prompt That Ties It Together
Here's a simplified version of what gets sent to Groq on every chat request:
You are a personalized AI study tutor.
Here is what you remember about this student:
- Science quiz (March 2026): Score 40%. Wrong answers: photosynthesis, cell division
- Math quiz (March 2026): Score 80%. Wrong answers: quadratic equations
Use this history to personalize your response. Focus on their weak areas.
Be encouraging, clear, and specific.
The result is an AI that feels like it genuinely knows the student — because it does.
What I Learned Building This
- Memory changes everything. Adding a memory layer isn't just a feature — it's a completely different product. The moment the AI references something from a past session, the experience transforms from "talking to a chatbot" to "talking to a tutor who knows me."
- Groq is genuinely fast. The qwen/qwen3-32b model on Groq responds in under a second in most cases. For a real-time chat interface, this matters a lot.
- Hindsight is simpler than I expected. I was worried memory systems would be complex to set up. Hindsight's API is clean — store a memory, retrieve memories by context, done. The hardest part was deciding what to remember, not how to remember it.
- Build for the user, not the demo. Early on I focused too much on making things look impressive for judges. The best feedback I got was from actually pretending to be a student using the app. That's when I realized the dashboard needed to show weak topics front and center, not buried below.
Try It Yourself
- 🔗 Live Demo:ai-study-companion-brown.vercel.app
- 💻 GitHub: https://github.com/mrudula56/ai-study-companion
- 🧠 Hindsight: https://hindsight.vectorize.io
If you're building AI agents and want them to actually remember users across sessions — give Hindsight a try. It's the missing layer most AI apps don't have yet.
Built during the Hindsight Hackathon — Theme: AI Agents That Learn Using Hindsight
Top comments (0)