Large Language Models (LLMs) like ChatGPT, Claude, and Gemini have been trained on enormous amounts of language data in order to have natural-sounding exchanges. But using them to teach language learners is not as easy as saying, “Hey! Talk to this learner in Spanish!”
To develop AI-powered features like Video Call with Lily, we can’t just let the model roam freely. Instead, we use targeted instructions and a predictable structure to make sure every call with Lily brings delight and sass—and, of course, the opportunity for speaking practice.
How we design each Video Call
When designing the perfect call experience, we have a lot of priorities to balance:
- It needs to be at the appropriate CEFR level.
- It needs to have a purpose—like telling you a story, asking your opinion, teaching you something, or simply having a chat.
- It needs to feel like it’s coming from Lily, a sarcastic emo teenage girl, not from a generic AI chatbot.
To achieve the right balance, we create a prompt (or set of instructions) for the LLM. You can think of the prompt like a conversation involving three characters:
- Assistant: This is Lily, the AI bot who reacts to what you, the User, say in accordance with the instructions from the System.
- System: This is like the Assistant’s coach. Duolingo Learning Designers write the instructions that the System says to the Assistant (Lily) about how to act and what to say.
- User: This is you—the learner who interacts with the Assistant (Lily).
In all our calls, we provide the System with a robust set of instructions for how Lily should behave. These instructions include information about Lily’s personality and backstory, they tell her how to help you if you’re stuck, they ensure she speaks at the correct level, and more.
Also, very importantly, we include a basic blueprint for the conversation. Though each conversation you have with Lily is unique, they all follow a similar format:
Part 1: Opener
The System tells Lily what to say first. This is almost always a greeting in the target language. Our engineers have built a cycle of greetings that Lily will go through for each CEFR level.
Part 2: First Question
This sets the scene for what the call will be about. Lily might ask you something new about yourself, she might revisit a previous topic, or she might say that she has information to share about your target language’s culture.
Part 3: Conversation
Lily and you can then go back and forth freely through the conversation. The System has instructed Lily to react to what you say and then to continue the conversation naturally.
Part 4: Closer
After a certain number of back-and-forths, engineers have created a program where the System jumps in and whispers in Lily’s