Skip to main content

Configuring GenAI in an Assignment

Enable budgeted GenAI API key generation and the AI learning tools for an assignment part so that your learners can use Generative AI in their lab work.

J
Written by Julia Dashzeveg

For Teachers and Admins

Generative AI (GenAI) in a Vocareum assignment gives your learners access to large language models in a controlled, budgeted way. You configure it per assignment part, which lets you decide exactly where in a course learners can use AI, how much they can spend, and which AI learning tools are available to them. This article walks through the steps to turn GenAI on for an assignment part, set a per-student budget, and enable the AI learning tools in a Vocareum Notebook assignment.

Before you can configure GenAI in an assignment, GenAI must already be enabled for your course by an admin at your institution. If GenAI has not been enabled for your course, the settings described here will not be available. For the steps an admin takes to grant a course access to GenAI, refer to Provisioning GenAI Access.

This article covers the configuration steps only. It does not describe what each AI learning tool does or when to use it. For that context, refer to What is GenAI in Vocareum Labs?, which is the source of truth for the AI learning tool descriptions.

Enabling GenAI API Key Generation for an Assignment Part

GenAI is configured at the level of an individual assignment part, in the Part Settings on the Edit Assignments page. Enabling GenAI API Key Generation issues each learner a scoped, budgeted GenAI API key in their lab environment for that part. To enable it, complete the following steps.

  1. Within your course, navigate to the Edit Assignments page.

  2. Create a new assignment or select an existing one.

  3. Select the name of the assignment part to open its Part Settings.

  4. In the Part Settings, open the Resources section. The Resources section holds all of the GenAI controls for the part: the Enable GenAI API Key Generation toggle and, when it is on, the GenAI Policy and Total Allowance Budget settings, followed by the Enable AI Assistant, Enable Code Generation (ipynb), and Enable Forum toggles.

  5. Toggle on Enable GenAI API Key Generation to activate GenAI in the assignment part. When this toggle is on, the GenAI Policy and Total Allowance Budget settings appear below it.

Setting a Budget

Once GenAI API Key Generation is enabled, you can set a budget to cap how much each learner can spend. The GenAI Policy determines which AI services and models are available within the assignment part. If an admin has already set a policy for the course, the GenAI Policy dropdown displays that policy and you cannot change it here.

To set a budget, fill out the Total Allowance Budget field with the upper limit on the amount each learner can spend on GenAI resources for this assignment part. This field accepts both whole numbers and decimals.

Enabling the AI Learning Tools

The AI learning tools are available only in Vocareum Notebook assignments. If your assignment part uses another lab type, these toggles do not apply, though GenAI API key generation still works. After GenAI API Key Generation is enabled, you can turn on any combination of the AI learning tools.

These tools are grouped in the Resources section as three top-level toggles: Enable AI Assistant, Enable Code Generation (ipynb), and Enable Forum. To learn what each tool does and when to use it, refer to What is GenAI in Vocareum Labs?.

Enabling and Configuring the AI Assistant

Enable AI Assistant makes a customizable GenAI chatbot available in the lab. When you turn this toggle on, it reveals a set of sub-options that let you tailor the assistant, including the AI-assisted Cells (ipynb) checkbox. AI-assisted Cells is a sub-option of the AI Assistant, not a separate toggle: to offer in-cell help, you must enable the AI Assistant first. To enable and configure the assistant, complete the following steps.

  1. Toggle on Enable AI Assistant to make the GenAI chatbot available in the lab and reveal its sub-options.

  2. Select the AI-assisted Cells (ipynb) checkbox to add an in-cell help control to Jupyter Notebook files.

  3. Select the Code Error Explanation (ipynb) checkbox to let learners request plain-language explanations of code errors in Jupyter Notebook files.

  4. Select the Show Assistant Rating (thumbs up/down) checkbox to let learners rate the assistant's responses.

  5. Toggle on Show Assistant Introduction Message to display an opening message when a learner first opens the assistant. Enter your own text in the message field, or leave it blank to use the default message shown in that field.

  6. In the Assistant Display Name field, enter the name learners see for the assistant or leave it blank to use the default name.

  7. Use the Default Assistant dropdown to pre-select an assistant for students. This option applies to Vocareum Notebook only. The dropdown lists the assistants available to your course, including any custom assistant built in AI Studio. To build a custom assistant, refer to Using AI Studio.

Enabling Code Generation and the Forum

Enable Code Generation (ipynb) and Enable Forum are separate top-level toggles in the Resources section. They are independent of the AI Assistant, so you can turn on either one without enabling the AI Assistant. To enable them, complete the following steps.

  1. Toggle on Enable Code Generation (ipynb) to add an in-cell code generation control to Jupyter Notebook files.

  2. Toggle on Enable Forum to add a discussion space where learners and teachers can discuss AI responses.

What Learners Get in the Lab

Once GenAI API Key Generation is enabled for the assignment part, each learner receives their own scoped GenAI API key in their lab environment. Learners can use that key through the AI learning tools you enabled, or copy it to call AI services directly from their own code. The key and its corresponding base URL are also exposed to code through environment variables that are pre-populated in the learner work area.

If your learners will call the key from their own code, refer them to GenAI Environment Variables Reference for the exact environment variable that holds each service's API key and base URL.

Related Articles

For the concepts and provisioning steps that accompany this procedure, refer to the following articles:

Did this answer your question?