Workflow · Production

Duolingo builds structured LLM prompt system with persistent cross-session memory to power AI speaking practice with Lily

The problem

LLMs alone cannot serve as effective language tutors; simply instructing a model to speak a target language with a learner is insufficient, and purpose-specific prompting with predictable structure is required.

First attempt

Bundling all call instructions into a single prompt overloaded the LLM, causing it to produce overly complex output or forget prepared vocabulary. In a live call, Lily also ignored a user's topic change and returned to an unrelated scheduled subject.

Workflow diagram · grounded in source
1
Pre-call question generation
ai_action
“ビデオ通話の呼び出し音が鳴っている最中に、システムが最初の質問を作成しています。”
2
CEFR-level greeting
output
“これはほとんどの場合、学習する言語での挨拶となります。Duolingoのエンジニアは、リリーがユーザーのCEFRレベルにあわせて挨拶するようなサイクルを作っています。”
3
Free conversation exchange
ai_action
“システムはリリーに対し、あなたが言ったことに反応し、自然に会話を続けるように指示を出しています。”
4
Mid-call evaluation
feedback_loop
“「学習者はこの会話の主導権を取りたがっていますか? もしそうなら、予定していた話題は無視してください」という指示を追加しました”
5
Call wrap-up
output
“ある一定回数のやりとりの後、あらかじめ組まれたプログラムによって、システムはリリーの耳に「そろそろ切り上げてください」とささやきます”
6
Post-call memory update
integration
“アプリが通話の書き起こしをLLM(大規模言語モデル)に送り、「この会話の中でユーザーについての大事な情報は何?」と尋ね、そこで得られた情報を「List of Facts(事実のリスト)」というリストに追加しているからです”
Reported outcome

Duolingo implemented separate LLM instructions for pre-call question generation, main conversation, and mid-call evaluation, plus a post-call 'List of Facts' memory system enabling Lily to recall personal details about users across sessions.

Source
https://blog.duolingo.com/ja/duolingo-ai-for-speaking-practice/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Duolingo implemented separate LLM instructions for pre-call question generation, main conversation, and mid-call evaluation, plus a post-call 'List of Facts' memory system enabling Lily to recall personal details abou…

What failed first in this deployment?

Bundling all call instructions into a single prompt overloaded the LLM, causing it to produce overly complex output or forget prepared vocabulary.

How is this workflow AI workflow structured?

Pre-call question generation → CEFR-level greeting → Free conversation exchange → Mid-call evaluation → Call wrap-up → Post-call memory update.