Inspiration

Traditional AI tutors often fall into the "answer machine" trap—handing students direct code or equation solutions instead of fostering actual critical thinking. As STEM students tackling complex data structures, algorithms, and digital logic, we wanted a tool that acts like an elite human teaching assistant: guiding through targeted questions and visualizing abstract processes rather than doing the work for us.

What it does

SocraticLab is an interactive, AI-driven STEM tutoring web application. It enforces strict Socratic pedagogy, ensuring the AI never gives direct answers, but instead uses probing questions to help students discover solutions themselves. When students are stuck on code logic, algorithmic traces, or circuit design, SocraticLab dynamically generates visual logic flowcharts and renders complex LaTeX mathematics.

How we built it

  • Frontend: Built with Next.js App Router, React, TypeScript, and styled with Tailwind CSS and Lucide icons.
  • AI & Backend: Powered by the Vercel AI SDK and Groq Cloud (llama-3.1-8b-instant) for ultra-fast, zero-cost streaming responses.
  • Renderers: Integrated react-markdown, remark-math, and rehype-katex for crisp mathematical formatting and notation.

Challenges we ran into

Balancing strict Socratic system prompts so the AI doesn't break character, handling message streaming state smoothly across UI updates, and navigating free-tier API rate limits required careful prompt engineering and robust error handling.

Accomplishments we're proud of

  • Successfully engineering a prompt-driven pedagogical guardrail that prevents direct answers while maintaining helpful guidance.
  • Integrating real-time Markdown math and streaming state cleanly into a modern dark-mode interface.

What we learned

We gained deep experience configuring the Vercel AI SDK, optimizing low-latency inference with Groq, and crafting user interfaces tailored for technical problem-solving.

What's next for SocraticLab

Adding multi-modal support so students can snap screenshots of homework problems, whiteboard diagrams, or code snippets directly into the chat!

Built With

Share this project:

Updates

Submission history