ディープサーチは、マルチエージェントアーキテクチャに基づくプロフェッショナルな質疑応答 (Q&A) システムで、正確で焦点が明確な詳細回答を提供します。データを効率的に検索し、ユーザーの意図を理解し、複数ソースの情報を統合して、包括的で構造化されたレスポンスを生成できます。従来の検索エンジンとは異なり、ディープサーチは複雑な質問の分解、複数ソースのデータ統合、異なるドメイン間の知識の接続に優れています。
機能比較
次の表では、ディープサーチと従来の AI 検索を比較します。
|
観点 |
ディープサーチ |
従来の AI 検索 |
|
理解 |
コンテキスト推論とインテント認識 |
セマンティック検索とキーワード検索 |
|
応答モード |
時間範囲や地域スコープなど、明確化に必要な情報を能動的に確認します。 |
元のクエリを受動的に受け取ります。 |
|
データソース |
プライベートデータ、 Web、データベースなどのソースからクロスプラットフォームで集約できます。 |
単一のデータソースに依存します。 |
|
ナレッジ密度 |
質問に正確に回答するため、1 回のレスポンスで引用付きの参照を複数返します。 |
関連するデータパッセージを 3~5 件の固定セットのみ返します。 |
|
インタラクションの深さ |
継続的なマルチターンの専門的な対話をサポートします。 |
会話ターン数が結果に大きく影響します。 |
|
適用可能な質問 |
分析や比較などのタスクにおける、複雑なオープンエンドな質問 |
単純な事実ベースの質問 |
アーキテクチャ
ディープサーチはマルチエージェントアーキテクチャに基づいて構築され、次のエージェントで構成されます:
-
クエリ理解エージェント:ユーザーの元のクエリを理解し、書き換えます。
-
自律計画エージェント:ユーザーの意図を特定し、実行パスを計画・調整し、回答を検証して修正します。
-
検索エージェント:現在の会話ラウンドに関するナレッジを検索し、要約します。
-
カジュアルチャットエージェント:「Hello」などの会話入力に応答します。
-
明確化エージェント:曖昧なユーザークエリを明確化するためのフォローアップ質問を生成します。
-
要約エージェント:ユーザーの質問に対する最終回答を生成します。
使用方法
コンソール
1. OpenSearch コンソールにログインし、OpenSearch LLM-Based Conversational Search Edition を選択します。左側のナビゲーションペインで、 [インスタンス管理] をクリックします。管理するインスタンスを見つけ、 [操作] 列の [管理] をクリックします。
2. インスタンスの詳細ページで、 [Q&A テスト] をクリックします。 [ディープサーチ] を有効にし、ダイアログボックスにクエリを入力し、 [送信] をクリックします。
3. Q&A テスト結果を確認します。
API
リクエストパラメーター
|
パラメーター |
タイプ |
必須 |
デフォルト |
説明 |
|
|
Boolean |
いいえ |
|
ディープサーチを有効にするかどうかを指定します。
|
|
|
Boolean |
いいえ |
|
思考プロセスを返すかどうかを指定します。 |
|
|
Integer |
いいえ |
10 |
思考ラウンド数 (最大:20) |
|
|
String |
いいえ |
|
思考プロセスと回答の言語
|
詳細については、「Q&A パラメーター」をご参照ください。
リクエストボディの例
{
"question" : {
"text" : "Recommend 3 Jay Chou albums",
"type" : "TEXT"
},
"options": {
"retrieve": {
"web_search": {
"enable": true
}
},
"chat": {
"enable_deep_search": true,
"model": "qwen3-235b-a22b"
},
"agent": {
"think_process": true,
"max_think_round": 10,
"language": "AUTO"
}
}
}
レスポンスパラメーター
|
パラメーター |
タイプ |
説明 |
|
|
String |
リクエスト ID |
|
|
String |
リクエストの処理ステータス
|
|
|
Float |
サーバーが成功したリクエストの処理に要した時間 (ミリ秒) |
|
|
Integer |
主キー ID |
|
|
String |
ドキュメントのタイトル |
|
|
String |
カテゴリ名 |
|
|
String |
ドキュメントの URL |
|
|
String |
Q&A の結果 |
|
|
String |
返される結果のタイプ |
|
|
Array |
ドキュメントコンテンツのスコア |
|
|
String |
思考イベント 1 つの思考ラウンドは |
|
|
String |
結果が完了したかどうかを示します。
|
|
|
String |
エラー発生時に返されるエラーコード |
|
|
String |
エラー発生時に返されるエラーメッセージ |
レスポンスボディの例
{
"request_id": "f1b9*****************2853a",
"status": "OK",
"latency": 33967.562031,
"result": {
"data": [
{
"answer": "The user wants a recommendation of 3 Jay Chou albums. I need to first find out what albums Jay Chou has and then select 3 representative ones to recommend.",
"type": "TEXT_MARKDOWN",
"reference": [],
"rich_text_ref": [],
"event": "THINK",
"event_status": "FINISHED"
},
{
"answer": "List of all Jay Chou albums",
"type": "TEXT_MARKDOWN",
"reference": [],
"rich_text_ref": [],
"event": "ACTION",
"event_status": "FINISHED"
},
{
"answer": "Here is a list of Jay Chou's albums, sorted by release year: \n\n1. **JAY** (2000) \n2. **Fantasy** (2001) \n3. **The Eight Dimensions** (2002) \n4. **Ye Hui Mei** (2003) \n5. **Common Jasmine Orange** (2004) \n6. **November's Chopin** (2005) \n7. **Still Fantasy** (2006) \n8. **On the Run** (2007) \n9. **Capricorn** (2008) \n10. **The Era** (2010) \n11. **Exclamation Mark** (2011) \n12. **Opus 12** (2012) \n13. **Aiyo, Not Bad** (2014) \n14. **Jay Chou's Bedtime Stories** (2016) \n15. **Greatest Works of Art** (2022) \n\nNote: Some songs mentioned in the search results are actually tracks on albums. They have been organized into a complete album list.",
"type": "TEXT_MARKDOWN",
"reference": [],
"rich_text_ref": [],
"event": "ANSWER",
"event_status": "FINISHED"
},
{
"answer": "\nFirst, the user's question is: 'Recommend 3 Jay Chou albums.' I need to answer this based on the available information, which includes several documents describing Jay Chou's albums.\n\nReviewing the information:\n- [Doc 01] lists Jay Chou's albums and songs, but it seems to only mention the 'JAY' album and lists some songs. The document starts by saying 'Jay Chou's musical works include six official solo albums and four EP albums,' but the specific album names are not fully listed. It lists songs, but only 'JAY' is explicitly mentioned as an album name.\n- [Doc 02] mentions albums like 'The Eight Dimensions,' 'Jay Chou's Bedtime Stories,' 'Fantasy,' 'Jay,' etc., and provides the years.\n- [Doc 03] is similar to [Doc 02], mentioning albums like 'Greatest Works of Art,' 'Jay Chou's Bedtime Stories,' 'Aiyo, Not Bad,' 'Opus 12,' and 'Exclamation Mark.'\n- [Doc 04] mentions 'JAY' and 'Fantasy' and describes them.\n- [Doc 05] is similar to [Doc 02] and [Doc 03], mentioning the same albums.\n\nFrom these documents, I can extract a list of Jay Chou's albums:\n- [Doc 02] and [Doc 03] clearly list album names and years:\n - 'Greatest Works of Art' 2022\n - 'Jay Chou's Bedtime Stories' 2016\n - 'Aiyo, Not Bad' 2014\n - 'Opus 12' 2012\n - 'Exclamation Mark' 2011\n- Additionally, [Doc 01] mentions 'JAY' 2000, and [Doc 04] also mentions 'JAY' and 'Fantasy.'\n- [Doc 02] also mentions 'The Eight Dimensions' 2002, 'Fantasy' 2001, and 'Jay' 2000 (which likely refers to 'JAY').\n\nCombining all documents, Jay Chou's albums include:\n- 'JAY' 2000 [Doc 01][Doc 04]\n- 'Fantasy' 2001 [Doc 02][Doc 04]\n- 'The Eight Dimensions' 2002 [Doc 02]\n- 'Exclamation Mark' 2011 [Doc 02][Doc 03]\n- 'Opus 12' 2012 [Doc 02][Doc 03]\n- 'Aiyo, Not Bad' 2014 [Doc 02][Doc 03]\n- 'Jay Chou's Bedtime Stories' 2016 [Doc 02][Doc 03]\n- 'Greatest Works of Art' 2022 [Doc 02][Doc 03]\n\nThe user wants a recommendation of 3 albums. I need to make recommendations based on the available information and ensure each point is supported by a source.\n\nRecommendation criteria: I should choose some classic or representative albums. From the documents:\n- [Doc 02] and [Doc 03] highly praise 'Fantasy,' calling it 'the peak of Jay Chou's musical career and a benchmark of an era that countless musicians have tried to imitate but found difficult to surpass.' [Doc 02][Doc 03]\n- [Doc 01] mentions 'JAY' as his debut album.\n- [Doc 02] mentions that 'The Eight Dimensions' continued the style of the first two albums and won multiple awards. [Doc 02]\n- Other albums like 'Jay Chou's Bedtime Stories' and 'Greatest Works of Art' are also mentioned.\n\nSo, I can recommend:\n1. 'Fantasy' - because it is described as a peak and a benchmark.\n2. 'JAY' - as the debut album, it has historical significance.\n3. 'The Eight Dimensions' - because it continued his success and won awards.\n\nAlternatively, I could choose more recent ones, but the documents emphasize the importance of his early albums.\n\nEnsure source citations: Every fact must be cited in the format [Doc xx].\n\nAnswer requirements:\n- Use English.\n- If the information can answer the question, it must be used, and sources must be cited.\n- Use rich markdown formats: lists, tables, etc.\n- Natural, not stiff, tone.\n- Accuracy, no fabricated information.\n\nStructuring the answer:\n- Start by directly recommending 3 albums.\n- Provide reasons for each album, based on the documents.\n- Use a list or table to organize.\n- Cite sources.\n\nFinal recommendation:\n1. 'Fantasy' (2001) - Reason: Described as the peak of Jay Chou's musical career and a benchmark of an era. [Doc 02][Doc 03]\n2. 'JAY' (2000) - Reason: Debut album that established his musical style. [Doc 01][Doc 04]\n3. 'The Eight Dimensions' (2002) - Reason: Continued the style of his previous works, won multiple awards, and brought hope to the recording industry. [Doc 02]\n\nI could also consider 'Jay Chou's Bedtime Stories' or 'Greatest Works of Art,' but there is less description of them in the documents, while the early albums have more commentary.\n\nIn [Doc 02][Doc 03], there is a detailed description of 'Fantasy,' while other albums are just listed.\n\nSo, choosing these three is reasonable.\n\nUse markdown: I can use ordered lists or tables.\n\nFor example:\n- Use ### for headings\n- Use a list for descriptions\n- Bold the album names\n\nEnsure no extra information is added: only based on the documents.\n",
"type": "TEXT_MARKDOWN",
"reference": [],
"rich_text_ref": [],
"event": "THINK",
"event_status": "FINISHED"
},
{
"answer": "\nBased on his representative albums, here are three classic works by Jay Chou that I recommend. These albums not only showcase his unique musical style (blending pop, R&B, rock, and other elements) but are also widely acclaimed for their artistic achievement and influence. These recommendations are based on the cited sources, and the reasoning for each strictly adheres to the information within those documents.\n\n### Three Recommended Jay Chou Albums\n\n1. **Fantasy (2001)** \n - **Reason for Recommendation**: This album is widely regarded as the pinnacle of Jay Chou's musical career. It established his creative paradigm and became a benchmark of an era that countless musicians have tried to imitate but found difficult to surpass. Each song on the album is like a lens, creating a visual through sound, taking listeners across time and space. For example, 'Love in B.C.' blends R&B and hip-hop to create a sense of a time vortex; 'Ninja' uses a single chord and Japanese imagery to enhance the feeling of being there; and 'William's Castle' uses an organ to create a mysterious medieval atmosphere. Overall, it established Jay Chou's mature style and is beloved by fans worldwide[^2^][^3^]. \n - **Representative Songs**: 'Love in B.C.', 'Ninja', 'William's Castle' (Source: [^2^][^3^]).\n\n2. **JAY (2000)** \n - **Reason for Recommendation**: As Jay Chou's debut solo album, it marks the beginning of his musical career and includes several classic songs such as 'Cute Woman,' 'Perfectionism,' and 'Starry Mood.' This album showcases his unique musical talent, blending multiple elements, laying the foundation for his subsequent works, and quickly gaining widespread recognition from fans[^1^][^4^]. \n - **Representative Songs**: 'Cute Woman,' 'Perfectionism,' 'Starry Mood' (Source: [^1^][^4^]).\n\n3. **The Eight Dimensions (2002)** \n - **Reason for Recommendation**: This album continues the arrangement style of his first two works with a more mature personal style, which helped Jay Chou win numerous awards and set new records in the Mandopop scene. At the same time, its high sales brought hope to a recording industry plagued by piracy. The Minnan dialect song 'Where is the Train Going' reflects Jay Chou's connection to his roots, a feature less common in his later works, highlighting his artistic depth[^2^]. \n - **Representative Songs**: 'Where is the Train Going,' 'Secret Signal' (Source: [^2^]).\n\nThese three albums represent the breakthrough, innovation, and mature stages of Jay Chou's early career, making them an excellent starting point for understanding the essence of his music. Each one carries a unique creative story and is worth savoring!",
"type": "TEXT_MARKDOWN",
"reference": [
{
"title": "Who knows the names of all of Jay Chou's albums",
"category": "webSearch",
"url": "https://zhidao.baidu.com/question/317142607014917724.html"
},
{
"title": "Jay Chou",
"category": "webSearch",
"url": "https://music.apple.com/cn/artist/300117743"
},
{
"title": "Jay Chou - Apple Music",
"category": "webSearch",
"url": "https://music.apple.com/cn/artist/a/300117743"
},
{
"title": "Summary of All Jay Chou Album Names",
"category": "webSearch",
"url": "https://m.xueba5.com/xw/25426.html"
},
{
"title": "Jay Chou",
"category": "webSearch",
"url": "https://music.apple.com/cn/artist/%E5%91%A8%E6%9D%B0%E4%BC%A6/300117743"
}
],
"rich_text_ref": [],
"event": "SUMMARY",
"event_status": "FINISHED"
}
]
}
}
SDK
環境変数の設定
環境変数 ALIBABA_CLOUD_ACCESS_KEY_ID および ALIBABA_CLOUD_ACCESS_KEY_SECRET を設定します。
-
Alibaba Cloud アカウントの AccessKey ペアには、すべての API に対する権限があります。セキュリティを高めるため、API 呼び出しと日常的な運用・保守には RAM ユーザーの使用を推奨します。詳細については、「RAM ユーザーの作成」をご参照ください。
-
AccessKey ID と AccessKey Secret を作成するには、「AccessKey の作成」をご参照ください。
-
RAM ユーザーの AccessKey ペアを使用する場合、RAM ユーザーに AliyunOpenSearchFullAccess 権限が付与されていることを確認してください。
-
プロジェクトコードに AccessKey ID と AccessKey Secret をハードコーディングしないでください。認証情報が漏えいし、アカウント内のすべてのリソースのセキュリティが損なわれる可能性があります。
-
Linux および macOS システム
次のコマンドを実行し、
<access_key_id>と<access_key_secret>を RAM ユーザーの AccessKey ID とシークレットに置き換えます。export ALIBABA_CLOUD_ACCESS_KEY_ID=<access_key_id> export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<access_key_secret> -
Windows システム
-
環境変数用のファイルを作成します。ファイルに
ALIBABA_CLOUD_ACCESS_KEY_IDとALIBABA_CLOUD_ACCESS_KEY_SECRETを追加し、ご自身の AccessKey ID とシークレットを値として設定します。 -
変更を反映するため、Windows を再起動します。
-
依存関係
<dependency>
<groupId>com.aliyun.opensearch</groupId>
<artifactId>aliyun-sdk-opensearch</artifactId>
<version>6.0.0</version>
</dependency>
サンプルコード
次のサンプルコードは、呼び出し方法を示しています。
package com.aliyun.opensearch;
import com.aliyun.opensearch.OpenSearchClient;
import com.aliyun.opensearch.sdk.generated.OpenSearch;
import com.aliyun.opensearch.sdk.generated.commons.OpenSearchClientException;
import com.aliyun.opensearch.sdk.generated.commons.OpenSearchException;
import com.aliyun.opensearch.sdk.generated.commons.OpenSearchResult;
import java.util.HashMap;
import java.util.Map;
public class LLMSearch {
private static String accesskey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
private static String secret = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");
private static String appName = "Replace with your application name";
private static String host = "Replace with the API endpoint of your application";
private static String path = "/apps/%s/actions/multi-search";
public static void main(String[] args) {
String appPath = String.format(path, appName);
// API の読み取りタイムアウトを設定します。
OpenSearch openSearch = new OpenSearch(accesskey, secret, host);
openSearch.setTimeout(90000);
OpenSearchClient openSearchClient = new OpenSearchClient(openSearch);
Map<String, String> params = new HashMap<String, String>() {{
put("format", "full_json");
put("_POST_BODY", "{\"question\":{\"text\":\"Recommend 3 Jay Chou albums\",\"type\":\"TEXT\",\"session\":\"\"},\"options\":{\"chat\":{\"stream\":true,\"enable_deep_search\":true,\"model\":\"opensearch-qwen\"}}}");
}};
try {
OpenSearchResult openSearchResult = openSearchClient
.callAndDecodeResult(appPath, params, "POST");
System.out.println("RequestID=" + openSearchResult.getTraceInfo().getRequestId());
System.out.println(openSearchResult.getResult());
} catch (
OpenSearchException e) {
System.out.println("RequestID=" + e.getRequestId());
System.out.println("ErrorCode=" + e.getCode());
System.out.println("ErrorMessage=" + e.getMessage());
} catch (
OpenSearchClientException e) {
System.out.println("ErrorMessage=" + e.getMessage());
}
}
}