メールからインサイトへ: SAP Generative AI Hub で作る最初のプロンプト
Generative AI Hub の Prompt Editor で基本プロンプトを作成します。顧客メールから緊急度(urgency)と感情(sentiment)を抽出し、実行して Version 1 として保存し、後の改良のベースラインにします。
Lab Overview and Learning Objectives
開始前の注意
本ラボは演習「Develop a Prompt in SAP AI Launchpad」(Unit 1 · Exercise 1)に基づきます。シナリオ: ある施設ソリューション企業は毎日数千通の顧客メール(依頼、クレームなど)を受け取り、現在は手作業で転記・分類・優先順位付けをしています。そこで Generative AI Hub を使い、各メールから緊急度と感情を自動抽出します。プロンプト作成は段階的な発想プロセスで、Task 1 では最初の基本プロンプトを作ります。
- SAP AI Launchpad のログイン情報(コースの SSG を参照)。
- Learning-AIG リソースグループ(または割り当てられたリソースグループ)。
- テナントで Generative AI Hub にアクセスできること。
1. ログインしてリソースグループを選択
Generative AI Hub にログインして SAP AI Launchpad を開き、作業するリソースグループを選びます。
- Generative AI Hub にログイン → SAP AI Launchpad が表示されます。
- 選択中のリソースグループが Learning-AIG であることを確認(Resource Groups ブロック)。
- 数秒後、左ナビゲーションに Generative AI Hub の項目が表示されます。

2. Prompt Editor を開く
Prompt Editor はプロンプトを作成・テスト・バージョン管理する場所です。
- 左ペインで Generative AI Hub を展開します。
- Prompt Editor を選択します。

3. Model Configuration を開く
各プロンプトはモデル上で動きます。Model Configuration までスクロールしてモデルを選びます。
- Prompt Editor で Model Configuration セクションまでスクロール。
- モデル選択ボタン(Selected Model の横のアイコン)をクリック。
- 検索バーとフィルター付きの Model Selection ダイアログが開きます。

4. Google モデルを選択(Gemini 2.5 Flash Lite)
このタスクは Google モデルから始めます。利用可能な最新の Google モデルを選びます。
- Model Selection で検索バーに 'gemini' と入力(または Google プロバイダーで絞り込み)。
- 最新の Google モデル、例えば Gemini 2.5 Flash Lite を選択。
- 確定して、モデルが選択された状態で Prompt Editor に戻ります。

5. System プロンプトを入力
Message Blocks はプロンプトを役割で分けます。System 役割はモデルの人格とタスクを設定します — ここではメールを分析し緊急度 + 感情を抽出することです。
- Message Blocks で System 役割を選択。
- 下のプロンプトを System のテキストボックスに貼り付け。
You are a support assistant for a facility management company. Carefully read the customer message provided by the user and identify two things: (1) the urgency level of the request, and (2) the overall sentiment of the sender.
6. User 役割を追加してサンプルメールを貼り付け
User 役割はモデルに実データを渡します — ここでは分析対象の顧客メールです。
- Add Role をクリックしてブロックを追加し、User 役割を選択。
- 下のサンプルメールを User のテキストボックスに貼り付け。
Analyze the following message:
---
Subject: Water leak spreading near our server room
Hello Support Team,
We have a serious problem at our office on the 4th floor of Tower B. Since early this morning, water has been dripping from the ceiling, and over the last hour it has spread to within a meter of our main server rack. We put down buckets and moved a few cables, but the leak is getting worse, not better.
If the water reaches the servers, the whole branch could lose its systems. We have already called the front desk twice with no answer, and no one has come up yet.
Please send a technician immediately — this really cannot wait until tomorrow. I would appreciate a quick confirmation that help is on the way.
Thank you,
Maria Nguyen
Office Manager, Tower B
7. 実行(Run)
Run をクリックしてプロンプトをモデルに送り、Response ボックスで結果を確認します。
- Template パネル上部の Run をクリック。
- 右側の Response パネルに結果が表示されるまで待ちます。

8. Response の結果を読む
モデルは分析結果を Response ボックスに直接返します。ここでプロンプトが意図どおり機能したかを確認します。
- Response ボックスの Urgency Level と Overall Sentiment を読みます。
- メールの内容と照合します: サーバーラックに迫る水漏れ、フロントへの2回の連絡に応答なし。

9. 名前を付けて Save Template(Version 1)
後のタスクで改良する際に比較しやすいよう、ベースラインとして保存します。
- 上部の Name 欄に名前を入力します(例: Promt_V1)。
- Save Template をクリック。
