We developed AI content generation tools to make lab creation faster and easier for instructors. While building custom labs can be time-consuming, the benefits are clear: content you design can align closely with your course goals and dynamically support your students’ needs.
AI Wizard
Creating a new zyLab is an easy experience when using the AI wizard. Just add a zyLab, select a language, and click "Create with AI".
The first step is to create a set of instructions for the lab. Make sure to include all the elements of the program you want the learners to create.
Everything generated by the AI can be further modified to adjust the generation with more instructions.
Use modify to make any large changes, like what's being covered in the lab or changes to the steps. While regeneration can handle minor edits like the ones below, it can be easier to move to the next step and manually make small edits to the instructions after the wizard is complete.
The AI can also overwrite, edit, or skip writing instructions, if there are any existing instructions.
The next step is to generate a model solution. If your instructions are thorough, no additional instructions should be necessary, but can be added during the modify step if the first generation misses anything.
When modifying anything code generated by the AI, a diff checker will display anything added and removed.
Next step, the AI will prompt to generate the template based on the model. A diff checker will display here to show the differences between the model and template. The AI may provide too much code to start, so being explicit about what is included in the template can be helpful.
There may be specific functions you want to include and have the rest commented out, or perhaps you want to remove all comments the AI provides. Keep in mind that it may be faster to make minor edits manually after the wizard is complete.
The last step is creating unit tests. Output tests are currently not supported by the AI wizard, but can be best for input/output focused programs. Those tests can be added after adding unit tests, or by exiting the wizard at this stage.
It's important to be explicit about what each unit test should check, as it will base the test on the model in an effort to make one test that checks everything.
In this calculator example, we may want a test for each operation separately. In another example you may be checking various functions. After each test is generated and accepted, another unit test can be generated until you select "No, All Done!".
The wizard will then run all generated tests against the model solution to confirm everything works as expected. If the model creates any files or a database on run, the tests will likely fail. You can run the model and re-run the tests from the test bench.
Generate a Model Solution
When using the automated test bench to evaluate student's code, a model solution is useful to verify those tests work as expected. Make sure all necessary files are in the template before moving to the next step.
Click Generate with AI to create a model solution, or delete the existing solution if there is one.
Click Start in the modal that appears, then select all or specific files for the AI to generate. Include only the files that students are expected to edit. Do not include files they should not modify, such as database files, configuration files, image assets, compiled libraries, or starter code for helper functions.
Click Next, then describe the ideal solution to help the AI generate it accurately.
Click generate and the model solution will appear after a moment. Review the code to verify there are no issues, and select Accept, or click Modify to have the AI make changes.
When modifying code, add additional context for the necessary changes, then click Regenerate.
The modified code will appear in a visual diff, with removed lines in red and added lines in green.
Once the generation is accepted, you can run the code for further testing.
Generate a Unit Test
The automated test bench features two options that allow easier creation of tests. The AI unit test generator creates tests based on your model solution and the description you provide. Both are required. To begin, click Add Test Case, select Unit Test, and enter a description. Then click Generate with AI.
Select Run to confirm the test works.
Confirm changes to the test bench, including any other changes that were made prior to the unit test generation.
Tests may require changes to pass. We encourage your feedback on this feature.
Output Tests
Output tests also feature an option to accelerate test creation. Generate output from solution does not use AI, but uses your input and the model solution to automatically populate that test's output.