AI-Powered Lesson Generation System for Language Learning

duolingo · Education · 2023 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Language-learning content creation

Duolingo needed to create and maintain lesson exercises faster for a very large learner base without giving up pedagogical control, grammar constraints, CEFR targeting, vocabulary appropriateness, or expert review.

Constraints:

Architecture

Duolingo added an LLM-assisted workflow to its lesson-authoring process. Learning Designers plan the lesson's theme, grammar, vocabulary, and exercise type. Engineering infrastructure fills some prompt-template blanks automatically, such as language, CEFR level, and theme, while the Learning Designer fills pedagogical parameters such as exercise type and grammar focus. The prompt combines fixed rules, including answer-option count and character limits, with variable lesson parameters. The LLM generates multiple candidate exercises in seconds. Teaching experts then choose, edit, and approve the best options before they enter the app.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  curriculum-plan["curriculum-plan"] --> prompt-template["prompt-template"]
  automatic-parameter-fill["automatic-parameter-fill"] --> prompt-template
  designer-parameter-fill["designer-parameter-fill"] --> prompt-template
  prompt-template --> llm-generator["llm-generator"]
  llm-generator --> candidate-exercises["candidate-exercises"]
  candidate-exercises --> learning-designer-review["learning-designer-review"]
  learning-designer-review --> teaching-expert-approval["teaching-expert-approval"]
  teaching-expert-approval --> duolingo-app-content["duolingo-app-content"]
  duolingo-app-content --> birdbrain-personalization["birdbrain-personalization"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
curriculum-plan Human-authored lesson design specifying theme, grammar, vocabulary, and exercise type. prompt-template
prompt-template Mad Lib-style prompt with fixed rules and variable lesson parameters. curriculum-plan, automatic-parameter-fill, designer-parameter-fill, llm-generator
automatic-parameter-fill Engineering-supported population of fields such as language, CEFR level, and theme. prompt-template
designer-parameter-fill Learning Designer input for exercise type, grammar focus, and other pedagogical steering. prompt-template
llm-generator Large language model that generates candidate exercises from the completed prompt. prompt-template, candidate-exercises
candidate-exercises Generated exercise options for human review and editing. llm-generator, learning-designer-review
learning-designer-review Human selection and editing step for naturalness, learning value, and vocabulary fit. candidate-exercises, teaching-expert-approval
teaching-expert-approval Final human quality gate before generated exercise content enters the app. learning-designer-review, duolingo-app-content
duolingo-app-content Published lesson content shown to learners after expert approval. teaching-expert-approval, birdbrain-personalization
birdbrain-personalization Existing Duolingo AI model that selects exercise difficulty based on learner strengths and weaknesses. duolingo-app-content

Data flow

A Learning Designer starts with curriculum intent: theme, grammar, vocabulary, and exercise type. The internal tool fills template variables such as language, CEFR level, and theme, while the designer supplies remaining blanks like grammar focus and exercise type. The prompt template includes fixed constraints such as two answer options and fewer than 75 characters. The LLM produces ten candidate exercises in seconds. The Learning Designer chooses three favorites, edits for naturalness, learning value, and vocabulary, and Spanish teaching experts have the final say before publication.

5 supporting quotes
“The Learning Designer plans out the theme, grammar, vocabulary, and exercise types for a given lesson.”article, stated
“Thanks to our amazing engineers, some blanks get filled in automatically (like the language, CEFR level, and theme of nostalgic memories).”article, stated
“The Learning Designer fills in a few more blanks, such as the exercise type and the grammar focus, to steer the AI in the right direction.”article, stated
“In a matter of seconds, the AI model outputs ten exercises that fit the difficulty level, the grammar, and the theme.”article, stated
“The Learning Designer then chooses their three favorite sentences, but they can still make edits before they go into the app.”article, stated

Why this architecture

Duolingo kept curriculum design and final approval with teaching experts because educational quality depends on pedagogy, naturalness, vocabulary fit, and learner progression. The Mad Lib prompt template makes lesson generation scalable by separating fixed exercise rules from variable course parameters. Automatic parameter fill reduces repetitive setup, while Learning Designer inputs steer the model toward the target grammar and exercise type. Generating multiple candidates in seconds gives experts options, but the review gate catches unnatural or low-value outputs before publication.

4 supporting quotes
“Until now, every single exercise chosen by Birdbrain was written, reviewed, edited, and translated by human experts”article, stated
“it still needs a lot of help from us humans—in fact, we’re constantly adjusting the instructions we give the model.”article, stated
“You can think of the prompt as kind of like a Mad Lib for generating Duolingo lessons.”article, implied
“After we put all the fixed and the variable information together into one prompt, the model will produce an exercise with one click.”article, stated

The benefits of using AI for lesson creation

At the time of writing this, Duolingo has fewer than 1,000 employees and over 21 million daily users."

— article, stated

Models used: large language model · Birdbrain

Scale

Alternatives considered (roads not taken)

Fully manual exercise creation

Rejected because: Every exercise had previously been written, reviewed, edited, and translated by human experts, which limited content-update frequency.

“every single exercise chosen by Birdbrain was written, reviewed, edited, and translated by human experts”article, stated
  1. Delve deeper into the CEFR scale to teach more advanced concepts"

— article, stated

Let the LLM generate lesson content without expert steering

Rejected because: The model needs detailed instructions and guardrails to produce pedagogically useful exercises in the right direction.

“it still needs a lot of help from us humans—in fact, we’re constantly adjusting the instructions we give the model.”article, stated
“if we want it to go in the right direction, we’ve got to build some guardrails.”article, stated

Publish generated exercises automatically

Rejected because: Some generated sentences follow rules but sound unnatural, so teaching experts choose, edit, and approve before publication.

“all these exercises follow the rules, but some of them sound a little stilted or unnatural.”article, stated
“the Learning Designer would probably make some tweaks for naturalness, learning value, and appropriate vocabulary.”article, stated

Use a one-off prompt for every lesson

Rejected because: The Mad Lib template separates fixed rules from lesson-specific variables so the workflow can scale across languages, levels, and grammar targets.

“Some of the instructions are the same for a particular exercise type. For example, Rules 1 and 2 don't change.”article, stated
“Other instructions change for every new exercise we generate: Rule 3 changes depending on the course we’re working on and the difficulty level we’re generating for.”article, stated

Patterns

structured-output-contract (contracts)

The prompt constrains generated exercises by answer-option count, character limit, CEFR level, target language, and grammar focus.

“The exercise must have two answer options.”article, stated
“The exercise must contain THE PRETERITE TENSE and THE IMPERFECT TENSE.`”article, stated

guardrails-io-filtering (safety)

Duolingo frames prompt instructions as guardrails that steer the LLM toward acceptable lesson outputs.

“if we want it to go in the right direction, we’ve got to build some guardrails.”article, stated
“We write a “prompt,” or a set of detailed commands, that “explains” to the AI model how to write a given Duolingo exercise.”article, stated

human-in-the-loop-gate (control)

Learning Designers and Spanish teaching experts choose, edit, and approve generated exercises before they enter the app.

“The Learning Designer then chooses their three favorite sentences, but they can still make edits before they go into the app.”article, stated
“Ultimately, our Spanish teaching experts always have the final say.”article, stated

prompt-versioning (prompting)

The article implies active prompt maintenance by describing constant adjustment of instructions, though it does not describe a formal versioning system.

“we’re constantly adjusting the instructions we give the model.”article, implied

model-routing (inference)

Duolingo already uses Birdbrain for personalized exercise difficulty and a separate LLM workflow for generating exercise candidates.

“In fact, we’ve been using an AI model called "Birdbrain" to make sure the exercises you see on Duolingo are at the perfect difficulty level based on your strengths and weaknesses.”article, stated
“Today, we’ve moved into using AI to create these exercises.”article, stated

Tradeoffs

Use AI as a draft generator

Chose LLM-generated candidate exercises with expert review over fully manual exercise writing for every candidate.

Rationale: Generating options in seconds gives learning experts more raw material while preserving editorial control.

“In a matter of seconds, the AI model outputs ten exercises that fit the difficulty level, the grammar, and the theme.”article, stated
“The Learning Designer then chooses their three favorite sentences”article, stated

Keep curriculum planning human-driven

Chose Learning Designer planning of theme, grammar, vocabulary, and exercise type over letting the LLM decide the lesson objective.

Rationale: The article positions educational strategy as expert work and uses the model only after humans define the lesson target.

“The Learning Designer plans out the theme, grammar, vocabulary, and exercise types for a given lesson.”article, stated
“The Learning Designer fills in a few more blanks, such as the exercise type and the grammar focus”article, stated

Use prompt templates

Chose fixed and variable prompt fields over free-form prompt writing for each exercise.

Rationale: Template blanks allow engineers and designers to combine stable exercise constraints with lesson-specific variables.

“Some of the instructions are the same for a particular exercise type. For example, Rules 1 and 2 don't change.”article, stated
“Other instructions change for every new exercise we generate”article, stated

Require final teaching-expert review

Chose human editing and final say over automatic publication of rule-following outputs.

Rationale: Generated exercises may meet formal constraints but still need naturalness, learning value, and vocabulary judgment.

“some of them sound a little stilted or unnatural.”article, stated
“Ultimately, our Spanish teaching experts always have the final say.”article, stated

Gotchas (what bit them)

Formally valid generated content can still be pedagogically weak.

Root cause: The LLM can satisfy grammar and format constraints while producing unnatural or low-value sentences.

Resolution: Learning Designers edit for naturalness, learning value, and vocabulary, and teaching experts keep final approval.

“all these exercises follow the rules, but some of them sound a little stilted or unnatural.”article, stated
“make some tweaks for naturalness, learning value, and appropriate vocabulary.”article, stated

Prompt templates need ongoing expert adjustment.

Root cause: The model can generate text from examples, but it needs detailed steering to align with Duolingo's lesson goals.

Resolution: Duolingo keeps teaching experts in the prompt-development loop and continuously adjusts instructions.

“it still needs a lot of help from us humans—in fact, we’re constantly adjusting the instructions we give the model.”article, stated

The article does not quantify production quality improvements.

Root cause: The company blog describes convenience, speed, and productivity qualitatively but does not provide measured content velocity or learner outcome metrics.

Resolution: Treat the claimed benefits as directional and preserve the known process details rather than overstating impact.

“Like any innovative tool, with a good operator, it can bring our in-house teachers convenience, speed, and productivity:”article, stated
“There are no specific metrics shared about content creation speed improvements, quality metrics, or user satisfaction”summary, stated

The model provider and monitoring setup are not disclosed.

Root cause: The article is an introductory workflow description, not an infrastructure or LLMOps post.

Resolution: Record the LLM workflow while leaving provider, evaluation, and monitoring details unknown.

“Which specific LLM provider or model is being used”summary, stated
“How the company evaluates and monitors output quality at scale”summary, stated

Evaluation

The article describes expert review rather than a numeric evaluation harness: Learning Designers inspect generated candidates, edit for naturalness, learning value, and vocabulary, and Spanish teaching experts have final approval before content enters the app.

Metrics: rule compliance · naturalness · learning value · vocabulary appropriateness · expert approval · course content production speed

3 supporting quotes
“all these exercises follow the rules, but some of them sound a little stilted or unnatural.”article, stated
“make some tweaks for naturalness, learning value, and appropriate vocabulary.”article, stated
“Ultimately, our Spanish teaching experts always have the final say.”article, stated

Outcomes

The article reports fewer than 1,000 employees, over 21 million daily users, most courses releasing new content only a few times per year, an example prompt with two answer options, a 75-character limit, A2 CEFR Spanish, ten generated exercises in seconds, and three selected favorites.

6 supporting quotes
“we’re also using AI behind the scenes to build courses faster and better than ever.”article, stated
“In a matter of seconds, the AI model outputs ten exercises”article, stated
“The Learning Designer then chooses their three favorite sentences”article, stated
“Delve deeper into the CEFR scale to teach more advanced concepts”article, stated
“Allocate resources to more features like Stories, DuoRadio, and a host of ideas still in the works 3.”article, stated
“Expand our focus to smaller courses that aren’t often in the spotlight”article, stated