Skip to content

改善 AI 教師開場提示,強調熱情和人性化的互動,並要求學習者重複目標語言單詞或短語#11

Merged
Retsomm merged 2 commits into
mainfrom
dev
May 20, 2026
Merged

改善 AI 教師開場提示,強調熱情和人性化的互動,並要求學習者重複目標語言單詞或短語#11
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm
Copy link
Copy Markdown
Owner

@Retsomm Retsomm commented May 20, 2026

Summary by CodeRabbit

  • Improvements
    • Enhanced AI teacher prompts for warmer, more focused lesson delivery
    • Lessons now restrict content to a small set of vocabulary and the target phrase
    • AI teacher presents each item slowly with its English meaning and prompts a short learner repetition
    • Opening greetings emphasize human, energetic engagement and focus on a single target phrase
    • Consistent teaching style applied across Spanish, French, and Japanese starter lessons

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 33fe0ba8-3938-414f-a0a5-8ad24733df21

📥 Commits

Reviewing files that changed from the base of the PR and between 5747faf and 75138f2.

📒 Files selected for processing (1)
  • data/lessons.ts

📝 Walkthrough

Walkthrough

The PR refines instructional prompts for the AI teacher across the lesson interaction pipeline. The opening greeting when a learner joins is updated to emphasize warm, human-focused English greetings and single target-language repetition. The dynamic starter lesson template and six language-specific starter lessons are updated to a consistent "Warm " format that restricts vocabulary, prioritizes English explanation with slow delivery, and requests one learner repeat or try-again.

Changes

AI Teacher Greeting and Lesson Prompts

Layer / File(s) Summary
Agent opening greeting prompt
vision-agent/agent.py
The join_call function's opening_prompt is updated to instruct warm English greetings with energetic tone, targeting a single word/phrase for learner repetition; lesson-specific variant emphasizes lesson scoping and the same target-phrase introduction workflow.
Dynamic starter lesson template prompt
data/lessons.ts
The createStarterLesson function's aiTeacherPrompt template is rewritten to "Warm lesson" format, dynamically restricting vocabulary to seed's first two terms plus target phrase, instructing mostly-English delivery with slow presentation and meaning, and requesting one repeat/try-again.
Language-specific starter lesson prompts
data/lessons.ts
Six explicitly-defined starter lessons (Spanish greetings, Spanish introductions, French greetings, French cafe, Japanese greetings, Japanese classroom) update their aiTeacherPrompt strings to the same "Warm " wording and interaction guidelines.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Retsomm/react-native-lingua#9: The prompt refinements in data/lessons.ts updating aiTeacherPrompt inside createStarterLesson and language-specific starter lessons are directly related to that PR's rework of lesson generation in the same file and functions.

Poem

🐰 A warm hello in English, bright and clear,
A slow sweet word for the learner to hear,
One try, one repeat, gentle and kind,
Two words, one phrase — clear meaning defined,
Hop forward, learner — practice, rewind!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title in Chinese accurately describes the main changes: improving AI teacher opening prompts with emphasis on warmth and humanized interaction, requesting learner repetition of target language words/phrases. This directly aligns with both file changes (updated aiTeacherPrompt in lessons.ts and opening_prompt in agent.py).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@data/lessons.ts`:
- Around line 98-100: The aiTeacherPrompt currently interpolates all
seed.vocabulary terms, which can exceed the intended "first two terms + phrase"
contract; update the interpolation for aiTeacherPrompt to use only the first two
vocabulary items (e.g., use seed.vocabulary.slice(0, 2).map(...).join(", ")) and
combine that with seed.phrase.phrase and seed.languageId so the prompt always
contains exactly the first two terms (or fewer if the array has less than two
items) plus the phrase.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 70bed925-0827-4e6e-940e-dd8860b7af92

📥 Commits

Reviewing files that changed from the base of the PR and between 2071f3e and 5747faf.

📒 Files selected for processing (2)
  • data/lessons.ts
  • vision-agent/agent.py

Comment thread data/lessons.ts
@Retsomm Retsomm merged commit 5b49b6b into main May 20, 2026
1 check passed
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