Azure AI Foundry โ Deep Dive
Goal: Understand Azure AI Foundry end-to-end and build real-world AI applications on top of it.
๐ Research & Learning Resources
| # | Resource | Type |
|---|---|---|
| 1 | Azure AI Foundry Overview | ๐ฌ Video |
| 2 | AI Foundry Agent Intro | ๐ฌ Video |
| 3 | Official Learning Path | ๐ Docs |
๐๏ธ Platform Architecture
graph TD
A["Azure AI Foundry"] --> B["Hub"]
B --> C["Project A"]
B --> D["Project B"]
C --> E["Model Deployments"]
C --> F["Prompt Flows"]
C --> G["Evaluations"]
E --> H["GPT-4o / Llama / Mistral"]
F --> I["LLM Nodes"]
F --> J["Python Nodes"]
F --> K["AI Search Nodes"]
G --> L["Groundedness"]
G --> M["Relevance"]
G --> N["Coherence"]
style A fill:#0078d4,color:#fff
style B fill:#50e6ff,color:#000
style C fill:#50e6ff,color:#000
style D fill:#50e6ff,color:#000
๐ง Background & Prerequisites
1. Azure AI Services Ecosystem
AI Foundry acts as a unified surface over these Azure AI services:
| Service | What It Does | Key Use Case |
|---|---|---|
| Azure OpenAI | GPT-4, GPT-4o, DALL-E, Whisper, Embeddings | Chat, code gen, summarization |
| Azure AI Search | Vector + keyword hybrid search | RAG knowledge retrieval |
| Azure AI Speech | Speech-to-text, text-to-speech | Voice interfaces |
| Azure AI Vision | Image analysis, OCR, captioning | Visual understanding |
| Document Intelligence | Extract data from PDFs, invoices, forms | Structured extraction |
| Content Safety | Detect hate, violence, sexual, self-harm | Guardrails & moderation |
๐ก Key insight: AI Foundry doesn't replace these services โ it orchestrates them into cohesive applications.
2. Core Concepts
graph LR
Hub["๐ข Hub
(Shared resources)"] --> Project1["๐ Project
(Your AI app)"] Project1 --> Deploy["๐ Model Deployment
(API endpoint)"] Project1 --> PF["โก Prompt Flow
(LLM pipeline)"] Project1 --> Eval["๐ Evaluation
(Quality metrics)"] Hub --> Connections["๐ Connections
(OpenAI, Search, Storage)"] Hub --> Compute["๐ป Compute
(GPU/CPU)"]
(Shared resources)"] --> Project1["๐ Project
(Your AI app)"] Project1 --> Deploy["๐ Model Deployment
(API endpoint)"] Project1 --> PF["โก Prompt Flow
(LLM pipeline)"] Project1 --> Eval["๐ Evaluation
(Quality metrics)"] Hub --> Connections["๐ Connections
(OpenAI, Search, Storage)"] Hub --> Compute["๐ป Compute
(GPU/CPU)"]
| Concept | Description |
|---|---|
| Hub | Shared container โ connections, compute, config. Created once per team. |
| Project | Workspace for a specific AI app. Has its own deployments, flows, evaluations. |
| Model Catalog | 1600+ models (Azure OpenAI, Meta Llama, Mistral, Cohere, HuggingFace). Deploy as MaaS or MaaP. |
| Playground | Interactive UI to test chat, completions, and image generation before coding. |
3. Prompt Flow
The primary tool for building LLM-powered applications inside AI Foundry.
flowchart LR
Input["๐ User Query"] --> Embed["๐ข Embedding Node"]
Embed --> Search["๐ AI Search Node"]
Search --> LLM["๐ค LLM Node
(GPT-4o)"] LLM --> Safety["๐ก๏ธ Content Safety"] Safety --> Output["๐ฌ Response"]
(GPT-4o)"] LLM --> Safety["๐ก๏ธ Content Safety"] Safety --> Output["๐ฌ Response"]
Flow Types:
- ๐น Standard Flow โ General purpose LLM pipelines
- ๐น Chat Flow โ Conversational with history management
- ๐น Evaluation Flow โ Measure quality (groundedness, relevance, coherence)
Key Features:
- Nodes โ LLM, Python, Prompt, Embedding โ chain them together
- Connections โ Stored credentials to Azure OpenAI, AI Search, custom APIs
- Variants โ A/B test different prompts or parameters in the same flow
4. AI Agents in Foundry
graph TD
User["๐ค User"] --> Agent["๐ค AI Agent"]
Agent --> Tools["๐ง Tools"]
Agent --> Knowledge["๐ Knowledge
(AI Search / RAG)"] Agent --> Safety["๐ก๏ธ Safety Rules"] Tools --> API["๐ External APIs"] Tools --> Code["๐ป Code Execution"] Tools --> Search["๐ Document Search"]
(AI Search / RAG)"] Agent --> Safety["๐ก๏ธ Safety Rules"] Tools --> API["๐ External APIs"] Tools --> Code["๐ป Code Execution"] Tools --> Search["๐ Document Search"]
| Building Block | Purpose |
|---|---|
| System Prompt | Instructions that define agent behavior |
| Tools | Functions the agent can call (defined as JSON schemas) |
| Knowledge Sources | Grounding data via Azure AI Search (RAG pattern) |
| Safety Rules | Content filters, prompt shields, PII detection |
๐ฎ Emerging pattern: Multi-agent orchestration โ specialized agents coordinating to solve complex tasks.
5. Responsible AI & Safety
| Layer | What It Does |
|---|---|
| Content Filters | Block hate / sexual / violence / self-harm at 4 severity levels |
| Prompt Shields | Detect jailbreak attempts & prompt injection |
| Groundedness Detection | Verify responses are based on provided context |
| PII Detection | Identify & redact personal information |
โ TODO โ Remaining Work
| # | Task | Priority |
|---|---|---|
| 1 | Create an AI Foundry Hub + Project (with screenshots) | ๐ด High |
| 2 | Deploy GPT-4o from the model catalog | ๐ด High |
| 3 | Build a simple chat app in the Playground | ๐ด High |
| 4 | Create a Prompt Flow: query โ AI Search โ LLM response | ๐ด High |
| 5 | Build an AI Agent with tool calling (weather API + doc search) | ๐ก Medium |
| 6 | Run evaluation flow (groundedness + relevance metrics) | ๐ก Medium |
| 7 | Configure content filters & test adversarial prompts | ๐ก Medium |
| 8 | Compare AI Foundry vs LangChain/LlamaIndex for RAG | ๐ข Low |
| 9 | Document pricing model & cost optimization | ๐ข Low |
| 10 | Final architecture diagram of full HubโProjectโDeployโAgent flow | ๐ข Low |