mcpField
N
now-assist-qa

now-assist-qa

github.com/happy-technologies-llcエージェントワークフロー4141 回インストール2 日前に更新
リポジトリ

now-assist-qa について

ServiceNow Now AssistのQ&Aを、エージェント、従業員、顧客向けに設定するスキルです。ナレッジ参照、LLMやプロンプトの調整、パネル展開、フィードバックによる品質監視を扱います。

主な機能

  1. 01用途別のQ&Aスキル設定
  2. 02ナレッジソースの関連付けと絞り込み
  3. 03LLMパラメーターとプロンプトの調整
  4. 04会話コンテキストと安全策の設定
  5. 05パネル展開とフィードバック確認

活用シーン

  1. 01ITエージェント向けの根拠付き回答設定
  2. 02従業員向けセルフサービスQ&Aの有効化
  3. 03ユーザーフィードバックに基づく回答調整

MCP 対応

SN-Query-Table、SN-Create-Record、SN-Update-RecordなどのServiceNow MCPツールで、スキル、ナレッジソース、パネル、フィードバックを確認・設定します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/happy-technologies-llc/happy-platform-skills --skill now-assist-qa

インストール後、Claude Code で/now-assist-qaを入力して読み込まれたか確認します。

詳細

Now Assist Q&A の設定

概要

このスキルでは、会話型 AI アシスタンス向けに ServiceNow Now Assist Q&A を設定する方法を説明します。

  • エージェント、従業員、開発者など、さまざまなコンテキストでの Q&A に Now Assist スキルを設定します
  • 会話形式の応答に利用するナレッジソースを設定します
  • プロンプトエンジニアリングと LLM パラメーターを通じて応答品質を調整します
  • 会話コンテキストと複数ターンの対話を管理します
  • Workspace、Portal、Mobile に Now Assist パネルを展開します
  • フィードバック分析を通じて応答品質を監視します
  • AI Search と連携し、検索拡張生成による回答を実現します

使用するタイミング: Now Assist を通じてエージェント、従業員、顧客向けに AI を活用した Q&A を有効にするとき、ナレッジに基づく応答を設定するとき、または会話型 AI の品質を調整するときに使用します。

前提条件

  • ロール: now_assist_admin、admin
  • プラグイン: sn_now_assist(Now Assist)、com.snc.generative_ai_controller(Generative AI Controller)、sn_gen_ai(Generative AI)
  • アクセス権: sn_now_assist_skill、sn_now_assist_skill_config、sn_gen_ai_config テーブル
  • ナレッジ: LLM の概念(プロンプト、温度、トークン)とナレッジ管理の理解
  • 関連スキル: 検索設定については genai/ai-search-rag、カスタムスキルについては genai/skill-kit-custom

手順

ステップ 1:現在の Now Assist 設定を評価する

既存の Now Assist スキルとそのステータスを照会します。

MCP アプローチ:

Use SN-Query-Table on sn_now_assist_skill:
  - query: active=true
  - fields: sys_id,name,description,skill_type,context,active,status
  - limit: 20

既存のスキル設定を確認します。

Use SN-Query-Table on sn_now_assist_skill_config:
  - query: active=true
  - fields: sys_id,skill,name,config_type,value
  - limit: 50

REST アプローチ:

GET /api/now/table/sn_now_assist_skill
  ?sysparm_query=active=true
  &sysparm_fields=sys_id,name,description,skill_type,context,active
  &sysparm_limit=20
ステップ 2:Now Assist Q&A スキルを設定する

エージェント向け Q&A スキル:

MCP アプローチ:

Use SN-Create-Record on sn_now_assist_skill:
  - name: "IT Agent Q&A"
  - description: "Provides AI-powered answers to IT agent questions from knowledge bases and resolved incidents"
  - skill_type: "qa"
  - context: "agent_workspace"
  - active: true
  - status: "draft"
  - knowledge_sources: "<kb_sys_id_1>,<kb_sys_id_2>"
  - enable_rag: true
  - response_mode: "generative"

REST アプローチ:

POST /api/now/table/sn_now_assist_skill
Body: {
  "name": "IT Agent Q&A",
  "description": "Provides AI-powered answers to IT agent questions from knowledge bases",
  "skill_type": "qa",
  "context": "agent_workspace",
  "active": true,
  "status": "draft",
  "enable_rag": true,
  "response_mode": "generative"
}

従業員向け Q&A スキル:

Use SN-Create-Record on sn_now_assist_skill:
  - name: "Employee Self-Service Q&A"
  - description: "AI answers for common employee IT and HR questions"
  - skill_type: "qa"
  - context: "employee_portal"
  - active: true
  - status: "draft"
  - knowledge_sources: "<it_kb_sys_id>,<hr_kb_sys_id>"
  - enable_rag: true
  - response_mode: "generative"
  - fallback_action: "create_incident"

Now Assist スキルのコンテキストオプション:

コンテキスト値説明
Agent Workspaceagent_workspaceWorkspace UI を利用する IT エージェント
Employee Portalemployee_portal従業員向けセルフサービス ポータル
Customer Portalcustomer_portal外部顧客向け
MobilemobileServiceNow モバイルアプリ
Virtual Agentvirtual_agentVA 会話チャネル
Platformplatformプラットフォーム全体で利用可能
ステップ 3:ナレッジソースを設定する

Q&A スキルにナレッジベースをリンクし、根拠に基づく応答を生成します。

MCP アプローチ:

Use SN-Query-Table on kb_knowledge_base:
  - query: active=true
  - fields: sys_id,title,description,kb_version
  - limit: 20

ナレッジベースをスキルに関連付けます。

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "knowledge_source_1"
  - config_type: "knowledge_base"
  - value: "<kb_sys_id>"
  - active: true
  - order: 100
Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "knowledge_source_2"
  - config_type: "knowledge_base"
  - value: "<hr_kb_sys_id>"
  - active: true
  - order: 200

ナレッジのフィルタリングを設定します。

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "kb_filter"
  - config_type: "knowledge_filter"
  - value: "workflow_state=published^valid_to>=javascript:gs.now()"
  - active: true
ステップ 4:LLM パラメーターを設定する

応答生成用の生成 AI パラメーターを設定します。

MCP アプローチ:

Use SN-Create-Record on sn_gen_ai_config:
  - name: "Now Assist Q&A LLM Config"
  - description: "LLM parameters for Now Assist Q&A responses"
  - active: true
  - llm_provider: "now_llm"
  - model: "default"
  - temperature: 0.3
  - max_tokens: 400
  - top_p: 0.9
  - frequency_penalty: 0.1
  - presence_penalty: 0.1

REST アプローチ:

POST /api/now/table/sn_gen_ai_config
Body: {
  "name": "Now Assist Q&A LLM Config",
  "active": true,
  "llm_provider": "now_llm",
  "temperature": 0.3,
  "max_tokens": 400,
  "top_p": 0.9
}

LLM 設定をスキルにリンクします。

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "llm_config"
  - config_type: "gen_ai_config"
  - value: "<gen_ai_config_sys_id>"
  - active: true
ステップ 5:システムプロンプトを設定する

システムプロンプトは、Q&A 応答における LLM の動作を導きます。

MCP アプローチ:

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "system_prompt"
  - config_type: "prompt"
  - value: |
      You are an IT support assistant for {company_name}. Your role is to help agents
      find answers to technical questions using the provided knowledge base content.

      Guidelines:
      - Only answer based on the provided context. Do not make up information.
      - If the context does not contain a clear answer, say "I don't have enough
        information to answer this question" and suggest creating a knowledge article.
      - Always cite the source knowledge article by title.
      - Keep answers concise and actionable, using bullet points for steps.
      - If the question involves a specific incident, reference relevant fields.
      - Never reveal internal system details, credentials, or sensitive data.
  - active: true

プロンプトテンプレート変数:

変数説明例
{company_name}顧客組織名Acme Corp
{user_name}現在のユーザー名John Smith
{user_role}現在のユーザーの主なロールITIL Agent
{context_record}現在表示中のレコードINC0012345
{knowledge_context}取得されたナレッジコンテンツ(RAG によって挿入)
{conversation_history}対話の以前のターン(自動入力)
ステップ 6:Now Assist パネルを設定する

Now Assist パネルを表示する場所と方法を設定します。

MCP アプローチ:

Use SN-Create-Record on sn_now_assist_panel_config:
  - name: "Agent Workspace Q&A Panel"
  - description: "Now Assist Q&A panel for IT agent workspace"
  - active: true
  - context: "agent_workspace"
  - skills: "<qa_skill_sys_id>"
  - position: "right_sidebar"
  - auto_open: false
  - show_feedback: true
  - show_sources: true
  - max_conversation_turns: 10
  - greeting_message: "Hi! I can help you find answers from our knowledge base. What would you like to know?"

REST アプローチ:

POST /api/now/table/sn_now_assist_panel_config
Body: {
  "name": "Agent Workspace Q&A Panel",
  "active": true,
  "context": "agent_workspace",
  "skills": "<qa_skill_sys_id>",
  "position": "right_sidebar",
  "show_feedback": true,
  "show_sources": true
}
ステップ 7:会話コンテキストを設定する

複数ターンの対話における会話コンテキストの管理方法を設定します。

MCP アプローチ:

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "context_config"
  - config_type: "context"
  - value: '{
      "max_history_turns": 5,
      "include_record_context": true,
      "record_fields": ["short_description", "description", "priority", "category", "assignment_group"],
      "context_window_tokens": 3000,
      "clear_on_record_change": true
    }'
  - active: true
ステップ 8:応答品質のガードレールを設定する

MCP アプローチ:

Use SN-Create-Record on sn_now_assist_skill_config:
  - skill: "<qa_skill_sys_id>"
  - name: "guardrails"
  - config_type: "safety"
  - value: '{
      "require_knowledge_grounding": true,
      "min_confidence_score": 0.65,
      "block_pii_in_response": true,
      "max_response_length": 500,
      "prohibited_topics": ["salary", "termination", "legal_advice"],
      "fallback_message": "I am not able to answer this question. Please contact your IT service desk for assistance.",
      "enable_content_filtering": true
    }'
  - active: true
ステップ 9:有効化して展開する

MCP アプローチ:

Use SN-Update-Record on sn_now_assist_skill:
  - sys_id: "<qa_skill_sys_id>"
  - status: "published"
  - active: true

設定が完了していることを確認します。

Use SN-Query-Table on sn_now_assist_skill_config:
  - query: skill=<qa_skill_sys_id>^active=true
  - fields: name,config_type,active
  - limit: 20

パネルが有効であることを確認します。

Use SN-Query-Table on sn_now_assist_panel_config:
  - query: skills=<qa_skill_sys_id>^active=true
  - fields: name,context,position,active
ステップ 10:応答品質を監視して調整する

フィードバックデータを照会します:

Use SN-Query-Table on sn_now_assist_feedback:
  - query: skill=<qa_skill_sys_id>^sys_created_on>javascript:gs.daysAgo(7)
  - fields: sys_id,query,response,rating,feedback_text,user
  - limit: 50
  - orderBy: sys_created_on
  - orderDirection: desc

否定的なフィードバックのパターンを分析します:

Use SN-Query-Table on sn_now_assist_feedback:
  - query: skill=<qa_skill_sys_id>^rating<3
  - fields: query,response,rating,feedback_text
  - limit: 20

フィードバックに基づいて調整します:

Use SN-Update-Record on sn_gen_ai_config:
  - sys_id: "<gen_ai_config_sys_id>"
  - temperature: 0.2
  - max_tokens: 500

ツールの使用方法

ツール目的使用するタイミング
SN-Query-Table既存のスキル、設定、フィードバックを検索する発見とモニタリング
SN-Create-Recordスキル、設定、パネル設定を作成する初期設定
SN-Update-RecordLLM パラメーターを調整し、スキルを有効化する最適化とデプロイ
SN-Get-Table-Schema設定テーブルのフィールドを確認する利用可能な設定を把握する

ベストプラクティス

  1. 単一のナレッジベースから始め、品質を確認しながらソースを段階的に追加します
  2. Q&A では低い温度(0.2~0.4)を使用し、回答が事実に基づき、根拠のあるものになるようにします
  3. アシスタントの役割、境界、回答形式を定義する具体的なシステムプロンプトを作成します
  4. 引用の表示を有効にして、ユーザーが回答をソース資料と照合できるようにします
  5. 信頼度のしきい値を保守的に設定し(0.65 以上)、フィードバックに基づいて調整します
  6. Q&A スキルをインシデントやケースと併用する場合は、レコードのコンテキストを含めます
  7. トークンの使用量とコンテキストの関連性を管理するため、会話履歴を 5~7 往復に制限します
  8. 機密データの誤った公開を防ぐため、回答内の PII をブロックします
  9. フィードバックを毎週モニタリングし、低評価の傾向に速やかに対処します
  10. 起動前に回答の品質を検証するため、サポートチケットから得た実際のユーザーの質問でテストします

トラブルシューティング

問題原因解決策
Now Assist パネルが表示されないパネル設定が無効、またはコンテキストが正しくないsn_now_assist_panel_config.active=true を確認し、コンテキストが UI と一致することを確認します
回答が一般的で役に立たないナレッジソースがリンクされていない、または空であるskill_config の knowledge_base エントリーを確認し、KB に公開済みの記事があることを確認します
幻覚による回答が生成される温度が高すぎる、または根拠を求める要件がない温度を下げ、require_knowledge_grounding=true を設定します
回答が文の途中で途切れるmax_tokens が低すぎるsn_gen_ai_config の max_tokens を増やします(推奨値は 400~600)
応答が遅いナレッジソースが多すぎる、またはコンテキストウィンドウが大きすぎる検索ソースを減らし、context_window_tokens を小さくします
スキルが起動しないスキルのステータスがドラフト、または無効になっているスキルを公開して有効化します
フィードバックが収集されないパネルで show_feedback が無効になっているパネル設定で show_feedback=true を設定します
間違ったナレッジベースが検索されるKB のフィルター条件が広すぎる、または指定されていないknowledge_filter 設定に具体的な kb_knowledge_base フィルターを追加します

例

例 1:ワークスペースでの IT エージェント向け Q&A

ITSM エージェント向けに Now Assist Q&A を設定します。

  • スキル: エージェントワークスペースのコンテキスト。IT ナレッジベースおよび解決済みインシデントにリンクします
  • システムプロンプト: IT サポートアシスタント。KB のみを参照して回答し、ソースを引用し、エスカレーション経路を提案します
  • LLM 設定: 温度 0.3、最大 400 トークン、now_llm プロバイダー
  • パネル: 右サイドバー、自動表示は無効、フィードバックは有効、ソース引用を 3 件表示
  • コンテキスト: 表示中のレコードから incident short_description、description、priority、category を含めます
  • ガードレール: ナレッジによる根拠付けを必須にし、PII をブロックし、最小信頼度を 0.7 に設定します
例 2:従業員向けセルフサービス Q&A

従業員ポータルのセルフサービス向けに Now Assist を設定します。

  • スキル: 従業員ポータルのコンテキスト。IT FAQ KB および HR Policy KB にリンクします
  • システムプロンプト: 親しみやすい従業員向けアシスタント。手順を追ったガイダンスを提供し、カタログへのリンクを提示します
  • LLM 設定: より詳しいセルフサービスの手順を提供するため、温度 0.4、最大 500 トークン
  • パネル: ポータル検索に埋め込み、挨拶メッセージを表示し、会話を最大 5 往復に制限
  • フォールバック: 信頼度が 0.6 未満の場合は、インシデントの作成またはカタログの閲覧を提案します
  • ガードレール: 給与・解雇に関するトピックをブロックし、KB による根拠付けを必須にし、コンテンツフィルタリングを有効にします
例 3:カスタマーサポート向け CSM エージェントの Q&A

カスタマーサービス管理エージェント向けに Now Assist を設定します。

  • スキル: 製品ナレッジベースと顧客ソリューションナレッジベースにリンクされた、CSM 向けエージェントワークスペースのコンテキスト
  • システムプロンプト: トラブルシューティング手順を含む、プロフェッショナルな口調のカスタマーサポートスペシャリスト
  • LLM 設定: 正確な技術的回答を得るための温度 0.2、最大 400 トークン
  • コンテキスト: 現在のケースから case short_description、製品、アカウント、優先度を含めます
  • パネル: ケース作成時に自動で開く右サイドバー。フィードバックとソースを表示します
  • ガードレール: 内部価格、SLA の詳細、または他のアカウントの顧客データの共有を禁止します

関連スキル

  • genai/ai-search-rag - Q&A のナレッジ検索を支える AI Search の設定
  • genai/skill-kit-custom - Q&A 以外のカスタム Now Assist スキルの作成
  • genai/flow-generation - Q&A のフォールバックアクションからトリガーできるフロー
  • knowledge/article-generation - Q&A の質を高めるためのナレッジコンテンツの管理

コメント