1. The problem with answers
When ChatGPT arrived, computer science education met a problem it had not planned for: the homework stopped being hard. Generative models produce working solutions for typical introductory assignments on demand. Binary trees, dynamic programming, the usual suspects.
The working solution is not the danger. The danger is what gets skipped. Reading compiler traces, building a mental model of memory, debugging the same bug four times: that struggle is the education. A student who outsources it submits working homework and learns nothing. The grade survives. The engineer does not exist yet.
Banning AI was the popular response and it was always going to fail. Engineers write code alongside AI every day now. The question my thesis asked was narrower: can you build an environment where the model helps the student think instead of thinking for them?
2. What we built
Gurukul is three systems in sequence:
[Student Code & Question in Web IDE]
│
▼
[AST Parser & Static Diagnostic Engine]
├── Syntax error & infinite loop detection
└── Algorithmic pattern matching against course spec
│
▼
[Socratic Guardrail Engine]
├── Detects direct solution requests ("give me the code")
└── Enforces 3-tier progressive hint ladder
│
▼
[Retrieval-Augmented Guidance (RAG)]
├── Grounded in verified textbook algorithms & syllabi
└── Excludes raw code completion from prompt context
│
▼
[Pedagogical Socratic Response]
(Asks leading questions, highlights invariants, avoids code leakage)The AST parser reads the student’s code the way a compiler would: it finds the syntax break, the infinite loop, the pattern that does not match the course spec. The retrieval layer grounds hints in verified textbook material and, importantly, excludes raw code completions from the prompt context entirely. The guardrail engine sits between the student and the model, and it decides what the model is allowed to say.
3. The hint ladder
Instead of an answer, Gurukul returns one of three hints, matched to where the student actually is:
- Level 1, a conceptual clue. The principle without the syntax. “Consider what happens to your left pointer when the midpoint element is smaller than the target.”
- Level 2, algorithmic direction. The state transition in plain language. “In a sorted array, elements left of
midcannot contain the target whenarr[mid] > target.” - Level 3, fill-in-the-blank pseudocode. Structure with the conditions blanked out. The student still writes the logic themselves.
Ask for the code directly and the guardrail declines and steps back down the ladder. The model can phrase whatever it wants; the application owns what gets revealed.
4. What the studies showed
In user studies with Virginia Tech students learning data structures: students using Gurukul showed higher conceptual retention on delayed post-tests than students with open access to unconstrained ChatGPT. They also reported less frustration, because a hint aimed at your actual misconception beats a wall of generated boilerplate.
The finding I would stand behind is the narrower one. Deterministic guardrails on a generative model are feasible, and they change the learning outcome. Not by making the model smarter. By deciding, in advance and in code, what the model is for.