Inspiration We've all experienced the "Illusion of Competence." It's that moment when you read a textbook, nod your head, and think, "Yeah, I totally get this." But the moment you sit down for the exam or try to explain it to a friend, your mind goes completely blank.
Nobel laureate Richard Feynman famously said that the true test of understanding is whether you can explain a concept in simple terms. We realized that in the current EdTech landscape, AI is almost exclusively used to teach students by giving them answers. We wanted to flip the script: What if the student had to teach the AI?
FeynmanBot was inspired by the desire to build an active, rather than passive, learning platform. We wanted to create an environment where an inquisitive AI acts as your student, poking holes in your logic, asking "why," and forcing you to distill complex ideas into simple, atomic truths.
How we built it FeynmanBot is built on a modern, decoupled full-stack architecture designed for real-time interactivity and scale.
Frontend:
Built with React (TypeScript) and bootstrapped via Vite for lightning-fast HMR. The UI is crafted with Tailwind CSS, utilizing glass-morphism techniques, dynamic dark mode, and micro-animations to create a premium, engaging learning environment. We implemented complex client-side optimizations, such as useMemo and debouncing, for highly efficient, lag-free session filtering. Backend & AI:
Powered by FastAPI (Python), providing a blazing-fast, strictly typed asynchronous API layer. We integrated Supabase (PostgreSQL & Auth) to handle secure user sessions, Row-Level Security (RLS) policies, and persistent storage of complex session metadata. The core learning loop is driven by a sophisticated prompting engine interfacing with Gemini / OpenAI. Instead of simple generation, we engineered a stateful interaction loop where the AI adopts specific personas (e.g., "Curious Child" or "Strict Examiner") to interrogate the user's explanation. The Grading Engine: Once a session concludes, the entire context history is fed into an "Expert Teacher" prompt. The LLM is strictly constrained to output structured JSON data, calculating a multi-dimensional metric for the user's understanding, taking into account: $$ Score = f(\text{Accuracy}, \text{Clarity}, \text{Completeness}, \text{Example Quality}) $$ It then automatically generates a Misconception Radar and custom revision flashcards based on the user's weakest points.
Challenges we faced Hallucinations vs. Strict JSON: One of the biggest hurdles was forcing the LLM to act as an objective grader and return strictly parseable JSON for our analytics dashboard. If the AI deviated and wrapped the JSON in conversational text or markdown, the frontend dashboard would crash. We had to iterate heavily on our prompt engineering and add custom backend parsers to sanitize the LLM outputs dynamically. Context Hydration for Incomplete Sessions: We wanted users to be able to drop off mid-session and resume later without losing their progress. Synchronizing the exact state of the Q&A loop between the React frontend and the Supabase backend—especially ensuring the AI "remembered" the previous questions—required careful architectural planning of our database schema. Designing a "Stupid" AI: It is surprisingly difficult to make a highly advanced LLM act like a beginner. By default, LLMs want to be helpful and explain things to you. Prompting the AI to intentionally act confused, avoid giving away the answer, and solely ask probing questions took rigorous testing. What we learned The power of RLS in Supabase: We learned how to write strict Row-Level Security policies in PostgreSQL to ensure that users can only ever read and write their own teaching sessions and reports. Prompt Engineering as Code: We learned that treating LLM prompts like delicate, testable backend logic is crucial. Small changes in a prompt can drastically alter the JSON structure or the persona of the bot. Advanced React Patterns: We deepened our understanding of memoization and complex state management across highly interactive components like the Learning Timeline and the Knowledge Gap Map.
Built With
- css3
- fastapi
- gemini
- html5
- javascript
- llm
- postgresql
- pydantic
- python
- react
- react-router
- rest-api
- supabase
- tailwind
- typescript
- uvicorn
- vite

Log in or sign up for Devpost to join the conversation.