Inspiration
I struggled with physics through 11th and 12th while preparing for JEE and EAPCET, and it is a big reason I'm not at a better college today. The problem was never a lack of effort. When I got stuck on a circuit problem, I had two bad options: look at the solution and learn nothing, or stay stuck. There was no one to ask "what are you actually missing?" at 11 pm, and tutoring that works that way is expensive.
I wanted to build the tutor I needed back then: one that works with my own notes and my own problem, and that makes me think instead of handing me the answer.
What it does
Socratic Study Companion turns a student's slides, textbook chapters and lecture transcripts into a source-cited knowledge base, then uses it to:
- Tutor on your own problem. Upload a photo of a circuit and say or type where you're stuck. The tutor never gives the answer. It asks one guiding question, draws on your diagram, and points you to the right slide, page or lecture timestamp.
- Climb a hint ladder. If you stay stuck, the hints get more specific, up to 3 levels, but never reveal the final answer.
- Quiz you adaptively. Questions get harder or easier with each answer, mastery is tracked per concept, and the quiz targets the misconceptions you showed while being tutored.
- Cite everything. Every tutor reply and quiz answer shows where the idea came from in your own materials.
How I built it
- Streamlit app in Python, deployed on Streamlit Community Cloud.
- Groq for the vision-language model (Qwen) and Whisper for voice notes, so you can talk through your problem.
- Knowledge base:
pypdfandpython-pptxparse PDFs and slides, and.srt/.vtttranscripts become time-stamped chunks. Retrieval is BM25 in pure Python, with no vector database. It's easy to explain and good enough for course-sized material. - Teacher notes: an optional hidden reference solution that the tutor steers toward but never reveals.
Challenges I ran into
- The LLM proposes, the code enforces. The model alone repeated questions and lost track of hint levels. Hint level, stuck-count and "never repeat a question" now live in code, and a repeat triggers an automatic retry.
- A confident tutor can be wrong. An early version said an ideal voltmeter acts "like a wire", which is exactly the kind of mistake that hurts a student. It also agreed with a wrong guess just because I asked "right?". I fixed this with a physics-facts guardrail, rules against confirming unverified claims, and the reference-solution feature.
- LLM output is untrusted input. Responses are parsed defensively, validated, clamped and retried on malformed JSON or rate limits.
- Vision is approximate. Coordinates for the drawn overlays are off by a few percent, so the overlays use generous shapes. A wrong highlight is worse than none, so the tutor skips overlays when it isn't sure.
What I learned
Making an AI helpful and making it teach are opposite problems. The easy version just answers. The hard part is a tutor that holds back, asks the right question, and tells you when you're wrong without telling you the answer.
What's next
- Speech-to-text directly from lecture videos (today they go in as transcripts)
- A tap-to-confirm step for dense or blurry diagrams
- Saving mastery across sessions for spaced repetition
- OCR for scanned PDFs
Log in or sign up for Devpost to join the conversation.