Skip to content

feat: redesign the Reply Drafter prompt for context-aware suggestions#2266

Merged
enaboapps merged 1 commit into
mainfrom
feature/reply-drafter-prompt-2265
May 21, 2026
Merged

feat: redesign the Reply Drafter prompt for context-aware suggestions#2266
enaboapps merged 1 commit into
mainfrom
feature/reply-drafter-prompt-2265

Conversation

@enaboapps

Copy link
Copy Markdown
Collaborator

Summary

The Reply Drafter prompt asked the model for "3 short, natural, friendly
replies" — a generic instruction that forced every suggestion into one tone.
The feature lands in all kinds of threads (coordinating plans, disagreement,
emotional support, formal/work, declining something), and three cheerful
options are unusable in most of them. For a switch user, unusable suggestions
mean falling back to slow manual typing — the exact thing the feature exists to
avoid.

This replaces LlmManager.PROMPT with a structured 8-step rubric.

What changes

  • Varied by stance — the model returns a deliberately varied set, not three
    of the same.
  • Always anchored — at least one option always lets the user decline,
    disagree, set a boundary, or buy time.
  • Tone- and warmth-matched — replies match the conversation's seriousness,
    and its texting style (kisses like x/xx, emoji, pet names) so they don't read
    as cold.
  • 3-5 replies, mixed length — short by default, a longer one when needed;
    "3-5" now agrees with the parser's MAX_SUGGESTIONS = 5.
  • The prompt now also tells the model which side of the conversation is the
    user's, and forbids multi-line replies (which the line-based parser would
    otherwise split into bogus suggestions).

Single change — the PROMPT constant. parseSuggestions() and
MAX_SUGGESTIONS are unchanged.

Test plan

  • ./gradlew compileDebugKotlin — passes.
  • On-device tuning pass: trigger Reply Drafter on casual, tense, formal,
    and affectionate threads — suggestions vary in stance, always include a
    decline/disagree option, match tone, and stay one per line.

Closes #2265

- Replace the generic "3 short friendly replies" prompt with a structured
  8-step rubric so a small on-device model reliably follows it.
- Suggestions now vary in stance, always include a decline/disagree/buy-time
  option, match the conversation's tone and gravity, and mirror its warmth
  (kisses, emoji, pet names) instead of defaulting to friendly.
- The prompt identifies which side of the conversation is the user's and
  requests 3-5 replies, agreeing with the parser's cap of 5.

🤖 Auto-generated
@enaboapps enaboapps merged commit 3c70e28 into main May 21, 2026
@enaboapps enaboapps deleted the feature/reply-drafter-prompt-2265 branch May 21, 2026 19:18
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.

Redesign the Reply Drafter prompt for varied, context-aware suggestions

2 participants