Step 2: Document に関する回答を取得する
AI agent に file を upload し、すぐに回答を得ます
Agent Studio は custom AI agent の構築を開始する最も迅速な方法です。この tutorial では、この series の step 1 で習得した skill を発展させ、file upload と chat capability を備えた knowledge agent を作成します。
構築するもの
- upload した file に関する question に answer できる、knowledge base に接続された AI agent。
必要なもの
- この tutorial は最初の AI agent を作成する この series の step 1 で習得した skill を基にします。この tutorial を完了していない場合は、続行前に完了してください。
- Squid Console の Squid account
新しい Agent を作成する
-
Squid Console で Agent Studio tab に移動します。
-
Create New Agent をクリックして agent を追加します。Agent ID と description の入力を求める window が表示されます。
- 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 tab に redirect されます。
Agent に Instruction を指定する
agent に custom instruction を指定すると、unique persona を与えられます。この agent は user prompt に response する knowledge agent であるため、指定 file の information に focus するよう agent を guide する instruction を指定します。
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.
Knowledge Base を作成する
Squid AI の knowledge base feature は、question への回答時に agent に additional information を提供します。knowledge base を agent に接続すると、underlying AI model の一部ではない可能性がある specific topic に関する relevant answer を agent が提供できるようになります。これにより domain-specific knowledge と company information に access できる custom AI agent を実現できます。
AI agent 用の knowledge base を作成するには、以下の step に従います。
-
Agent Studio の home page に戻ります。home page には Agents、Knowledge Bases、Settings の 3 つの tab があります。Knowledge Bases tab をクリックします。
-
Create New Knowledge Base をクリックして、新しい knowledge base を追加します。Knowledge Base ID と、agent が knowledge base に相談するタイミングの description の入力を求める window が表示されます。
-
Knowledge Base ID:
earnings-calls -
Description:
Use this knowledge base when asked to provide information on earnings calls -
Embedding Model: この tutorial では default embedding model を選択したままにできます。
注記: この tutorial で提供される sample ではなく独自の file を使用する場合は、use case に適切な ID と description を指定してください。
detail を指定した後、Create をクリックして knowledge base を作成します。
-
-
次に
earnings-callsknowledge base に redirect されます。page の右上にある Add Knowledge をクリックします。file の upload を求める window が表示されます。この tutorial では Microsoft の Q3 2025 earnings call transcript を sample file として提供します。こちらから file を downloadできます。
次に、
msft_earnings_transcript_25_q3.pdffile を upload window に drag and drop するか、window をクリックして computer 上の file を browse します。file を選択した後、Add をクリックします。Squid AI は file を process、optimize、knowledge base に追加します。Extraction Methodupload window には Extraction Method dropdown があり、default には (Default) の mark が付いています。各 method の機能については、Extraction methodsを参照してください。
-
次に Agent Studio 内の Agents tab に戻り、
knowledge-agentをクリックして agent の Overview tab を開きます。 -
agent の Overview tab で、Add Abilities button をクリックします。
-
sidebar の Knowledge Bases section を見つけます。Your Knowledge Bases をクリックして、作成済み knowledge base の list を表示します。
earnings-callsknowledge base の横にある + をクリックして agent に追加します。knowledge base に含まれる information の description を指定する window が表示されます。以下の description を指定します。-
Description:
This knowledge base contains information on earnings callsdescription を指定した後、Connect Knowledge Base をクリックします。
よくできました!これで agent は upload された file 内の information に access できます!
-
Agent をテストする
knowledge base の追加後、agent の Test Agent tab に移動します。この tab では agent と interaction し、user input への response を確認できます。
upload した file に関するいくつかの question を agent に尋ねて test します。
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 を参照し、document 内で見つかった最も relevant な information を提供します。また agent は instruction に従い、file 内にある information のみで response します。そのため空の色について尋ねられた場合、agent はその information を持たないと response します。
次のステップ
おめでとうございます!AI knowledge agent を作成できました。helpful な agent を作成・customize する方法について、基本的な理解を得られました。
-
Agent Studio onboarding series の次の tutorial に進む: PDF Agent を作成する。
-
高度に customized された AI agent workflow を構築したいですか? Squid SDK を使用して custom agent を作成するか、hands-on learning experience のために AI tutorialを確認してください。technical developer 専用。
-
質問がありますか? お問い合わせください!開始を喜んでお手伝いします。