Generate Variants with AI
Writing a second version of an exercise by hand is the expensive part of exercise variants. For a programming exercise it means re-theming the problem statement, template, solution and tests consistently, keeping every task-to-test link intact, and making sure the solution still builds green while the template still fails.
Artemis can do that work for you. Create Variant with AI takes an existing exercise, asks what should change, and produces a complete, verified Artemis exercise in the background.
Supported Exercise Types
| Exercise type | Supported |
|---|---|
| Programming | Yes |
| Quiz | Yes, unless the quiz contains drag-and-drop questions |
| Modeling, Text, File Upload | No |
The action is hidden for exercises it cannot handle, and for anyone below the Editor role.
Starting a Generation
On the course's Exercises page in course management, the overflow menu (…) of an exercise row offers Create Variant with AI. In exams, the same action sits on the rows of an exercise group.
A wizard opens and walks through the five stages below in order.
Select What Should Change
Pick one or more aspects. You can combine them freely.
| Aspect | Effect |
|---|---|
| Difficulty | Re-tunes how hard the exercise is. The variant keeps the core concept and the clear majority of its tests — it is never gutted, and a task never becomes easier by handing students working code |
| Application Domain | Moves the exercise to a different real-world theme. Algorithm, data-structure and design-pattern names stay as they are, because they are the learning content |
| Storytelling | Sets the narrative style, from a plain technical description to a fully told story |
| Custom | Free-text instructions of your own |
Configure the Aspects
Fill in the details for the aspects you selected: the target difficulty, the new domain, the narrative style, and your custom instructions.
The narrative styles are:
| Style | Description |
|---|---|
| Technical | No story — a plain, concise focus on the technical concepts |
| Realistic | A short real-world scenario introduces the task, the rest stays technical |
| Creative | A story carries the task: themed setting, named actors, story-driven examples |
Choose the Placement
Decide where the finished variant goes.
| Option | Result |
|---|---|
| Create new group with original | A new variant group holding the source exercise and the variant. You set the group title, points cap and timeline right here |
| Add to group "…" | The variant joins the group the source exercise already belongs to |
| Add as standalone exercise | No group — the variant appears on its own in the exercise list |
Follow the Generation
The wizard shows the phases as they happen: the source exercise is analyzed, the change is planned, a real copy is provisioned, the changes are applied, and the result is verified and — if needed — repaired.
A programming variant runs real template and solution builds, so a generation typically takes a few minutes. Quizzes are faster.
Click Run in Background to close the window and let the job continue. It then appears in the tray in the navigation bar, where you can follow it, reopen the full view, or cancel it.
Canceling ends the job and removes the half-finished exercise copy, including its repositories and their builds. Jobs stay in the tray for 24 hours so you can review a result later.
Review the Result
The result step summarizes what the AI did per phase, how many tokens the run used, and offers Open in Editor to review the variant.
What Artemis Checks
Before a variant is accepted, it has to pass objective gates. They run cheapest first, and every finding goes back into the next repair round. The first four are hard gates: a variant is never accepted while one of them reports a problem. The AI-backed checks that follow are best-effort — when the model is unavailable, fails or exceeds its time budget, the check contributes no finding for that round and the run continues without it:
- The solution builds and passes all tests.
- The template still fails, so students actually have work to do.
- Every task-to-test reference in the problem statement resolves to an active test case, so grading stays wired up.
- Quiz validity: questions, answer options and points are consistent.
- A semantic consistency check (best-effort) compares problem statement, template, solution and tests against each other (the same check described under Consistency Check).
- A quiz critique (best-effort) reviews the generated questions for wording and answer quality.
Outcomes
| Outcome | Meaning |
|---|---|
| Completed | Every hard gate passed, and every best-effort check that ran reported nothing. The variant is placed as configured and ready for review. A best-effort check that could not run is skipped silently, so review the variant yourself rather than reading Completed as a full semantic sign-off |
| Draft with warnings | Some check did not pass within the attempt budget, or the placement failed. The exercise is created all the same, with a short note on what is wrong — open it in the editor and fix that. A warning about the placement means the variant is not in the group you chose, so move it there yourself |
| Failed | The run could not produce a variant. The result step explains the phase it failed in and how to continue, and the half-provisioned exercise is deleted |
| Canceled | You stopped the run, and the half-provisioned exercise is deleted |
Exam Exercises
Generation works the same way for exercises inside an exam exercise group, with two deliberate differences:
- There is no placement step. The variant always joins the exercise group of its source, which is what makes it usable as a per-student variant, and it inherits the exam's timing.
- There is no difficulty option. Exam difficulty is reviewed in advance, and handing students variants of differing difficulty would be unfair.
Troubleshooting
The Action Is Not Visible
Check that the Hyperion module is enabled on your instance, that you have at least the Editor role in the course, and that the exercise is a programming exercise or a quiz without drag-and-drop questions.
The Run Ended as a Draft with Warnings
Open Show technical details on the result step. It names the gate that did not pass — most often a build that stayed red or a task reference that no longer resolves to a test. Fixing that in the editor is usually a small edit.
The summary above it is written by the model, so read it as a description of what went wrong, not as instructions: the exercise already exists by then, and there is no later publish step to reach. If one of the warnings is about the placement, the variant is not in the group you chose and you have to move it there yourself.
Generation Is Slow
Programming variants trigger real template and solution builds in every verification round. If your build agents are busy, the run waits for them.






