Inspiration

We noticed a major flaw in current AI study tools: they make learning too easy. When a student asks a question, most AI's just hand over the answer, leading to "passive learning" where information goes in one ear and out the other. We wanted to create the "Anti-ChatGPT", a tool that doesn't just give you answers, but forces you to earn them through critical thinking.

What it does

Devil’s Advocate is an AI-driven "Quest" engine that transforms static PDFs into a competitive learning pathway. Instead of a boring chat interface, users navigate a quest to achieve mastery.

Socratic Mode: The AI acts as a guide/tutor, asking leading questions to help you arrive at the truth.

Gaslight Mode: The AI acts as a skeptical examiner. Even if you are right, it might challenge you with a trick question or a common misconception to see if you actually understand the "why" or if you're just memorizing.

How we built it

We also tried to built a full-stack RAG (Retrieval-Augmented Generation) pipeline:

Frontend: A dynamic React interface that visualizes the chatbot for two separate personas "quest" rather than a standard chat bubble.

Backend: A FastAPI server that orchestrates the logic.

Brain: We used Llama 3.3 (via Groq) for ultra-fast inference speeds, allowing the "Devil" to respond instantly.

Knowledge Base: We implemented FAISS and Sentence Transformers to turn 90+ page PDFs into searchable mathematical vectors. This allows the AI to perform a semantic search to verify the student's answer against the actual textbook material.

Challenges we ran into

One of our biggest hurdles was the front-end to -backend synchronization. We initially struggled with asyncio runtime errors because our server was trying to run inside a pre-existing loop. We also had to solve the memory gap issue ensuring that the AI could remember which page of a 92-page PDF it was talking about without exceeding token limits.

Accomplishments that we're proud of

We are incredibly proud of our custom evaluation logic. Most AI tools just "chat," but we built a reliable verdict system that acts as a gatekeeper for the user's progress. We also managed to get our RAG pipeline running with high accuracy, ensuring that the AI can cite specific page numbers from the PDF to correct the user.

What we learned

We learned that building an AI that knows the answer but refuses to give it to you is actually much harder than building a standard chatbot! We gained deep experience in vector databases, prompt engineering for "socratic" personas vs "gaslight mode" persona, and the complexities of handling multi-part file uploads in a FastAPI environment.

What's next for Devil's Advocate

We want to expand the "Quest" map into a fully gamified 3D environment where each node in the study path is a physical location. We also plan to add "Peer-to-Peer Battle Mode," where two students can use the same PDF to generate challenges for each other, with the Devil's Advocate acting as the referee.

Built With

Share this project:

Updates