Skip to main content
コミュニティの新しい会話を Slack に移動するため、オンライン Trailblazer Community は 2026 年 10 月 30 日に参照のみになります。FAQ を参照

もっとキャンプファイヤーストーリーを

学習の目的

この単元を完了すると、次のことができるようになります。

  • Campfire Stories (キャンプファイヤーストーリー) オブジェクトにストーリーをさらに追加する。
  • Campfire Stories (キャンプファイヤーストーリー) エージェントに、選択した条件に基づいてストーリーを提示するように指示する。
メモ

メモ

日本語で受講されている方へ
Challenge は日本語の Trailhead Playground で開始し、かっこ内の翻訳を参照しながら進めていってください。Challenge での評価は英語データを対象に行われるため、英語の値のみをコピーして貼り付けるようにしてください。日本語の組織で Challenge が不合格だった場合は、(1) この手順に従って [Locale (地域)] を [United States (米国)] に切り替え、(2) [Language (言語)] を [English (英語)] に切り替えてから、(3) [Check Challenge (Challenge を確認)] ボタンをクリックしてみることをお勧めします。

翻訳版 Trailhead を活用する方法の詳細は、自分の言語の Trailhead バッジを参照してください。

計画が実を結ぶ

Ruth、Codey、Astro は、キャンプファイヤーストーリー体験が形になっていくのを見てわくわくしています。エージェントを使って Astro の夢を追加するのはとても簡単で、みんなさらにストーリーを追加したくてたまりません。幽霊、お化け屋敷、ミステリー、ゾンビについて話し合います。Astro がそっと抜け出したことに誰も気づかず、両手いっぱいの箱や包みを抱えて戻ってきたときにようやく気がつきます。

「もっとよく考えるためにおやつが必要だよ」と言いながら、数種類のグラハムクラッカー、いろいろなチョコレートバー、3 つのサイズのマシュマロをデスクに並べていきます。「キッチンに行ったら、シェフがくれたんだ」

「Astro、あなたにはハロウィンにスモアのコスチュームを作ってあげなきゃ!」 Ruth は笑いました。

キャンプファイヤーストーリーをもう 1 つ追加する

それぞれが、キャンプファイヤーを囲んで Coral Cloud のゲストに話したいストーリーを思いつきます。Ruth は、子供のころキャンプで怖かったお化け話を語ります。Codey は手に入る限りのミステリー小説を読み尽くしており、ほぼどんなテーマでもその場でミステリーストーリーを作り上げることができます。そして Astro は、ゾンビについて多くのことを知っていると言います。

エージェントが体験セッションで話すストーリーをどれだけうまく選べるかテストするために、さらにいくつかのストーリーを追加する必要があります。さらに 2 つのストーリーを追加してから、エージェントをテストすることにします。次の手順に従って、Campfire Stories (キャンプファイヤーストーリー) オブジェクトにお化け話を追加します。

  1. [Campfire Stories (キャンプファイヤーストーリー)] タブを選択して、Campfire Stories (キャンプファイヤーストーリー) オブジェクトの [All (すべて)] ビューを表示します。
  2. Agentforce を選択して、[Campfire Stories (キャンプファイヤーストーリー)] エージェントを開きます。
  3. [Create a new campfire story (新しいキャンプファイヤーストーリーを作成)] を選択します。 (メモ: エージェントの表現は異なる場合があります。新しいストーリーを作成するボタンが表示されない場合は、[Campfire Stories (キャンプファイヤーストーリー)] タブを選択して、Campfire Stories (キャンプファイヤーストーリー) オブジェクトの [All (すべて)] リストビューを開いてください。)
  4. 次のストーリーの詳細をコピーしてエージェントのテキスト項目に貼り付け、Enter を選択します。
The title is The Last Stop
The type is Ghost Story
The audience is Teens
The Length is Long (8-10 min)
The full text is this: Everyone in Belltown knew the number thirteen bus stopped running at midnight. That is, everyone except the girl waiting in the rain beneath the broken streetlamp.
Noah noticed her as the bus rolled past Belltown Cemetery at 12:07 AM. She stood perfectly still in the rain, wearing a pale blue school uniform that hadn’t been in fashion for decades. Her dark, wet, hair hung over her face and she raised one hand toward the bus.
The driver slammed on the brakes.
“Why are we stopping?” Noah asked.
The bus driver, Mr. Vale, stared at him in the mirror. “Someone rang the bell.”
Noah looked around. “No one rang the bell, Mr. Vale. I’m the only one here.”
Outside, the girl climbed aboard.
She dropped something heavy into the fare box.
Clunk.
Then she walked down the aisle and sat directly across from Noah.
The doors folded shut, and the bus moved on.
Noah tried not to stare, but he couldn’t ignore the cold that rolled from her seat like fog from an open freezer.
“You shouldn’t be on this bus,” the girl whispered.
Noah turned.
Her face was pale, but ordinary. Almost. Rainwater dripped from her hair, although her clothes were completely dry.
“Neither should you,” he said. “The last bus was supposed to come at 11:30.”
“This is the last bus.”
Something in the way she said it made his stomach tighten.
At the front, Mr. Vale drove without blinking. The road ahead was empty, shining black beneath the headlights.
Noah glanced out the window.
Hadn’t they passed the same boarded-up gas station three times?
He stood. “Mr. Vale, you missed my stop.”
The driver said nothing.
Noah walked toward him and froze.
Mr. Vale’s hands rested on the steering wheel, but they weren’t moving. They weren’t even gripping it. They lay there stiffly while the wheel turned by itself.
In the mirror, the driver’s reflection was smiling, but Mr. Vale wasn’t.
Noah stumbled backward.
The girl caught his wrist. Her fingers were as cold as ice.
“Sit down,” she whispered. “It doesn’t like passengers walking around.”
“What doesn’t?”
The lights inside the bus flickered off.
In the darkness, something scraped across the roof.
Scratch, scratch, scratch.
The lights returned.
Long fingerprints streaked the windows—on the inside.
Noah dropped into the nearest seat. “What’s happening?”
The girl looked toward the front of the bus.
“Thirty years ago, the number 13 bus crashed during a storm. The driver lost control near the cemetery. Twenty-nine people died.”
“Twenty-nine?”
Every year, on the night of the crash, this bus comes back. It collects the passengers who were on the bus, plus one more person.”
Dark shapes now sat in previously empty rows.
A woman with broken glasses. A man holding a soaked and torn newspaper. A little boy hugging a wet red backpack. None of them had been there before.
He counted. There were 28 more people.
Noah turned to the girl.
“Twenty-nine” she said quietly. “With me.”
The bell rang. Ding. Ding. Ding.
The bus turned onto Cemetery Road.
“What happens when we reach the last stop?” Noah asked.
“You’d better get off of the bus before we reach the last stop,” she said.
The cemetery gates appeared ahead, standing open. Beyond them waited a road that shouldn’t have existed, descending between the graves into a darkness deeper than night.
Noah grabbed the emergency handle beside the rear door and pulled, but nothing happened.
The smiling reflection in the driver’s mirror widened.
“You can’t open it,” the girl said. “Not without paying the fare.”
She opened her hand.
A heavy blackened coin lay in her palm. It was the same coin she had dropped into the fare box.
The bus crossed through the cemetery gates.
The girl pressed the coin into Noah’s hand. Frost spread over his fingers.
“Put it in the coin box,” she said. “Then pull the handle.”
“What about you?”
She looked toward the shadowy passengers. “I don’t get to leave.”
Noah ran.
The figures turned their heads as he passed. The little boy reached for him. The woman with broken glasses opened her mouth, and rainwater poured out.
The scratching thing on the roof began to pound.
Noah reached the fare box and dropped in the coin.
Clunk.
Every light shattered.
He pulled the emergency handle.
The front and rear doors burst open.
Wind tore through the bus. Noah was lifted from his feet and tossed out onto the rainy roadside.
Behind him, the bus careened between the graves. For one second, he saw the girl standing in the rear doorway, staring. Then the bus vanished.
Noah woke at sunrise beside the cemetery gates. A police officer drove him home. When Noah described the bus, the officer’s eyes grew big and he went silent.
When he got home, Noah emptied his wet jacket pockets.
Something fell onto the floor with a clunk.
It was the heavy, blackened coin.
From outside came the hiss of brakes.
Then a bus bell rang once and Noah walked toward the door.
  1. 次のテキストをコピーしてチャットウィンドウに貼り付け、Enter を選択します: Save this story to the Campfire Stories object if it hasn’t already been saved. (このストーリーがまだ保存されていない場合は、Campfire Stories (キャンプファイヤーストーリー) オブジェクトに保存してください。)
  2. close を選択して、[Campfire Stories (キャンプファイヤーストーリー)] エージェントを閉じます。
  3. ブラウザーウィンドウを更新すると、新しいストーリー [The Last Stop (最後のバス停)] が Campfire Stories (キャンプファイヤーストーリー) オブジェクトに追加されていることを確認できます。

キャンプファイヤーストーリーを生成する

体験に含める他の種類のストーリーについて話し合う中で、Ruth は、ヘッドレステクノロジーを使用してエージェントを作成した際に追加されたアクションの 1 つが、エージェント自身がストーリーを作成できるものだったことを思い出しました。

「エージェントがどんなお話を書けるか、試してみようよ!」 と Ruth は提案します。「エージェントにいくつかの詳細を伝えて、どんなお話が出てくるか見てみよう。別のストーリーをすばやく追加してテストできるし、もしかしたら実際に使いたいストーリーになるかもしれない」

「いいね。ヘッドレステクノロジーで構築したのだから、頭のない幽霊が自分の頭を探している話をエージェントに頼んでみよう」と Astro はグラハムクラッカーをかじりながら言います。

  1. [Campfire Stories (キャンプファイヤーストーリー)] タブを選択し、[All (すべて)] リストビューが表示されていることを確認します。
  2. Agentforce を選択します。
  3. [Create a New Campfire Story (新しいキャンプファイヤーストーリーを作成)] を選択します。
  4. エージェントからの質問は無視して、次のストーリープロンプトをコピーして貼り付け、Enter を選択します。
Write a short (2-3 min) haunted house story for all ages about a headless ghost who forgot where he left his head.

エージェントは条件に合ったストーリーをすばやく生成します。ストーリーは使用する前に少し編集が必要かもしれませんが、すでにかなり良い出来です。

  1. 次のテキストをコピーしてチャットウィンドウに貼り付け、Enter を選択します: Save this story to the Campfire Stories object if it hasn’t already been saved. (このストーリーがまだ保存されていない場合は、Campfire Stories (キャンプファイヤーストーリー) オブジェクトに保存してください。)

「これは本当に楽しいね!」 Ruth は「Campfire Stories (キャンプファイヤーストーリー) オブジェクトを確認して、ストーリーがすべて揃っているか見てみましょう」と言います。

  1. close を選択して、[Campfire Stories (キャンプファイヤーストーリー)] エージェントを閉じます。
  2. ブラウザーウィンドウを更新します。
  3. Astro の夢のストーリーと今追加した 2 つのストーリーを含む、すべてのストーリーが Campfire Stories (キャンプファイヤーストーリー) オブジェクトのレコードとして保存されていることを確認できます。(ストーリーが表示されない場合は、ブラウザーを更新し、[All (すべて)] リストビューを表示していることを確認してください。)

キャンプファイヤーストーリーを語らせる

いよいよ、Campfire Stories (キャンプファイヤーストーリー) エージェントが短いプロンプトからストーリーを引き出せるかテストします。「キャンプストーリー体験にいる場面を想像してみよう」と Codey は目を閉じて、その光景を鮮明に思い描きながら言います。

Codey は、キャンプストーリー体験のホストが従業員エージェントに対し、オーディエンスに合った Campfire Stories (キャンプファイヤーストーリー) オブジェクトのストーリーを提案するよう依頼する場面を想像します。その間、ゲストたちは焚き火を囲んでくつろぎながら、マシュマロを焼いています。

ホストはエージェントに、「10 代向けの長いホラーストーリーを教えて」などのプロンプトを入力します。エージェントはその条件に合ったストーリーの一覧を表示し、ホストはゲストに読み聞かせるストーリーを選ぶことができます。これをテストするには、次の手順を実行します。

Note

エージェントは非決定論的です。つまり、まったく同じ入力に対しても、異なる推論を行い、固有の応答を生成することがあります。エージェントを構築する人は、テストを繰り返すプロセスを通じてエージェントの動作を「形成」し、期待する応答を生成できるよう指示やガードレールを追加することができます。

次のセクションでは、Campfire Stories (キャンプファイヤーストーリー) エージェントの非決定論的な性質が影響して、 エージェントが期待どおりのストーリーを返さない場合があります。実際の場面では、これはエージェントを調整して期待どおりの応答を返すようにする機会となります。このモジュールではその作業は行いません。エージェントが期待どおりのストーリーを返さなくても、ハンズオン Challenge には合格できます。

  1. Campfire Stories (キャンプファイヤーストーリー) オブジェクトがまだ表示されていることを確認し、Agentforce を選択します。
  2. [Search for a Campfire Story (キャンプファイヤーストーリーを検索)] をクリックします。(エージェントのテキストは多少異なる場合があります。)
  3. 次のテキストをコピーしてエージェントのチャットウィンドウに貼り付けます: Show me a long ghost story for teens. (ティーン向けの長いホラーストーリーを表示してください。) 次に Enter を選択します。
  4. エージェントは [The Last Stop (最後のバス停)] をおすすめするはずです。
  5. チャットウィンドウの上部で 更新 を選択し、次に [Clear History (履歴をクリア)] を選択します。
  6. [Search for a Campfire Story (キャンプファイヤーストーリーを検索)] をクリックします。(エージェントのテキストは多少異なる場合があります。)
  7. 次のテキストをコピーしてエージェントのチャットウィンドウに貼り付けます: Show me a medium (5-7 min) scary dream story for kids. (中くらいの長さ (5 ~ 7 分) の子供向けの怖い夢の話を表示してください。) 次に Enter を選択します。
  8. エージェントは [A Sea of S'mores (スモアの海)] をおすすめするはずです。

「やった、うまくいった!」と Astro は叫びます。「それに、ぼくの夢のストーリーもある! ハロウィンにはスモアに変装するのが待ちきれないよ!」

お疲れ様でした。あなたは Astro、Ruth、Codey と協力し、ヘッドレス技術を使って Coral Cloud Resorts の新しいキャンプファイヤーストーリー体験を作り上げました。そして、その過程でスモアもたっぷり楽しみました。今度は、同じヘッドレス機能を活用して、必要な場所にカスタム機能やエクスペリエンスを自分で構築してみましょう。

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む