Historia
What Inspired Us
We noticed a consistent pattern: students were using AI tools to copy answers directly into their notes without engaging in the learning process. The experience was passive, and the tool was doing the thinking for them. We wanted to change that. Learning works best when it is interactive, challenging, and engaging. Instead of an AI that simply answers questions, we imagined one that responds with questions, encourages reflection, and simulates a real conversation. This idea — shifting AI from a shortcut to a learning scaffold — led to the creation of Study Sanctum.
How We Built It
We structured development in layers, combining fast iteration with clear specifications. We used Kiro to translate high-level descriptions into working components.
RAG Pipeline
The system is built on a retrieval-augmented generation pipeline. When a student asks a question: The query is converted into embeddings Relevant content is retrieved from ChromaDB The top results are passed to DeepSeek along with the query A persona-driven response is generated We described this flow in plain English, and Kiro generated the full implementation, including retry and fallback logic.
Avatar System
Each historical figure has a distinct personality defined through prompts. These prompts include tone and subtle stage directions to make responses feel more natural. We used ElevenLabs for voice output and the Web Audio API to animate avatars in sync with speech. The system also supports interruption through voice input, allowing conversations to feel more dynamic and realistic.
Game Engine
The GameModule is an interactive crossword puzzle system built from a single high-level description. It uses a reducer-based state system to manage user interactions such as placing letters, selecting cells, and resetting the grid. We added a progress-based reward system where comic panels unlock as the user advances. Completing the puzzle triggers a final reward screen that students can export.
Specs for Coordination
We divided work across three main areas: the RAG backend, avatar system, and game engine. To integrate everything smoothly, we created structured specification documents: requirements.md design.md tasks.md These documents defined interfaces, data models, and integration logic clearly enough that Kiro could handle integration without additional coordination.
What We Learned
Specs and rapid iteration work best together Fast, flexible development worked well for individual components, while structured specs were essential for collaboration. Clear documentation is critical We didn’t maintain a single source of truth early on, which led to inconsistencies between our documentation and actual implementation. Describing behavior matters more than implementation details Precise descriptions of what a feature should do led to better results than focusing on how it should be built.
Challenges We Faced
Browser audio restrictions We had to implement a user-triggered initialization flow to enable audio playback and ensure it worked reliably across components. Crossword validation complexity Ensuring consistency across intersecting words in the grid required careful validation. Even small mismatches could break the puzzle. Documentation drift As development moved quickly, documentation fell out of sync with the codebase, requiring later fixes. Designing AI as a teacher The biggest challenge was shifting the AI from giving direct answers to encouraging critical thinking. This required multiple iterations of prompt design to make interactions feel more like a guided learning experience.
Closing Thought
Study Sanctum is designed to make AI an active participant in learning rather than a passive answer generator. By encouraging students to think, respond, and engage, it aims to make learning more meaningful and effective.
Built With
- amazon-web-services
- bedrock
- llm
- next.js
- python
Log in or sign up for Devpost to join the conversation.