Spact — Say it. Remember it.

Inspiration

The inspiration for Spact came from research I came across some time ago about active recall and how explaining what you've learned in your own words can improve understanding and memory retention.

This made me think about how students often study independently, without someone available to discuss concepts with, ask them questions or challenge their understanding.

I wanted to build something that could act as a revision partner rather than just another AI chatbot that provides answers. That idea became Spact, a voice-first AI revision companion designed to make studying more conversational and interactive.

What it does

Spact allows students to revise through natural voice conversations with an AI.

Rather than simply explaining topics, Spact encourages students to recall information, answer questions and explain concepts in their own words. It can identify misconceptions, provide constructive feedback and ask follow-up questions based on the conversation.

Students can also ask Spact to generate and save revision notes, which they can access and edit later.

The application supports guest and registered accounts, with conversation history stored so students can continue an active revision session without losing context.

How I built it

I developed Spact using Next.js, TypeScript and Tailwind CSS for the frontend and backend.

The application integrates several services:

  • Deepgram: Converts recorded speech into text.
  • NVIDIA Nemotron 3.5 Lightning via Nebius Token Factory: Powers the conversational AI, question generation, feedback and tool calling.
  • Supabase: Provides PostgreSQL storage, authentication and Row Level Security for user data.
  • Text-to-speech and Web Audio API: Allow students to hear Spact's responses.
  • Vercel: Hosts the deployed application.

The backend retrieves previous messages from Supabase and provides them alongside the system prompt and the student's latest message to the language model.

I also implemented AI function calling, allowing Nemotron to request actions such as saving revision notes. The Next.js backend processes these requests and interacts with the database.

Challenges I faced

1. Audio playback on iOS

One of the most frustrating challenges was getting AI-generated audio responses to play consistently on iPhones.

Apple's WebKit browser engine restricts certain audio playback operations unless they are initiated through user interaction. This meant Spact could generate a response successfully, but the student might not hear it.

To address this, I implemented audio unlocking when the student taps the recording button and used the Web Audio API for playback. I also added a Play response fallback and guidance for iPhone users to check Silent Mode.

This taught me how browser restrictions can affect an application's functionality, even when the backend is working correctly.

2. AI prompt engineering and tool calling

Building the AI integration was relatively straightforward, but getting the model to behave consistently was more challenging.

I experimented with system prompts to make Spact act like a revision partner rather than a general-purpose chatbot. I wanted it to ask meaningful questions, challenge incorrect answers, avoid unnecessary explanations and respect the student's instructions.

Tool calling introduced another challenge. During testing, the AI sometimes misinterpreted requests about accessing existing notes as instructions to save new ones.

This highlighted an important lesson: LLMs can produce incorrect tool decisions, and prompt instructions alone are not a complete safeguard. Tool descriptions, backend validation and clear boundaries around actions are essential for building reliable AI applications.

Improving this reliability is an area I'm continuing to work on.

3. Maintaining conversation context

I also had to think carefully about how Spact remembers conversations.

Initially, I only provided the model with a small number of previous messages. This limited its ability to follow longer revision discussions or generate comprehensive notes about what had been covered.

I improved this by retrieving more conversation history and implementing session management based on inactivity.

This helped me understand the relationship between context windows, token usage, conversation history, cost and AI response quality.

4. Balancing speed and functionality

Because Spact is voice-first, response latency is particularly important.

The application currently processes speech transcription, AI generation and speech output in stages. Although this works, the delays can make conversations feel less natural.

I explored approaches such as Deepgram's real-time WebSocket transcription and streaming audio, but prioritised completing a functional application for the hackathon rather than introducing major architectural changes close to submission.

What I learned

This project has been a valuable learning experience, particularly because it introduced me to aspects of AI application development I hadn't previously explored in depth.

I gained practical experience with prompt engineering, LLM function calling, managing conversation context, token usage, speech processing and integrating multiple external APIs.

I also learned more about Supabase authentication, database security using Row Level Security, browser audio restrictions and debugging applications across different devices.

One of my biggest takeaways is that integrating an LLM is only the beginning of building a reliable AI application. Designing useful interactions, controlling tool execution, managing context and handling unexpected behaviour are equally important.

I'm still learning these concepts, and Spact has helped me identify the areas I want to develop further.

What's next for Spact?

I want to improve response latency through streaming speech technologies, strengthen AI tool-calling safeguards and make the revision experience more personalised.

I also want to explore ways to help students track their understanding and identify areas where they need further revision.

Ultimately, my goal is to make Spact feel less like a general-purpose chatbot and more like a dedicated revision partner that helps students actively engage with what they're learning.

Built With

  • deepgram
  • nebius-token-factory
  • next.js
  • nvidia-nemotron
  • supabase
  • tailwind
  • typescript
  • vercel
Share this project:

Updates

Submission history