All projects
AI and AutomationStarred

AI Tutor for Students

An AI tutor that guides students step by step in practice, lessons, and coding classes without handing out the answer key.

Status
Live
Layers
AIBackendFrontend
Used by
Students studying on their own in practice questions, lessons, and coding classes.
The Ask about this material panel in a Numekara lesson, where students ask the AI tutor
Screenshot

The problem

Students get stuck when studying alone outside lesson hours, and a human tutor can't answer every question at any time.

The solution

The tutor answers from published course material and official solutions, gives hints in stages from concept to solution, and holds back the final answer. Daily quotas and spending caps keep AI costs predictable.

How it works

What happens, step by step, from the user's point of view.

  1. 01

    A stuck student asks

    On a practice, lesson, or coding page, the student opens the tutor panel and types a question.

  2. 02

    Quota and cost check

    The system checks the student's daily quota and the day's AI spending cap. If either is used up, the tutor still answers from the material without calling the AI.

  3. 03

    Pull from official material

    The tutor gathers matching concept explanations, examples, and official hints. The full solution is only included once the student asks for deeper help and the rules allow it.

  4. 04

    AI writes a staged hint

    The AI model writes a hint using only that material. If the AI service fails, a backup service or a rule-based responder takes over.

  5. 05

    Checked before it appears

    An automatic checker holds back replies that leak the answer key or cite sources outside the material. If held back, the student gets the official hint instead.

System design

Who uses it, what they see, what works behind the scenes, and where the data lives. Read it from left to right.

  1. 1People

    • StudentAsks while solving questions, reading lessons, or writing code.
  2. 2What they see

    • Tutor panelA chat window beside the question, lesson, or code editor.
  3. 3Behind the scenes

    • Tutor coordinatorPicks material for the right level of help and checks daily quotas.
    • Answer checkerBlocks replies that leak the answer key or stray from the material.
  4. 4AI services and data

    • AI modelOpenRouter (DeepSeek) writes the reply, with Gemini as a backup.
    • DatabasePostgreSQL stores course material, past conversations, and AI cost records.

Key features

  • Staged hints, not instant answers
  • Grounded in official course material
  • Guards against answer-key leaks
  • Daily quotas and cost caps
  • Fallback when the AI fails

Built with

  • Python
  • FastAPI
  • PostgreSQL
  • OpenRouter API
  • Gemini API
  • Next.js

What the business gets

  • Students get help outside lesson hours without hiring more tutors.
  • The answer key stays hidden; students are guided to think it through.
  • Spending on AI services is capped per student and per day.
  • The tutor still answers from the material when quotas run out or the AI service is down.

Terms on this page

Model AI (LLM)
Software trained to read and write text like a person, used here to write hints.
OpenRouter
A go-between service that connects an app to many AI models through one door.
Fallback
A backup route that kicks in automatically when the main one fails.

Can it work for your business?

The same pattern can power an assistant for your staff or customers: it answers only from your approved documents, with clear cost limits.

Ask about this project