rpmjp/portfolio
rpmjp/projects/skillbridge/ai-features.md
CompletedFebruary – April 2026

SkillBridge AI — Test Prep Academy Platform

Multi-tenant AI learning platform for test prep academies. Socratic AI tutor that refuses to give answers, AI quiz generation from uploaded files, async pre-grading, weak-spot detection, and AI parent summaries. Full role-based platform across admin, instructor, student, and parent.

LIVE DEMO
Python 3.12FastAPIPostgreSQL 16SQLAlchemy 2.0ReactTypeScriptTailwindGroq / Llama
Languages
Python54.2%
TypeScript45.1%
CSS0.3%
JavaScript0.2%
Dockerfile0.1%
Mako0.1%
ai-features.md

AI Features

The AI in SkillBridge does real pedagogical work. This page covers the five features where it earns its place: the Socratic tutor, quiz generation from files, async pre-grading, weak-spot detection, and parent summaries.


1. The Socratic tutor that refuses to give answers

The hardest and most important AI feature. A naive AI tutor is a chat box wired to an LLM — ask it for the homework answer and it gives you the homework answer. That's a cheating machine, not a tutor.

SkillBridge's tutor is built around a Socratic system prompt with explicit hard rules:

  • Never give the final numerical or text answer to a problem the student is working on
  • If asked directly ("just tell me", "I give up"), redirect with a question or hint instead of complying
  • End every response with a question or a concrete next step
  • If the student is genuinely stuck after several exchanges, suggest the instructor — never bypass by answering

Four modes, four behaviors

The tutor's behavior changes by mode, set per assignment by the instructor:

ModeBehavior
HintWaits for the student to share what they tried, then gives ONE small nudge. No step-by-step.
ScaffoldBreaks the problem into steps, walks one at a time, makes the student do each step. The final step belongs to the student.
CheckThe student shows work in progress; the tutor finds the ONE place the reasoning broke and asks a question about it. Doesn't rewrite the work.
ExplainPost-submission only. Now the tutor can walk the full solution for learning, highlight common mistakes, connect to similar problems.

Answer-extraction detection

Beyond the system prompt, there's a lightweight detector for phrases like "just tell me the answer" and "I give up" so the service can recognize and handle bypass attempts deliberately. The system prompt is the primary defense; the detector is a backstop.

Context injection

The tutor isn't blind. The system prompt is composed with the assignment's title, instructions, rubric criteria, instructor-uploaded materials (worksheet text extracted and truncated to fit the context window), and the student's current draft. So when a student says "can you see problem 1," the tutor actually can. See code/tutor_prompts.py.

Vision

Students can photograph handwritten work and attach it in the chat. The AI provider auto-switches to a vision model and the tutor references the image directly.


2. Quiz generation from files

Instructors generate practice quizzes from a topic, a standard (SAT/GRE/etc.), or an uploaded worksheet. The AI returns a structured JSON quiz — a mix of multiple-choice (with plausible distractors representing common mistakes) and short-answer questions, each with an explanation and point value.

The output is validated, not trusted: the service parses the AI's JSON, strips stray code fences, and checks every question — valid type, non-empty prompt, exactly one correct option for multiple-choice. Malformed output raises rather than showing the instructor garbage. The instructor reviews and edits before publishing. See code/quiz_generator.py.

When no standard is chosen, the AI also classifies the content — matching it to the standards catalog or proposing a free-form topic label — which feeds the auto-tagging of generated quizzes.


3. Async pre-grading

Grading short-answer questions with the AI is too slow to block a submission request. So it's decoupled: the student submits and gets immediate confirmation; pre-grading runs against each short-answer question, producing a suggested score and feedback; the instructor opens the submission to find the AI's suggestions pre-filled and either approves or overrides each one.

The grader awards partial credit, treats equivalent math expressions as correct, and writes feedback that speaks directly to the student without revealing the reference answer. Scores are clamped to the valid range. The AI never publishes a grade on its own — it does the first pass, the instructor owns the decision. See code/quiz_grader.py.


4. Weak-spot detection and tutor insights

Across a student's tutoring sessions and submissions, the platform surfaces per-student insights — which topics the student repeatedly struggles with — so instructors can intervene where it matters instead of guessing. This turns the raw tutoring activity into an actionable signal.


5. AI parent summaries

Parents get AI-written progress summaries built from their child's real performance data — grades, study plan progress, tutoring activity. Instead of a wall of raw numbers, a parent reads a coherent summary of how their child is doing and where they need support. The summary is generated from actual data, not boilerplate.


The thread tying these together

Every one of these features routes through the same ai_provider.py abstraction. None of them know or care which LLM answers. That's what makes the AI layer maintainable — five distinct features, one provider interface, one place to swap models or track tokens.