Inspiration

We were inspired by our childhood experiences in learning things — specifically how a single good explanation, framed the right way, could make a concept click instantly. We wanted to build something that adapts to how a student learns, not just what they're learning.

What it does

PolEdu is a personalized English and Math tutoring platform. You tell it your name and how you learn best, and it generates a fully structured math lesson tailored to you — inline in chat, no page navigation required. Hands-on learners get interactive slider graphs and step-by-step guided problems. Listening learners get real-world analogies and narrated explanations. Every lesson comes with a 10-question mini-test with instant feedback. It can also generate full IELTS mock tests on demand.

How we built it

  • Frontend: Vue 3 + TypeScript (Vite), with custom canvas-based graph components and KaTeX for math rendering
  • Backend: FastAPI (Python) with a background job queue for async lesson generation
  • Lesson generation: GPT-5.2 with a structured JSON schema prompt, validated server-side across 3 retry attempts
  • Chat routing: Orchestrated intent classification with Dify with OpenAI GPT-4o as intent classifier, and Gemma 3 12B via the Gemini API as a fallback classifies every message into an intent (create lesson, ask topic, capabilities, etc.)
  • Research: Exa API fetches real web content on the math topic before generation
  • IELTS retrieval: ChromaDB local vector database over ingested PDF documents

Challenges we ran into

  • Getting GPT to reliably generate structured JSON lesson payloads with the correct block types for each learning style — required strict schema examples in the prompt and a validation + retry loop
  • Rendering math expressions and interactive graphs inside a scrollable chat window without overflow or layout breakage
  • Making the learning experience genuinely different between personas, not just cosmetically different — this required new block types (slider-graph, guided-steps, analogy) and per-section narration

Accomplishments that we're proud of

  • Two learners asking about the same topic get structurally different lessons, not just different wording
  • The inline lesson card renders fully inside the chat — interactive graphs, sliders, LaTeX, and a mini-test — without ever leaving the conversation
  • The backend validates every generated lesson against a strict schema before serving it, so malformed AI output never reaches the user

What we learned

  • Prompt engineering for structured output is as much about schema examples as it is about instructions — showing GPT the exact JSON shape you want is more reliable than describing it
  • Building adaptive UIs for different learning styles forces you to think deeply about pedagogy, not just product design
  • Async background jobs with polling are a practical pattern for expensive AI generation tasks that would otherwise timeout a request

What's next for PolEdu

  • More subjects beyond math (physics, chemistry)
  • Spaced repetition — revisiting weak topics from past lessons automatically
  • Student progress dashboard tracking mastery per topic over time
  • Voice input so learners can ask questions naturally

Built With

Share this project:

Updates