AI搭載の質問と回答を得る
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
Sitecore SearchのSearchと推薦APIを使えば、訪問者の問い合わせに基づいてAI搭載の質問や回答を得ることができます。
!重要AIが関連する質問や回答を生成する能力は、あなたが通過したソースに インデックスされた項目 に直接依存しています。インデックスされたコンテンツが訪問者の質問と一致しない場合、AIは関連する回答を提供しません。例えば、「 Who is the CEO of Sitecore? 」という訪問者検索では、ソースが児童書のみをインデックスしている場合、結果は得られません。
questionsオブジェクトを使う必要があります。このオブジェクトのデータモデルについては、Searchおよび参考文献の推奨事項APIsearch.widget.items.questions
questionsオブジェクトにはいくつかのパラメータがあります。どのパラメータを通すかによって、関連する質問と回答のセットか、1つの正確な答えの2種類が得られます。
!注質問と回答ウィジェットのrfkid値はグループ作成時に自動的に生成され、Searchの質問と回答グループのメニューページで確認できます。例えば、rfkid_mygroup.
関連する質問を受ける
questions.related_questionsパラメータを使って、訪問者の検索語に関連するAI搭載の質問と回答のペアを取得できます。例えば、これらの質問と回答を使って「別人質問」や*「よくある質問*」セクションを埋めることができます。
関連する質問や回答を得るための簡単なクエリ
これは、キーワードに基づいて関連する質問や回答を得るための簡単な例です。
この例では、訪問者がキーワード コンテンツハブ に入り、関連する5つの質問を表示したいとします。
こちらがサンプルリクエストです:
{ "widget": { "items": { "entity": "content", "rfk_id": "rfkid_mygroup", "questions": { "keyphrase": "content hub?", "related_questions": { "limit": 5 } } }
} }
以下のサンプル回答では、AI生成の質問「 コンテンツハブとは何か? 」および「 コンテンツハブとどのように統合できるか?」および対応する回答を見ることができます。
{ "dt": 1649558400, "errors": , "ts": 1649558400, "widgets": { "entity": "content", "errors": , "facet": , "limit": 5, "offset": 0, "related_questions": { "answer": "Sitecore Content Hub is a comprehensive digital asset management system that you can use to handle a wide array of marketing content and assets efficiently. It offers a suite of tools for managing digital assets, content, products, and brands, as well as for creating publication templates and integrating with external applications.", "context": "Sitecore Content Hub is a digital management application that provides you with a variety of features centered around digital assets and marketing content...", "document_id": "doc123", "extra_fields": {}, "highlight": "Content Hub", "id": "qa123", "question": "What is content hub?", "type": "FAQ" }, { "answer": "You can perform internal and external integration with Sitecore Content Hub. You can use scripts, triggers APIs, and SDKs to integrate.", "context": "Sitecore Content Hub integrates internal features that add greater flexibility and advanced customization. This section explains how to use custom scripts....This section explains how to use Sitecore Content Hub to integrate third-party APIs and SDKs to improve developer usability....", "document_id": "doc124", "extra_fields": {}, "highlight": "Content Hub integration", "id": "qa124", "question": "How can I integrate with Content Hub?", "type": "FAQ" } // ... 3 more related questions , "rfk_id": "rfkid_mygroup", "total_item": 5, "type": "Questions Widget", "used_in": "Search Page" }
}
正確な答えを得るために
questions.exact_answerオブジェクトを使って、訪問者が入力した質問やフレーズの正確な答えを得ることができます。例えば、検索バーのすぐ下に答えを表示することもできます。
この例では、訪問者の「 エベレストの高さ」という質問に正確な答えを提供する必要があります。
こちらがサンプルリクエストです:
{ "widget": { "items": { "rfk_id": "rfkid_mygroup", "entity": "content", "questions": { "keyphrase": "mount everest height", "exact_answer": { "query_types": "statement" } } }
} }
こちらがこのリクエストへのサンプル回答です:
{ "dt": 1649558400, "errors": , "ts": 1649558400, "widgets": { "entity": "content", "errors": , "facet": , "limit": 1, "offset": 0, "related_questions": { "answer": "8,848.86 meters (29,031.7 feet) above sea level.", "context": "The height of Mount Everest has been a subject of some variation over the years, with the most recent survey in 2020 establishing its height at 8,848.86 meters. This makes it the tallest mountain above sea level...", "document_id": "docEverest123", "extra_fields": {}, "highlight": "Mount Everest height", "id": "qaEverestHeight", "question": "What is the height of Mount Everest?", "type": "FAQ" } , "rfk_id": "rfkid_mygroup", "total_item": 1, "type": "Questions Widget", "used_in": "Search Page" }
}
!ヒント関連する質問と回答、そして正確な回答を同時に得たい場合は、同じリクエストでquestions.related_questionsとquestions.exact_answerをパスしてください。回答を使って、検索バーの下に正確な答えと「 別の名前も聞いた 」セクションの両方を表示できます。