AlgoGarage
Developed using gpt-5.6-luna ♥
AlgoGarage is a portal for the Advanced Data Structures and Algorithms Laboratory at IIT Tirupati. Students sign in with their roll number, open the lab that is active that week, and upload a C or C++ file for each question. A 9B parameter Qwen model on a GPU server in the department reads the file and writes a short review. It does not compile or run the code, and it does not say what the output should be. The instructor sets how much it is allowed to say for each question.
The lab runs without internet access, so students cannot reach ChatGPT or Claude from the lab machines. AlgoGarage and the model run on a server inside the department and are reachable from the lab. The model reads the student’s own file and answers about that file. The student still writes, compiles and runs the program.
The review is shown on its own page. The first line is a summary. Each hint after it points to a line number or a function in the uploaded file, and the file is shown beside the hints with the same numbering. If the instructor has allowed code for that question, the model also gives a corrected fragment with a short explanation. The page then lists up to three small inputs. Each one is small enough to trace by hand. The last item is one thing to try next.
Each question has a help level from 0 to 100 in steps of 10, and a switch that turns the model off for that question. The instructor sets these in the question editor and can also change them while the lab is running. The next upload uses the new setting, and the level in force at the time is stored with every submission. For example, in Lab 2, questions 1 to 4 were at 70 and questions 5 to 8 at 30. Questions 3 and 8 had the model switched off.
The instructor signs in to a separate console. Its numbers change as the lab runs. It shows how many students have uploaded for each question, the number of attempts on each, and how many have finalized so far. For each question it also lists the lines and functions the model has pointed to most often. The instructor can see which mistake the class is making and say something about it at the board. If one question is holding the class up, the instructor can raise its help level from the same console, and the next upload gets more help. The instructor can also correct the wording of a question while the lab runs, and can leave the model a private checklist for that question. The model uses the checklist from the next review on, and students never see it. A student who is still stuck after a review can ask for the instructor from the same page. The request appears in the console with the file and the review attached.
Signing in and choosing a question
The portal is reached from the lab network at algogarage.iittp.ac.in. A lab page lists its questions, and a question page holds the full statement. The upload panel on the right shows the help level set for that question.
The exercises
The labs are set in two ways. In one, each question stands alone. The problem is stated, and the student writes the whole program. In the other, the questions come in pairs. The first part of a pair states a problem and gives a complete working program for it, with comments that explain each step. The second part states a related problem, and this time the student writes the program. The second part builds on the first and needs one more idea. As an example, the first part may ask for the smallest number in an array and supply the program. The second part then asks for the second smallest.
The arguments are the values of an array of integers, with at least one value. Print the smallest value.
// Compile g++ -std=c++17 -Wall smallest.cc -o smallest
// Run ./smallest 7 3 9 3 5
// Output 3
#include <iostream>
#include <vector>
#include "args.h"
int main(int argc, char* argv[]) {
Args args(argc, argv);
// Read every argument into a vector.
// The problem promises at least one value.
std::vector<int> values;
while (args.has()) {
values.push_back(args.next<int>());
}
// Take the first value as the smallest seen so far.
int smallest = values[0];
// Compare each remaining value with it. A strictly smaller
// value becomes the new smallest.
for (std::size_t i = 1; i < values.size(); ++i) {
if (values[i] < smallest) {
smallest = values[i];
}
}
std::cout << smallest << "\n";
return 0;
}
Part 2
The arguments are the values of an array of at least two distinct integers. Print the second smallest value.
Submitting an attempt
Two buttons sit under the upload panel. Submit for feedback saves the file and sends it to the model. Submit saves the file without contacting the model, for a student who wants to record an attempt and nothing more. Both count for finalization. The upload shown below was reviewed in 21 seconds.
The review
The file reverses a linked list but returns the old head. At level 70 the model may show code. It gave the corrected function, one line on why, and two inputs to trace, without saying what either should print.
How much help
The level changes both what the model is asked for and what the server lets through. The rows below list what each level permits. Whatever the model returns is checked again on the server before the student sees it. Statements of expected output are removed, code is dropped when the level does not allow it, and a complete program passes only at 100.
| Level | Hints | Code | What the model is told |
|---|---|---|---|
| 0 and 10 | 1 | none | Give a minimal nudge. No fix, no algorithm, no code. |
| 20 | 2 | none | Give conceptual hints tied to a place in the file. No code. |
| 30 | 2 | 1 fragment, up to 8 lines | Name syntax mistakes and show one very small corrected fragment. |
| 40 and 50 | 3 | 1 fragment, up to 14 lines | Explain the language rule or the invariant at fault, with one targeted correction. |
| 60 and 70 | 4 | 2 fragments, up to 24 lines each | Diagnose syntax and logic, explain the reasoning, and correct up to two places or one function. |
| 80 and 90 | 5 | 2 fragments, up to 70 lines each | Give near complete functions and explicit steps, leaving one step to the student. |
| 100 | 6 | 1 program, up to 220 lines | Give one complete corrected program. |
| Off | none | none | Save the file. The model is not contacted. |
Finalizing a lab
A lab has two finalization buttons, each with its own deadline. Finalize in lab records the latest upload for every question at that moment. Finalize after lab records only the questions uploaded again after the first snapshot. In-lab work is scored out of 100, after-lab work out of 25, and the higher score for each question is the one that counts.
The instructor’s console
After the lab the console shows how many snapshots were finalized, how many items have been graded, and whether the results have been released. A table gives the same numbers for every question, with the average score once results are out. Any upload can be opened to see the file and the exact review the student saw. Grading is done on the same pages. Work finalized in the lab is scored out of 100, work finalized after it out of 25, and the higher score is kept for each question. Once scores are released a student can ask for a regrade, and the request appears in the console.
Behind the review
Before the file goes to the model, every comment in it is blanked out and the line numbers are kept, so a request written in a comment is never read as an instruction. The model is sent the question, the instructor’s private note, the help level, and the numbered file. It must reply in a fixed JSON shape with a summary, hints, inputs, code and a next step. The server then checks the reply against the level. The reply is also checked against the file, so a fragment identical to what the student wrote is not shown as a correction.
- UploadThe file is saved under a random name. Comments are blanked, line numbers kept.
- PromptProblem statement, input format, constraints, the private note, the help level, the numbered source.
- ModelQwen on the department GPU, reached only from the server. One retry if the JSON comes back broken.
- FilterOutputs removed, code cut to the level, unchanged fragments dropped, hints without a line replaced.
- PageSummary, hints, code, inputs, next step. The level used is stored with the file.

























