https://www.youtube.com/watch?v=xXTuxKdzZrI Azure Innovation Station channel
Here is a markdown guide based on the video tutorial for creating an AI Agent using Agentic RAG (Retrieval-Augmented Generation) in Microsoft Azure.
How to Create an Agentic RAG AI Agent in Azure
This guide outlines the process of setting up an AI agent that uses Retrieval-Augmented Generation (RAG) to answer questions based on specific documents (e-books) rather than general knowledge.
Prerequisites
- An active Azure Subscription.
- Access to the Azure Portal.
Step 1: Create a Microsoft Foundry Resource
- Navigate to the Azure Portal.
- Create a new resource group (or use an existing empty one).
- Search for and create a Microsoft Foundry resource.
- Note: Previously known as Azure AI Foundry.
- Configuration:
- Name:
msfoundry-ais-eastus2-demo-agenticrag(or similar). - Region: East US 2 (recommended for model availability).
- Project Name: Leave as default (e.g.,
proj-ais-demo...).
- Name:
- Click Create.
Step 2: Create and Configure the Agent
- Once deployed, click Go to Foundry portal.
- In the Foundry portal, verify you are in the “New Foundry” experience.
- Go to the Build tab and click Create Agent.
- Agent Details:
- System Prompting:
-
In the instructions pane, ask the AI to generate a restrictive prompt: “Create a system prompt that will encourage our AI agent to only pull from an AI search knowledge base with the ebook data that we upload.”
-
Copy the generated prompt and paste it into the Instructions field.
-
Save the agent.
-
Step 3: Set Up Data Storage
- Return to the Azure Portal (Resource Group).
- Create a Storage Account.
- Performance: Standard.
- Redundancy: LRS (Locally-redundant storage) is sufficient for demos.
- Once created, go to the Storage Account resource.
- Navigate to Data storage → Containers.
- Create a new container named
e-book-container. - Upload Data: Upload your PDF documents (e.g., Boundaries by Cloud/Townsend, The E-Myth Revisited by Gerber).
Step 4: Set Up Azure AI Search
- In the Azure Portal, create an Azure AI Search resource.
- Configuration:
- Name:
aisearch-ais... - Pricing Tier: Basic (Required for semantic ranking and storage limits; costs ~$75/mo).
- Name:
- Click Create.
Step 5: Index the Data
- Go to your Azure AI Search resource.
- Click Import Data.
- Data Source: Choose Azure Blob Storage.
- Select the storage account and container created in Step 3.
- Vectorization (RAG):
- Kind: Azure AI Foundry (Preview).
- Project: Select the project created in Step 1.
- Model: Select
text-embedding-3-small(auto-deployed by Foundry).
- Enrichment:
- Check Enable semantic ranker (improves search relevance).
- Index Configuration: Review fields (
chunk_id,parent_id,vector,title). - Indexer: Name it
e-book-agenticrag-indexerand click Create. - Wait for the indexer status to change to “Success”.
Step 6: Connect Knowledge to Agent
- Return to the Microsoft Foundry Portal.
- Select your
e-book-agent. - Go to the Knowledge section (or “Tools”).
- Click Add → Azure AI Search.
- Connect Resource:
- Select the Azure AI Search resource created in Step 4.
- Select the Index created in Step 5 (
e-book-agenticrag).
- Click Add.
Step 7: Test the Agent
You can now test the agent in the “Playground” or chat window within Foundry. Example Query:
“What is the definition of a boundary according to John Townsend and Henry Cloud?”
Expected Result: The agent should provide an answer derived only from the uploaded PDF and cite the specific document as a reference.
Step 8: Integration (Optional)
- Code: Use the “View Code” button to get Python, JavaScript, or C# snippets to run the agent in your own application.
- Publish: Use the “Publish” button to deploy the agent to Microsoft Teams or Copilot.
Related Concepts
- Agentic RAG AI Agent — Wikipedia
- Retrieval-Augmented Generation — Wikipedia
- Azure Innovation Station — Wikipedia
Related Entities
- Azure Portal — Wikipedia
- Microsoft Foundry Resource — Wikipedia