Inspiration
It started with a universal student experience: the "2 AM Panic." We realized that many of us fall into the "Passive Consumption Trap"—watching lecture recordings at 2x speed, nodding along, and feeling like we understand the material. But when we stepped into exams or technical interviews, our minds went blank. We recognized the keywords, but we couldn't construct the logic. We also noticed a specific local cultural challenge: in Singapore, students are often "paiseh" (shy) or afraid of "losing face" by speaking up in class. We wanted to build a safe, judgment-free space where students could practice articulating complex ideas. We were inspired by the Feynman Technique, which states that you don't truly understand a concept until you can explain it simply. We decided to flip the script: instead of building another AI Tutor to spoon-feed us answers, we built an AI Student that forces us to teach.
What it does
XP-Lain is the world's first "AI Protégé." It is a gamified learning platform where you progress by teaching your AI avatar. The Blank Slate: You start the semester with an AI that knows nothing about your module. The Teaching Loop: You verbally explain concepts (e.g., "Recursion" or "Market Equilibrium") to your avatar via a real-time voice interface. Simulated Confusion: This is our secret sauce. If your explanation is vague or lacks logic, the AI doesn't just correct you—it acts confused. It asks probing questions like, "Wait, if the loop has no exit condition, won't it run forever?" This forces you to stop, think, and refine your explanation on the spot. Verification: The AI validates your explanation against uploaded lecture notes. If you explain it correctly, your avatar "levels up," and you earn XP (Experience Points).
How we built it
We prioritized low latency and semantic accuracy to make the conversation feel natural. Frontend: Built with React Native for a seamless mobile-first experience. Voice Engine: We utilized the OpenAI Realtime API to enable interruptible, human-like voice interaction. This allows the AI to interject with questions just like a real student would. The Brain (RAG): We used LangChain to orchestrate the AI's persona. The Truth Model: We implemented a Vector Database (using ChromaDB) to ingest the professor's PDF lecture slides. The system calculates the semantic similarity between the user's voice transcript and the "Ground Truth" (the slides) to determine if the user actually knows what they are talking about.
Challenges we ran into
Engineering "Smart Confusion": It is easy to prompt an AI to be an expert, and easy to prompt it to be clueless. The real challenge was prompting it to be a curious novice: an AI that knows the truth but asks the perfect 'naive' question to guide the user toward it. We struggled to prompt the model to ask helpful clarifying questions without giving away the answer or hallucinating incorrect facts. We spent hours refining the "Persona System Prompt" to strike the right balance between curiosity and cluelessness. Voice Latency: To maintain the illusion of a real conversation, we needed near-instant responses. Handling the audio stream processing and RAG retrieval simultaneously introduced lag, which we optimized by caching vector queries.
Accomplishments that we're proud of
The "Reverse" Paradigm: We are most proud of breaking the mold. While everyone else is building chatbots that answer questions, we built one that asks them. We believe this is a more effective pedagogical tool. Real-Time Validation: We successfully built a working prototype where the AI can "hear" a user's explanation, cross-reference it with a PDF file it just read, and grade the user's logic in under 2 seconds.
What we learned
Pedagogy: We learned that the "Illusion of Competence" is a real, measurable phenomenon. By testing the app ourselves, we realized how many concepts we thought we knew but couldn't actually vocalize. Prompt Engineering: We learned that defining an AI's "personality" is just as important as its knowledge base. Making the AI feel "curious" rather than "robotic" completely changed the user experience.
What's next for XP-Lain
Proxy Battles: The ultimate vision for XP-Lain is social. We want to implement a feature where students can pit their trained AIs against each other in quiz battles. If my AI beats yours, it proves I taught mine better. SgSL Integration: We plan to integrate a sign-language module (SgSL-Lens) to make the "teaching" aspect accessible to the deaf and hard-of-hearing community, allowing them to train their avatars via sign language recognition.
Log in or sign up for Devpost to join the conversation.