ステップ 2: ドキュメントに関する回答を取得する
AIエージェントにファイルをアップロードして、即座に回答を得る
Agent Studio は、カスタム AI agent 作成をすぐに開始できる最速の方法です。In this tutorial, you'll build on the skills you developed in step 1 of this series by creating a knowledge agent with file upload and chat capabilities.
作成するもの
- アップロードされたファイルに関する質問に回答できる knowledge base に接続された AI agent
必要なもの
- この tutorial は、step 1 of this series で作成した最初の AI agent のスキルを基にしています。まだ完了していない場合は、先に進む前にこのチュートリアルを完了してください。
- Squid Console の Squid アカウント
Create a New Agent
-
Squid Console で Agent Studio タブに移動します。
-
Create New Agent をクリックして agent を追加します。Agent ID と説明を入力するウィンドウが表示されます。
- Agent ID:
knowledge-agent
- Description:
This is an agent for Squid AI's document and knowledge base tutorial
- Agent ID:
-
Create をクリックして agent を作成します。
agent 作成後、新しい agent の Overview タブにリダイレクトされます。
Give the Agent Instructions
agent にカスタム指示を与えることで、独自のペルソナが設定されます。この knowledge agent はユーザーの prompt に応答するため、提供されたファイル内の情報に焦点を当てるように agent を誘導する指示を与えてください:
Your task is to answer user prompts based on the file provided to you.
Only answer questions that can be answered using the information in the file.
Create the Knowledge Base
Squid AI の Knowledge Base 機能は、エージェントが質問に回答する際に追加情報を提供します。Knowledge Base をエージェントに接続することで、基盤となる AI model には含まれていない特定のトピックに関する情報を提供できるようになり、ドメイン固有の知識や企業情報にアクセスできるカスタム AI agent の作成が可能となります。
あなたの AI agent のための Knowledge Base を作成するには、以下の手順に従ってください:
-
Agent Studio のホームページに戻ります。ホームページには Agents, Knowledge Bases, Settings の 3 つのタブが表示されています。Knowledge Bases タブをクリックしてください。
-
Create New Knowledge Base をクリックして新しい Knowledge Base を追加します。Knowledge Base ID と、エージェントがいつ Knowledge Base を参照すべきかの説明を入力するウィンドウが表示されます。
- Knowledge Base ID:
earnings-calls
- Description:
Use this knowledge base when asked to provide information on earnings calls
- Embedding Model: この tutorial ではデフォルトの embedding model のままで構いません。
Note: この tutorial で提供されたサンプルではなく、独自のファイルを使用する場合は、適切な ID と説明を設定してください。
詳細を入力したら、Create をクリックして Knowledge Base を作成します。
- Knowledge Base ID:
-
その後、
earnings-calls
Knowledge Base にリダイレクトされます。ページ右上の Add Knowledge をクリックしてください。ファイルのアップロードを求めるウィンドウが表示されます.本 tutorial では、Microsoft の Q3 2025 earnings call transcript をサンプルファイルとして提供しています。こちらから download the file here をダウンロードできます.
次に、
msft_earnings_transcript_25_q3.pdf
ファイルをアップロードウィンドウにドラッグ&ドロップするか、ウィンドウをクリックしてコンピュータ上からファイルを選択してください。ファイルを選択したら、Add をクリックします。すると Squid AI がファイルを処理、最適化し、Knowledge Base に追加します. -
次に、Agent Studio 内の Agents タブに戻り、
knowledge-agent
をクリックして agent の Overview タブを開いてください. -
エージェントの Overview タブで Add Abilities ボタンをクリックします.
-
サイドバーの Knowledge Bases セクションを見つけます。Your Knowledge Bases をクリックして、作成した Knowledge Base の一覧を表示します。
earnings-calls
Knowledge Base の横にある + をクリックして、agent に追加してください。Knowledge Base に含まれる情報の説明を入力するウィンドウが表示されます。以下の説明を入力してください:- Description:
This knowledge base contains information on earnings calls
説明を入力したら、Connect Knowledge Base をクリックします.
- Description:
ナイス!これで、agent はアップロードされたファイルの情報にアクセスできるようになりました!
Test Your Agent
Knowledge Base を追加した後、agent の Test Agent タブに移動します。このタブでは、agent と対話し、ユーザーの入力に対する反応を確認できます.
アップロードされたファイルに関していくつかの質問をして agent をテストしてください:
What was Microsoft's reported revenue?
Did Microsoft's on-premises server revenue increase or decrease year-over-year?
How many MAU (Monthly Active Users) does Xbox have?
What new AI features were announced for Microsoft 365?
What color is the sky?
これらの prompt は、agent が Knowledge Base を参照し、ドキュメント内で見つかった最も関連性の高い情報を提供するトリガーとなります。また、agent は与えられた指示に従い、ファイル内の情報のみを用いて回答するように動作します。したがって、空の色について尋ねられた場合、agent はその情報を持っていないと回答すべきです.
Next Steps
おめでとうございます! AI knowledge agent の作成に成功しました。これで、役立つ agent の作成とカスタマイズの基本が理解できたはずです.
-
Agent Studio onboarding series の次のチュートリアルに進む: Create a PDF Agent.
-
高度にカスタマイズされた AI agent のワークフローを構築したいですか? Squid の SDKs を使用してカスタム agent を作成するか、AI tutorial をチェックして体験的に学んでみてください. 技術開発者のみ対象です.
-
質問がありますか? Please reach out to us! ご遠慮なくお問い合わせください.