ナレッジベースを検索します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
polardb:RetrievalKnowledgeBase |
get |
*All resources.
|
なし | なし |
リクエスト構文
POST HTTP/1.1
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
リージョン ID。 |
cn-beijing |
| KnowledgeBaseId |
string |
必須 |
ナレッジベースの一意な識別子。カンマ区切りで最大 50 個のナレッジベース ID を指定できます。 |
pkb-1xxxxx,pkb-2xxxxx |
| QueryText |
string |
必須 |
クエリテキスト。 |
Financial report |
| TopK |
integer |
任意 |
返される結果の数。 |
5 |
| ScoreThreshold |
number |
任意 |
類似度スコアのしきい値。 |
0.7 |
| RerankEnabled |
boolean |
任意 |
再ランキングを有効にするかどうかを指定します。デフォルト値: true。 |
true |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
応答のスキーマ。 |
||
| QueryText |
string |
クエリテキスト。 |
Financial report |
| RequestId |
string |
リクエストの ID。 |
CD35F3-F3-44CA-AFFF-BAF869****** |
| ResultCount |
integer |
結果の数。 |
5 |
| Results |
array<object> |
検索結果。 |
|
|
array<object> |
検索結果。 |
||
| Captions |
array |
チャンクに関連付けられた図表の字幕のリスト。 |
|
|
string |
図表の字幕。 |
System architecture diagram |
|
| DocItems |
array |
チャンクに関連付けられたソースドキュメントからの構造化された要素リファレンスのリスト。これを使用して、元の要素を正確に特定できます。 |
|
|
string |
ソースドキュメントからの構造化された要素リファレンス。 |
#/texts/2 |
|
| FileId |
string |
ファイルの一意な識別子。 |
91b97b71-xxxx-xxxx-xxxx-33c6a6341cdc |
| FileName |
string |
ファイル名。 |
2024_Financial_Report.pdf |
| Headings |
array |
チャンクが属するセクション見出しのチェーン。 |
|
|
string |
見出し。 |
Financial report |
|
| ImageResources |
array<object> |
チャンクによってリファレンスされたイメージリソースのリスト。 |
|
|
object |
イメージリソース。 |
||
| DocumentIndex |
integer |
イメージが属するソースドキュメントのインデックス。0 から始まります。 |
0 |
| Id |
string |
イメージリソースの一意な識別子。 |
document-0/pictures/1 |
| ItemRef |
string |
ソースドキュメント構造内のイメージの要素リファレンス。 |
#/pictures/1 |
| MimeType |
string |
イメージリソースの MIME タイプ。 |
image/png |
| Uri |
string |
イメージリソースの OSS URI。 |
oss://my-bucket/results/my-space/doc-001/artifacts/image-1.png |
| KnowledgeBaseId |
string |
取得されたチャンクが属するナレッジベースの ID。複数のナレッジベースを検索する際に、結果のソースを区別するために使用されます。 |
pkb-xxxxxxxx |
| Metadata |
string |
メタデータ。 |
{} |
| PageNumbers |
array |
チャンクが属するページ番号のリスト。 |
|
|
integer |
チャンクが属するページ番号。 |
1 |
|
| ShardContent |
string |
チャンクのテキストコンテンツ。 |
Financial report |
| ShardIndex |
integer |
チャンクのインデックス。 |
1 |
| SimilarityScore |
number |
類似度スコア。 |
0.8 |
| SourceUri |
string |
ソースドキュメントの URI。 |
https://example.com/source.pdf |
例
成功レスポンス
JSONJSON
{
"QueryText": "Financial report",
"RequestId": "CD35F3-F3-44CA-AFFF-BAF869******",
"ResultCount": 5,
"Results": [
{
"Captions": [
"System architecture diagram"
],
"DocItems": [
"#/texts/2"
],
"FileId": "91b97b71-xxxx-xxxx-xxxx-33c6a6341cdc",
"FileName": "2024_Financial_Report.pdf",
"Headings": [
"Financial report"
],
"ImageResources": [
{
"DocumentIndex": 0,
"Id": "document-0/pictures/1",
"ItemRef": "#/pictures/1",
"MimeType": "image/png",
"Uri": "oss://my-bucket/results/my-space/doc-001/artifacts/image-1.png"
}
],
"KnowledgeBaseId": "pkb-xxxxxxxx",
"Metadata": "{}",
"PageNumbers": [
1
],
"ShardContent": "Financial report",
"ShardIndex": 1,
"SimilarityScore": 0.8,
"SourceUri": "https://example.com/source.pdf"
}
]
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。