{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"ナレッジベースの作成","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"ナレッジベースの作成","__idx":0},"children":["ナレッジベースの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ナレッジベースは、エージェントに参照データを提供するツールであり、エージェントがより正確で望ましい出力を生成するために重要な機能です。AI Agent Foundryは2種類のナレッジベースを提供します。1つは_Database_、もう1つは_Text_です。以下の手順に従って、新しいナレッジベースを作成します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure コンソールを開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["AI Agent Foundry"]},"に移動します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Knowledge Base"]},"を選択し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create knowledge base"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/creating-an-ai-knowledge-base-2025-03-04.4d247864042e3ccc1a8e54da318cc7f77500db176ee71cc75ae1cf6b3981279f.91c26685.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"データベースナレッジベースの作成","__idx":1},"children":["データベースナレッジベースの作成"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ナレッジベースの詳細を入力","__idx":2},"children":["ナレッジベースの詳細を入力"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["使用方法を指定するナレッジベース名を入力します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Databaseタイプを選択し、データベースを選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/creating-a-knowledge-base-2025-06-13-11-30-28.1649163d16dbbc239f56459febdc3276d56d11663469e675a74893f24abdc4fc.91c26685.png","alt":"Database knowledge base configuration form"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"format-typeの選択","__idx":3},"children":["Format Typeの選択"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データベースナレッジベースを作成する際、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Format Type"]},"を選択することで、クエリ結果をAIエージェントにどのような形式で返すかを指定できます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Markdown-KV (推奨)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON (レガシー)"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/knowledge-base-format-type-selection.e84703b347e916e4ed5498851947563e6335ff6c30a549c8812d000ad8d2d247.91c26685.png","alt":"Format type選択"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"markdown-kv-推奨","__idx":4},"children":["Markdown-KV (推奨)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Markdown-KVは、新しいナレッジベースに推奨される形式です。クエリ結果を見出しとキー・バリューペアで構成された人間にも読みやすい形式で返すため、LLMが結果を理解しやすくなります。エージェントのクエリはユーザー自身の権限で実行されるため、アクセス制御はテーブルフィルタリングではなく権限レベルで実施されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["主なメリット:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Max rowsとTimeout seconds設定を適切に挙動させるためのFormat Typeです"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["結果がMax rows制限を超えた場合に自動的に切り捨て警告が表示され、エージェントが追加のWHERE条件でクエリを絞り込むよう促されます"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["設定オプション:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Max rows"]},": 返される最大行数を設定します(1〜100、デフォルト:50)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timeout seconds"]},": クエリのタイムアウトを設定します(10〜300秒、デフォルト:60)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"json-レガシー","__idx":5},"children":["JSON (レガシー)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JSONは将来的に廃止予定のレガシー形式です。この形式は、ナレッジベースを特定のテーブルに制限する必要がある場合にのみ使用してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSONを使用する場合:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データベースに多数のテーブルがあり、クエリパフォーマンスを向上させたい場合"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["類似したテーブル名やカラム名が存在し、エージェントの混乱を防ぎたい場合"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ナレッジベースを特定のテーブルセット(例:",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customers"]},"と",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orders"]},"のみ)に制限する必要がある場合。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]},"設定オプションで含めるテーブルを指定できます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["制限事項:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Max rowsとTimeout secondsの設定が無視される場合があります"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["結果が切り捨てられた際にエージェントへの警告が表示されません"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"テーブル情報を入力","__idx":6},"children":["テーブル情報を入力"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["_Add table_ボタンをクリックして、テーブル情報を定義します"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["フォームに入力します。"]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"フィールド"},"children":["フィールド"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ナレッジベースの名前を入力します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Database"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TD Database Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クエリが実行されるTreasure Dataデータベースを入力します。",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["データベースはPlazma DBに存在する必要があります。"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ナレッジベースがサポートするテーブルを定義します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TD Query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["選択したデータベースを使用してテーブルを定義するTrino SQLを提供します。",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Exclude Columns"]},": 保持したいすべての列をリストします。",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Exclude Records"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WHERE"]},"句でレコードをフィルタリングします。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["参照するテーブル名を入力します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["+ Add table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ナレッジベースにさらにテーブルを追加する場合に選択します。"]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},"を選択すると、データ読み込みプロセスが開始されます。ナレッジベースを使用する前に、ステータスが",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Success"]},"になるまで待ちます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"テキストナレッジベースの作成","__idx":7},"children":["テキストナレッジベースの作成"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ナレッジベースの詳細を入力-1","__idx":8},"children":["ナレッジベースの詳細を入力"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["使用方法を指定するナレッジベース名を入力します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Textタイプを選択し、フォームに入力します"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/creating-a-knowledge-base-2025-06-13-11-37-11.285526b225e8d44ab56b1aacd3e7e0f4a47dc71196bdf0ed6b8d0465659525cc.91c26685.png","alt":"Text knowledge base form"},"children":[]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"フィールド"},"children":["フィールド"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ナレッジベースの名前を入力します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Text"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Text-input"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最大18,000文字の参照テキストを入力します。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ペアレントセグメントナレッジベースの作成","__idx":9},"children":["ペアレントセグメントナレッジベースの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ペアレントセグメントナレッジベースは、ペアレントセグメント設定で「LLM enabled」スイッチが有効になっている場合に自動的に作成されます。現在、カスタムLLMプロジェクトで作成する方法はありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["次のステップ"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/customer-data-platform/ai-agent-foundry/knowledgebase/querying-a-knowledge-base"},"children":["クエリシミュレーション"]},"を通じてナレッジベースの設定を確認します。"]}]},"headings":[{"value":"ナレッジベースの作成","id":"ナレッジベースの作成","depth":1},{"value":"データベースナレッジベースの作成","id":"データベースナレッジベースの作成","depth":2},{"value":"ナレッジベースの詳細を入力","id":"ナレッジベースの詳細を入力","depth":3},{"value":"Format Typeの選択","id":"format-typeの選択","depth":3},{"value":"Markdown-KV (推奨)","id":"markdown-kv-推奨","depth":4},{"value":"JSON (レガシー)","id":"json-レガシー","depth":4},{"value":"テーブル情報を入力","id":"テーブル情報を入力","depth":3},{"value":"テキストナレッジベースの作成","id":"テキストナレッジベースの作成","depth":2},{"value":"ナレッジベースの詳細を入力","id":"ナレッジベースの詳細を入力-1","depth":3},{"value":"ペアレントセグメントナレッジベースの作成","id":"ペアレントセグメントナレッジベースの作成","depth":2}],"frontmatter":{"seo":{"title":"ナレッジベースの作成"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/ai-agent-foundry/knowledgebase/creating-a-knowledge-base","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}