MCP HubMCP Hub
スキル一覧に戻る

conversational-ai-flow

majiayu000
更新日 Yesterday
20 閲覧
58
9
58
GitHubで表示
デザインaidesign

について

このClaude Skillは、会話型AIシステムの設計と実装に関する専門知識を提供します。開発者がチャットボットのフロー設計、ダイアログ設計、NLU意図分類、会話状態管理を支援します。適切なアーキテクチャパターンとコンテキスト処理を備えた堅牢な会話インターフェース構築にご活用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/majiayu000/claude-skill-registry
Git クローン代替
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/conversational-ai-flow

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Conversational AI Flow Expert

Эксперт по проектированию и реализации потоков разговорного ИИ.

Основные принципы дизайна

Управление состоянием

class ConversationState:
    def __init__(self):
        self.current_intent = None
        self.entities = {}
        self.conversation_history = []
        self.flow_position = "start"
        self.confidence_threshold = 0.7

    def update_context(self, user_input, intent, entities):
        self.conversation_history.append({
            "user_input": user_input,
            "intent": intent,
            "entities": entities
        })
        self.entities.update(entities)
        self.current_intent = intent

Паттерны архитектуры потоков

Маршрутизация на основе намерений

flows:
  booking_flow:
    entry_conditions:
      - intent: "book_appointment"
    steps:
      - name: "collect_datetime"
        prompt: "When would you like to schedule?"
        validation: "datetime_validator"
      - name: "confirm_booking"
        prompt: "Confirm booking on {datetime}?"
        actions: ["create_booking", "send_confirmation"]

  fallback_flow:
    triggers: ["low_confidence", "unknown_intent"]
    strategy: "clarification_questions"

Паттерн заполнения слотов

def slot_filling_handler(state, required_slots):
    missing_slots = [s for s in required_slots if s not in state.entities]

    if missing_slots:
        return generate_slot_prompt(missing_slots[0], state)

    return proceed_to_next_step(state)

Обработка ошибок и восстановление

Прогрессивное раскрытие

class ErrorRecovery:
    def handle_misunderstanding(self, state, attempt_count):
        strategies = {
            1: "I didn't quite catch that. Could you rephrase?",
            2: "Let me try differently. Are you looking to: [options]?",
            3: "Let me connect you with a human agent."
        }
        return strategies.get(attempt_count, strategies[3])

Генерация ответов

Контекстуальные шаблоны

class ResponseGenerator:
    templates = {
        "confirmation": [
            "Got it! {summary}. Is that correct?",
            "Let me confirm: {summary}. Does this look right?"
        ],
        "progress": [
            "Great! We've got {completed}. Next, {next_step}.",
            "Perfect! Just need {remaining} and we're done."
        ]
    }

Мультимодальные ответы

{
  "response_type": "rich",
  "text": "Here are your options:",
  "components": [
    {
      "type": "quick_replies",
      "options": [
        {"title": "Schedule Appointment", "payload": "intent:book"},
        {"title": "Check Status", "payload": "intent:status"}
      ]
    }
  ]
}

Аналитика и оптимизация

def track_flow_metrics(conversation_id, metrics):
    return {
        "completion_rate": metrics.completed / metrics.started,
        "average_turns": metrics.total_turns / metrics.conversations,
        "fallback_rate": metrics.fallbacks / metrics.total_turns,
        "abandonment_points": identify_drop_off_points(conversation_id)
    }

Лучшие практики

  • Определите четкую личность и тон бота
  • Предвосхищайте потребности пользователей
  • Используйте резюме для длинных диалогов
  • Тестируйте все пути и edge cases
  • Мониторьте реальные разговоры для улучшения

GitHub リポジトリ

majiayu000/claude-skill-registry
パス: skills/conversational-ai-flow

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

creating-opencode-plugins

メタ

This skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.

スキルを見る

evaluating-llms-harness

テスト

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

スキルを見る

sglang

メタ

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

スキルを見る