Azure AI Search Setup Guide
This guide walks you through creating an Azure AI Search service that will store and index your documents for the RAG retriever.
Prerequisites
- An Azure account with an active subscription
- Contributor or Owner access to a resource group
- Recommended: Same region as your Azure OpenAI deployment
Part A: Create Azure AI Search Service
Azure AI Search is created through the Azure Portal (not Foundry).
1. Navigate to Azure Portal
- Go to portal.azure.com
- Sign in with your Azure account
2. Create the Resource
- Click "+ Create a resource" in the top-left
- Search for "Azure AI Search"
- Click "Create"
3. Configure Basic Settings
Project Details:
| Setting | Recommendation |
|---|---|
| Subscription | Your Azure subscription |
| Resource group | Same as your Foundry/OpenAI resource |
Instance Details:
| Setting | Recommendation |
|---|---|
| Service name | Unique name (e.g., mycompany-rag-search) |
| Location | Same region as Azure OpenAI |
Note: The service name must be globally unique and becomes part of your endpoint URL. Only lowercase letters, numbers, and hyphens are allowed.
4. Select Pricing Tier
Choose based on your needs:
| Tier | Cost | Storage | Best For |
|---|---|---|---|
| Free | $0 | 50 MB | Testing only (no semantic ranker) |
| Basic | ~$75/month | 2 GB | Small businesses, POCs |
| Standard S1 | ~$250/month | 25 GB | Production workloads |
Important: Basic tier or higher is required for semantic ranker, which significantly improves RAG search quality.
- Click "Change pricing tier"
- Select Basic or Standard
- Click "Select"
5. Review and Create
- Click "Review + create"
- Review your configuration
- Click "Create"
- Wait for deployment (2-5 minutes)
6. Go to Resource
Click "Go to resource" when deployment completes.
Part B: Get Your Endpoint and API Key
1. Get the Search Endpoint URL
- On the Overview page, locate the "Url" field
- Copy the full URL:
https://mycompany-search.search.windows.net
2. Get the Admin API Key
- Click "Keys" in the left menu (under Settings)
- You'll see:
- Admin keys - Full access (use this)
- Query keys - Read-only access
- Copy Primary admin key or Secondary admin key
Tip: Both admin keys work identically. Having two allows key rotation without downtime.
Part C: Enable Semantic Ranker (Recommended)
Semantic ranker improves search relevance by understanding query intent.
Note: On Basic tier and above, semantic ranker may be enabled by default.
Check/Enable Semantic Ranker
- In Azure Portal, go to your Azure AI Search resource
- Look in the left menu under Settings for:
- "Semantic ranker" or "Semantic search"
- If found, select a plan:
- Free: 1,000 queries/month
- Standard: Pay-per-query
- Click "Save"
Info: If you don't see this option, it may already be enabled or the portal UI has changed. The RAG wizard configures semantic search at the index level.
Summary: Information for the Wizard
| Field | Example |
|---|---|
| Display Name | My Azure Search |
| Search Endpoint URL | https://mycompany-search.search.windows.net |
| Admin API Key | (32+ character key) |
Troubleshooting
"Service name already taken"
- Azure AI Search names must be globally unique
- Try adding your company name or date:
acme-rag-search-2024
"Semantic ranker not available"
- Upgrade from Free tier to Basic or Standard
- Check that your region supports semantic ranker
"Connection test failed" in wizard
- Verify endpoint URL includes
https://prefix - Ensure you're using an admin key, not a query key
- Check for trailing spaces in copied values
- Verify the service status is "Running" in Azure Portal
Keys not showing
- Ensure you have Reader role or higher on the resource
- Keys are hidden for users with limited permissions
Pricing Reference
| Tier | Monthly Cost | Storage | Partitions | Replicas |
|---|---|---|---|---|
| Free | $0 | 50 MB | 1 | 1 |
| Basic | ~$75 | 2 GB | 1 | 3 max |
| Standard S1 | ~$250 | 25 GB/partition | 12 max | 12 max |
| Standard S2 | ~$1,000 | 100 GB/partition | 12 max | 12 max |
Note: Prices are approximate and vary by region. Check Azure Pricing Calculator for current rates.