Skip to content

levelbuilder: generate lesson with AI#72537

Open
breville wants to merge 11 commits intostagingfrom
levelbuilder-ai-generate-lesson
Open

levelbuilder: generate lesson with AI#72537
breville wants to merge 11 commits intostagingfrom
levelbuilder-ai-generate-lesson

Conversation

@breville
Copy link
Copy Markdown
Member

@breville breville commented May 6, 2026

This proposes a new levelbuilder feature to generate a lesson's levels using AI.

The goal is to make it faster and easier to create a lesson's levels. It's influenced by Jamila's Levels and Slides Drafter demo.

This feature is accessed by visiting /s/[script]/lessons/[lesson]/generate.

As working right now, a levelbuilder can generate an entire lesson of panels & weblab2 levels from a single description. It's also easy to adjust the set of levels & their individual descriptions before generating them.

From a single lesson prompt

When starting, it's optional to generate a set of levels from a single lesson prompt:

localhost-studio code org_9000_s_intro-to-web-lab_lessons_2_generate (3)

If provided, this prompt is also fed to all subsequent generation operations to maintain some common context across all levels.

A set of level descriptions

Here's an example set of level descriptions generated from this prompt:

localhost-studio code org_9000_s_intro-to-web-lab_lessons_2_generate (4)

If the single lesson prompt was not used, this can all be set up manually. And even if the prompt was used, this can all be adjusted before the levels generation takes place.

Levels generation

When ready, levels generation can be initiated. A popup shows progress, with even more detail emitted to the console. The feature creates levels and their content: images & text for panels levels; instructions, HTML/CSS/JS for weblab2 levels.

Screenshot 2026-05-05 at 4 37 39 PM

The generated content of all preceding levels is provided for each new level's generation, helping it to maintain consistency.

A lesson

Once generation is complete, we have a lesson with levels. They'll include panels:

Screenshot 2026-05-05 at 8 35 00 PM

And weblab2:

Screenshot 2026-05-05 at 4 44 46 PM

Revisions

It's important to note that this is designed to be run repeatedly for the same lesson when desired. On the generate page, the Generate checkbox is checked if the description is updated, and can also be checked manually, so that the level will be updated on the next initiation of levels generation.

Other labs

This feature enumerates but leaves unsupported levels intact, so that a wider variety of level types can be included in a lesson. Of course, we can add generation of additional level types in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant