Lately I've been experimenting with the template grader for my classes. I have a prototype that will send the first failed test result, along with the code and question text, all to AI alongside a built in prompt. This returns some text for the student where it's instructed to ask "guiding questions" to assist them.
This all works great so far. I have a 5 second timeout to the AI call built in, etc. The trouble I'm running into is, if I regrade a class question it will prompt the AI for every student on the regrade. This adds a lot of time to regrading, especially if there's a couple questions involved for a full class.
My question being, is there any way you can think of where I can have the template grader "detect" or know if this is a regrade? Maybe can it tell if there is an active user session? Any other thoughts to how I could work around this regrade time extension?