Files

9.8 KiB

Smart Follow-ups - Channel Examples

Real-world examples of follow-up suggestions across different messaging platforms

๐Ÿ“ฑ Telegram (Interactive Mode)

Example 1: Technical Topic

Conversation:

User: What is Docker?
Bot: Docker is a containerization platform that packages applications with their dependencies into containers for consistent deployment across environments.
User: /followups

Output:

๐Ÿ’ก What would you like to explore next?

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โšก What's the difference between         โ”‚
โ”‚   containers and VMs?                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿง  Explain Docker's layer caching       โ”‚
โ”‚   mechanism                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ”— What about Kubernetes?               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Technical Details:

  • Each box is a clickable InlineKeyboardButton
  • Clicking sends that question automatically
  • Callback data format: ask:${question}

Example 2: Learning a Language

Conversation:

User: How do I say "hello" in Japanese?
Bot: In Japanese, "hello" is ใ“ใ‚“ใซใกใฏ (konnichiwa) for daytime, or ใŠใฏใ‚ˆใ† (ohayou) for morning.
User: /followups

Output:

๐Ÿ’ก What would you like to explore next?

[โšก How is konnichiwa pronounced exactly?]
[๐Ÿง  Explain Japanese greeting etiquette]
[๐Ÿ”— Teach me other basic Japanese phrases]

๐Ÿ’ฌ Signal / iMessage (Text Mode)

Example 1: Technical Topic

Conversation:

User: What is Docker?
Bot: Docker is a containerization platform that packages applications with their dependencies into containers for consistent deployment across environments.
User: /followups

Output:

๐Ÿ’ก Smart Follow-up Suggestions

โšก Quick
1. What's the difference between containers and VMs?

๐Ÿง  Deep Dive
2. Explain Docker's layer caching mechanism

๐Ÿ”— Related
3. What about Kubernetes?

Reply with a number (1-3) to ask that question.

User replies: 2

Bot interprets as: "Explain Docker's layer caching mechanism"

Example 2: Cooking Help

Conversation:

User: How do I make risotto?
Bot: [Detailed risotto recipe with steps]
User: /followups

Output:

๐Ÿ’ก Smart Follow-up Suggestions

โšก Quick
1. What rice should I use?

๐Ÿง  Deep Dive
2. Explain the science of creamy risotto

๐Ÿ”— Related
3. Show me other Italian rice dishes

Reply with a number (1-3) to ask that question.

๐ŸŽฎ Discord (Interactive Mode)

Example: Gaming Discussion

Conversation:

User: What's the best strategy for early game in Civ 6?
Bot: Focus on Scout โ†’ Settler โ†’ Builder. Prioritize Science/Culture buildings. Explore aggressively to find city-state and natural wonders.
User: /followups

Output (Discord embed):

๐Ÿ’ก What would you like to explore next?

โšก When should I build my second city?
๐Ÿง  Explain the Science victory path in detail
๐Ÿ”— What about Domination victory strategies?

Technical: Discord buttons use components API with custom_id for callbacks


๐Ÿ’ผ Slack (Interactive Mode)

Example: Work/Project Management

Conversation:

User: How do I run a sprint retrospective?
Bot: A sprint retrospective typically follows the Start-Stop-Continue format. Gather the team, review what went well, what didn't, and actionable improvements.
User: /followups

Output:

๐Ÿ’ก What would you like to explore next?

[โšก] What's a good retrospective template?
[๐Ÿง ] Explain advanced retrospective techniques
[๐Ÿ”—] What about sprint planning best practices?

Technical: Slack uses Block Kit with button elements


๐Ÿ“ง Email / SMS (Compact Text Mode)

Example: Quick Exchange

Conversation:

User: Remind me about the meeting tomorrow
Bot: Sure! Meeting tomorrow at 2 PM with the product team. Conference Room B.
User: followups

Output (compact mode):

Suggestions:
1. โšก What's the agenda?
2. ๐Ÿง  Review previous meeting notes
3. ๐Ÿ”— Show related project deadlines

Reply 1-3

๐Ÿ”„ Auto-Trigger Mode Examples

When autoTrigger: true is enabled, follow-ups appear automatically after EVERY assistant response.

Telegram Auto-Trigger

User: What is React?
Bot: React is a JavaScript library for building user interfaces, developed by Facebook. It uses a component-based architecture and virtual DOM for efficient updates.

[Auto-generated, no user prompt needed]
๐Ÿ’ก What would you like to explore next?

[โšก What are React components?]
[๐Ÿง  Explain the Virtual DOM in detail]
[๐Ÿ”— What about Next.js?]

Signal Auto-Trigger

User: What is React?
Bot: React is a JavaScript library for building user interfaces, developed by Facebook. It uses a component-based architecture and virtual DOM for efficient updates.

๐Ÿ’ก Smart Follow-up Suggestions

โšก Quick
1. What are React components?

๐Ÿง  Deep Dive
2. Explain the Virtual DOM in detail

๐Ÿ”— Related
3. What about Next.js?

Reply with a number (1-3) to ask that question.

๐Ÿงช Edge Cases

Case 1: Very Short Exchange

Conversation:

User: Hi
Bot: Hello! How can I help you today?
User: /followups

Output:

โš ๏ธ Not enough conversation context to generate follow-ups. Have a conversation first!

(Ephemeral message, only visible to user)

Case 2: Long Multi-Turn Conversation

Conversation (10 exchanges about Python):

[Earlier exchanges about Python basics...]
User: How do decorators work?
Bot: [Detailed decorator explanation]
User: /followups

Output:

๐Ÿ’ก What would you like to explore next?

[โšก Show me a simple decorator example]
[๐Ÿง  Explain decorator factories and chaining]
[๐Ÿ”— What about context managers?]

Note: Only last 3 exchanges analyzed, so suggestions stay focused on current topic (decorators).

Case 3: API Error

Scenario: Anthropic API temporarily unavailable

Output (manual mode):

โŒ Failed to generate follow-ups: API request failed

(Ephemeral error message)

Output (auto mode):

(Silent failure, no message shown)

๐Ÿ“Š Comparison Table

Channel Mode Interaction Best For
Telegram Interactive Inline buttons General use, best UX
Discord Interactive Message components Communities, gaming
Slack Interactive Block Kit buttons Work, professional
Signal Text Numbered list Privacy-focused users
iMessage Text Numbered list Apple ecosystem
SMS Compact Text Short numbered list Basic phones
Email Text Full formatted list Asynchronous use

๐ŸŽจ Customization Examples

Custom Category Emojis

Edit cli/followups-cli.js:

const CATEGORIES = {
  QUICK: { emoji: '๐Ÿš€', label: 'Quick Start' },
  DEEP: { emoji: '๐Ÿ”ฌ', label: 'Technical' },
  RELATED: { emoji: '๐ŸŒ', label: 'Explore More' }
};

Result:

[๐Ÿš€ How do I get started?]
[๐Ÿš€ What tools do I need?]
[๐Ÿ”ฌ Explain the architecture]
[๐Ÿ”ฌ Deep dive into performance]
[๐ŸŒ Related frameworks]
[๐ŸŒ Industry trends]

Multi-Language Support

Add i18n to formatTextList():

const LANG = {
  en: { title: 'Smart Follow-up Suggestions', reply: 'Reply with a number' },
  es: { title: 'Sugerencias Inteligentes', reply: 'Responde con un nรบmero' },
  de: { title: 'Intelligente Vorschlรคge', reply: 'Mit einer Zahl antworten' }
};

function formatTextList(suggestions, lang = 'en') {
  let output = `๐Ÿ’ก **${LANG[lang].title}**\n\n`;
  // ... rest of formatting
  output += `\n${LANG[lang].reply} (1-6).`;
  return output;
}

๐Ÿง  Prompt Engineering Impact

The quality and diversity of suggestions depends heavily on the prompt. Here's how different prompt changes affect output:

Standard Prompt Output

โšก Quick
1. What does Docker stand for?

๐Ÿง  Deep Dive
2. Explain container internals

๐Ÿ”— Related
3. What about Kubernetes?

With "Be Creative" Instruction

โšก Quick
1. ELI5: Containers vs VMs?

๐Ÿง  Deep Dive
2. Walk me through a container's lifecycle

๐Ÿ”— Related
3. When should I NOT use Docker?

With Domain-Specific Context

If user is tagged as "DevOps Engineer":

โšก Quick
1. Show me a multi-stage Dockerfile

๐Ÿง  Deep Dive
2. Docker security hardening checklist

๐Ÿ”— Related
3. Docker Swarm vs Kubernetes tradeoffs

๐Ÿ“ JSON Output Format (for developers)

Raw JSON (--mode json):

{
  "quick": "What's the difference between containers and VMs?",
  "deep": "Explain Docker's layer caching mechanism",
  "related": "What about Kubernetes?"
}

Telegram Buttons Array (--mode telegram):

[
  [{"text": "โšก What's the difference between containers and VMs?", "callback_data": "ask:What's the difference between containers and VMs"}],
  [{"text": "๐Ÿง  Explain Docker's layer caching mechanism", "callback_data": "ask:Explain Docker's layer caching mechanism"}],
  [{"text": "๐Ÿ”— What about Kubernetes?", "callback_data": "ask:What about Kubernetes?"}]
]

Note: callback_data is truncated to ~50 chars to stay under Telegram's 64-byte limit.


Last Updated: January 2026
Examples Generated With: Claude Haiku 4
Test Coverage: All major messaging platforms