Azure AI Foundry service

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
  • PDF
  • 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”