How Duolingo cleverly integrated AI into their app
Lessons from Duolingo on building AI-enhanced experiences for customers
Welcome back to Year 2049, your source of practical insights, case studies, and resources to help you embrace and harness the power of AI in your life, work, and business.
If this was forwarded to you, you can subscribe to receive Year 2049 in your inbox every Friday.
My quest to learn Spanish
Ever since I translated a video of myself speaking in English into Spanish (and four other languages), I’ve had this itch to actually learn Spanish.
Seeing myself speaking a new language fluently oddly gave me the motivation to get started and reach that level of fluency on my own.
Enable 3rd party cookies or use another browser
Like most people embarking on a language-learning quest, I went ahead and downloaded Duolingo. It has become the automatic destination to learn a new language, the same way we go to Google for search and Amazon for shopping.
As I completed the first few lessons, the Duolingo app displayed a free trial for Duolingo Max, a premium plan with two AI-powered features:
Explain My Answer: Get AI-powered personal feedback in your lessons
Roleplay: Practice ordering coffee, planning a trip, and more with AI
For the past 2 weeks, I’ve spent more hours than I’m willing to admit learning Spanish on Duolingo and using all its AI features. If you don’t believe me, I’m dominating everyone in my league like I’m the 95’-96’ Bulls…
Explain My Answer: AI as a teacher
Duolingo’s exercises come in different formats: fill-in-the-blank, writing, listening, and pronunciation. When I kept making mistakes between using “es” and “està”, I got the option to explain my mistake.
This opened up a chat interface where Duo explained the mistake I made. There was no open input field where I could type whatever I wanted. Instead, my responses were limited to pre-defined options such as:
“Show me an example”
“Explain it another way”
“I’m all set”
“Yes, I’m good”
In my case, the first explanation was:
Response 1: For locations, we use “està” instead of “es”. So it’s “Dónde està el telefono?"
I understood it but needed some examples to solidify the learning, so I selected “Show me an example”.
Response 2: Some examples using “està”: Dónde està la biblioteca? (Where is the library?) Mi perro està en el parque (My dog is in the park)"
I felt like it just used a similar example to the first response, which didn’t teach me anything new. I finally selected the “Explain it another way” option.
Response 3: “Està” is used for temporary conditions or locations, while “es” is for. more permanent ones. So for asking “where”, use “està” instead.
Bingo. That explanation made it crystal clear to me when to use “es” and “està” in the right scenarios.
Notice how Duolingo preserved the conversational mechanism without leaving me with an open text field to type whatever I want. As I’ve discussed previously in AI and the Third Age of Human-Computer Interaction, an open text field (like ChatGPT) creates the same intimidating feeling of staring at a blank page. You don’t know what to write or where to start.
By displaying pre-defined options like “Show me an example” and “Explain it in another way”, Duolingo helped me achieve two things:
Feel in control of the conversation: Yes, the responses are pre-defined but they offer flexibility in terms of getting an explanation that suits you and helps you understand in your own way.
Extract the highest quality responses from Duolingo Max without prompt engineering: The pre-defined responses eliminate the need to “prompt engineer” and figure out how to get the best explanation from Duolingo. Instead, the responses are similar to how I would ask a teacher a question in class.
A bonus benefit: by restricting us to pre-defined options, Duolingo eliminates the risk of bad actors pushing Duo to say incorrect, controversial, or offensive things (aka prompt injection).
Roleplay: AI as a conversation partner
“Roleplay” is a new type of lesson where your task is to have a complete conversation in the language you’re learning.
It’s much more challenging than filling in the blanks or translating common expressions because you’re put into dynamic scenarios like ordering a coffee or asking for directions.
Here’s an example of me learning how to buy fruits at a market:
As you go through your conversation, a plot twist is introduced, and you get to “choose your own adventure”:
When I finished my conversation, I got a full review for each of my responses along with feedback for what I can improve next time.
In my opening sentence, I replied with “Si, por favor” (Yes, please) after I was asked if I needed help finding fruits. The feedback correctly states that I should be more specific about what I’m looking for, includes an example, and gives me the Spanish translation for it.
Assisted Chat: Roleplay, unlike Explain My Answer, gives me an open text field to write whatever I want. To address the “blank page” intimidation, Duolingo displays suggested terms and expressions that I can combine to form my sentences.
Element of Surprise: You never know what question will come to you next, how your conversation partner will respond, or if a plot twist will be thrown in. The ambiguity and lack of structure are a more effective and realistic way of preparing me for real-life conversations as opposed to just memorizing specific expressions.
Feedback: A final review of the conversation with tailored feedback on each response simulates the effect of having a dedicated tutor to help address your mistakes and weaknesses. It’s an effective learning approach compared to the standard Duolingo lessons since the questions and answers there are pre-defined.
AI + intentional design = 🪄
Duolingo is a prime example of integrating AI to elevate the user experience and create a sense of magic while staying focused on solving the problem of learning a new language. They’ve resorted to AI to fill the biggest gaps of learning a new language on our own through an app:
Explain My Mistake → Have a personal tutor, available 24/7, to explain your mistakes over and over again until you feel confident in your knowledge.
Roleplay → Have a conversation partner who can help simulate real-life situations without being overly scripted, while also creating a sense of comfort around making mistakes.
I hope Roleplay’s next iteration will allow me to have a full verbal conversation by just speaking into my phone without typing. That would be the ultimate way to help people learn and practice as if they had a native speaker and teacher solely dedicated to them.
I’m trying to keep a balance between writing practical guides/tutorials and case studies like this one. Let me know if you have a preference 👇
🔮 The future is too exciting to keep to yourself
Share this post in your group chats with friends, family, and coworkers.
If a friend sent this to you, subscribe for free to receive practical insights, case studies, and resources to help you understand and embrace AI in your life and work.
⏮️ What you may have missed
If you’re new here, here are some previous posts you’ll enjoy:
You can also check out the complete Year 2049 archive to browse through all previous case studies, insights, and tutorials.
How would you rate this week's edition?