Step 1: Setup Azure AI Foundry
Assuring you have known how to use Azure Portal and add azure service. I will skip the adding Azure OpenAI service.
Once you add Azure OpenAI service, open “Explore Foundry port” to open Foundry dashboard. the alternative uses https://ai.azure.com/

Recommend you switch to new Foundry. You will be asked either select a existed project or create a new project.

Creating new project is easy, simply follow the screen steps. you cannot miss it.
you can see that you are able to create agents, Explore playgrounds and Find modules and you recent done works.

1) Create Agents
Create Agents = Build your own AI assistant
ๅๅปบไธไธชโAIๅฉๆ/ๆบ่ฝไฝโ
You use this when you want to:
- define a role (e.g. โData Analyst Agentโ)
- add instructions (system prompt) / ๅ่งๅ
- connect tools (SQL, API, files) / ๅ ๅทฅๅ ท๏ผSQL / API / ๆไปถ๏ผ
- add knowledge (RAG) / ๅ ็ฅ่ฏๅบ๏ผRAG
- make it do tasks automatically
๐ Result: a custom AI agent / ้ ไธไธชAIๅๅทฅ, ไธไธชโ่ฝๅนฒๆดป็AIโ
2) Explore Playgrounds
Playgrounds = Testing area for models
็ ็ฎฑ็ณป็ป๏ผ ๆจกๅ่ฏ้ชๅฎค
You use it to:
- chat with models (GPT, DeepSeek, etc.) / ๆต่ฏไธๅๆจกๅ๏ผ GPT๏ผ DeepSeek .
- test prompts / ๅ prompt ็ๆๆ
- try settings (temperature, tokens) / ่ฐๅๆฐ๏ผtemperature ็ญ๏ผ
- compare responses / ๅๅฎ้ช
๐ It is NOT production
๐ It is for experimenting
๐ It is a โSandbox / practice roomโ
3) Find Models
Find Models = Choose AI model
You use it to:
- browse available models (GPT-4.x, GPT-5.x, DeepSeek, etc.) / ็ๆๅชไบๅฏไปฅ็จ็ๆจกๅ๏ผGPTใDeepSeek็ญ๏ผ
- check capabilities / ๅฏนๆฏ่ฝๅ
- compare cost/performance / ็ไปทๆ ผ๏ผๆฏๆง่ฝ
- decide which model to deploy
๐ It is the โmodel catalogโ / ๅฐฑๆฏโๆAIๅคง่โ
simply think as:
- Find Models โ choose the brain / ้ๅๅทฅๅ้ไบบ
- Playgrounds โ test the brain / ้ข่ฏๆต่ฏ
- Create Agents โ build a worker using the brain / ๆญฃๅผ้ไฝฃ + ๅ้ ๅทฅไฝ
Step 2: Deploy model
From Project dashboard, click “Find models”, you will find many models over there to be selected. e.g. gpt-chat5.4, DeepSeek-V4-Flash, etc.
็ด็ฝๅฐ่ฏดไบบ่ฏ๏ผๅฎ่ฃ ไธไธชmodelใ

Choose a one you like, then click “Deploy”, “deploy” is done.

Step 3: Create Agent
From Project dashboard, click Create agents

follow steps to create a agent. It is straight forward. no any confusing. Fill in agent Name.

you create the agent. looks this:

Tool = giving the AI external capabilities.
็ป AI ๅ โๅค้จ่ฝๅโ. ๆฒกๆtools๏ผ AIๅช่ฝ่ๅคฉ-Chat๏ผ ๆtools๏ผ AIๆ่ฝๅไบใ
From Agent UI, you can see:


What is “Create toolbox”
Create toolbox = create a container/group for tools
Inside toolbox you can later add:
- APIs
- Functions
- Search
- Database tools
- Custom tools
What is “Connect a tool”
Connect a tool = connect an actual usable tool/service/API
Examples:
- Bing Search
- Azure AI Search
- Function API
- REST API
- SQL
- OpenAPI service
First – Create toolbox
cleck “Create toolbox”

Second add tools to toolsBox
Then click Add to add tools into the toolBox

Let’s add a “Bing Search” as example.
cleck “Web search” –> Add tools

Add another Tool – Function / REST API, let Agent call external servicers.


{
"openapi": "3.0.0",
"info": {
"title": "Users API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://jsonplaceholder.typicode.com"
}
],
"paths": {
"/users": {
"get": {
"operationId": "getUsers",
"summary": "Get list of users",
"responses": {
"200": {
"description": "Successful response"
}
}
}
}
}
}
now we have added 2 tools

Test the tools
Go to Agent playground: Agent โ Chat / Playground / Test panel
Test 1: “REST API”
Typing “Use the REST API tool to get all users and show them.”

Test 2: Bing Search
Typing “Use Bing Search tool to find latest information about Azure AI Foundry.”


FORCE the Agent to call the tool
Assuming we have 100 REST API endpoints, each one will return different data, such as the userโs name or the companyโs name, sale’s amount ……
When we add each API Endpoint to ToolBox, we have to give clearly, specifically descriptions. Agent will scan description, it will choose the most specific one to call,

In actual AI project, most case is using “Tag”,
e.g.
Tool Registry:
– name
– description
– schema
– tags
Tool: get_company_financials
Tags: finance, company, revenue, kpi
Tool: get_user_profile
Tags: user, identity, profile
Add below “instructure” On the “Agent UI” –> “Instructions”
“You have access to multiple tools.
Each tool has a description that defines its purpose.
Always:
– Read tool descriptions carefully
– Select the most relevant tool based on semantic meaning of the user request
– Do NOT rely on hardcoded routing rules
– If multiple tools are relevant, choose the most specific one”

RAG = AI answers using retrieved documents instead of memory.
AI retrieves real documents first, then generates answer
Documents (PDF / Word / Wiki)
โ
Chunking (ๅๅ)
โ
Embeddings (ๅ้ๅ)
โ
Vector Search (็ธไผผๅบฆๆฃ็ดข)
โ
Retrieved Context
โ
LLM Answer
1: From Agent UI

FoundryIQ is Microsoftโs managed knowledge system for RAG (Retrieval-Augmented Generation) inside Azure AI Foundry.
click “Connect to Foundry IQ”
1. Create a AI Search:
If you have not Create Azure AI Search Resource, or says Create an Azure AI Search service from Azure Portal, this is the 1st step.
โAI Search Resourceโ = search engine server
“Azure AI Search Index” = searchable dataset inside it
AI Search itself is acting as the Vector Database.
from azure portal –> AI search

after successfully created AI search resource, will see

We can see 3 parts from AI Search dasjboard:
- Build your knowledge base
- Connect your data
- Monitor and scale
Build your knowledge base: Build a RAG-ready knowledge system
Including:
- document ingestion
- indexing
- embeddings
- retrieval
- grounded chat playground
Connect your data: This is where you IMPORT your enterprise data.
e.g.
- Cosmos DB
- Blob storage
- SharePoint
- SQL
This step creates search indexes.
Monitor and scale: Infrastructure management: scaling, replicas, partitions, performance
2. Build your knowledge base
This step we will create knowledge source. Turn your data into an agentic knowledge base.
To Build your knowledge base, from AI Search Service dashboard, click “Build”

click “Create new” to create knowledge source.

Indexed = Azure stores/searches your processed data locally
Remote = Azure queries external systems live at runtime
Let’s use Azure blob (indexed) as example.

3. Enable text vectorization
This creates:
- embeddings
- vector fields
- semantic retrieval capability

save it, then we see this:

Now, we have successfully built:
- Blob Storage ingestion
- Azure AI Search indexing
- Knowledge Base connection
- Vectorization enabled (semantic search ready)
๐ In short: your RAG data layer is READY.
Attach Knowledge Source to Agent
From Project UI

create a new base in mainri-ai-search
return Agent UI –> click Add (Knowledge) –> connect to Foundry IQ
now, click “Create a new base in Mainri-ai-search”

Knowledge Base (Index creation wizard)
Test the RAG
Since we have upload company’s “return” and “policy” to blob, let’s test. it works. Agent read the company’s policy doc, and used it to answer my question
“What WFH – please answering in both EN and CN”


