Why Azure?
Azure provides enterprise-grade features for GraphRAG deployments:- Managed OpenAI - No API key rotation, enterprise SLAs
- Scalable storage - Blob Storage and Cosmos DB integration
- Security - Managed identities, VNet integration, private endpoints
- Compliance - Meet regulatory requirements with Azure’s certifications
- Cost management - Detailed billing and budget controls
Prerequisites
1
Azure subscription
Ensure you have an active Azure subscription with appropriate permissions.
2
Azure CLI
Install the Azure CLI:
3
Login to Azure
Authenticate with your Azure account:
Set up Azure OpenAI
1
Create Azure OpenAI resource
Create an Azure OpenAI service instance:
2
Deploy models
Deploy the required models (chat and embeddings):
3
Retrieve endpoint and key
Get your Azure OpenAI endpoint and API key:
Configure Azure Storage
1
Create storage account
Create an Azure Storage account for your data:
2
Create containers
Create containers for input and output data:
Configure GraphRAG for Azure
1
Update environment variables
Create or update your
.env file:.env
2
Configure settings.yaml
Update
settings.yaml with Azure-specific configuration:settings.yaml
Using managed identity (recommended)
For production deployments, use Azure Managed Identity instead of API keys:1
Create managed identity
Create a user-assigned managed identity:
2
Grant permissions
Assign the managed identity to Azure OpenAI:
3
Update configuration
Modify
settings.yaml to use managed identity:4
Authenticate Azure CLI
Login with the managed identity:
Deploy to Azure Container Instances
Run GraphRAG in Azure Container Instances for scheduled indexing:1
Create Dockerfile
Dockerfile
2
Build and push image
Build and push to Azure Container Registry:
3
Deploy to ACI
Create a container instance:
Optional: Azure Cosmos DB storage
For enhanced scalability, use Azure Cosmos DB:1
Create Cosmos DB account
2
Configure in settings.yaml
Cost optimization
- Model selection
- Rate limiting
- Storage tiers
- Provisioned throughput
Choose cost-effective models:
- Use
gpt-3.5-turboinstead ofgpt-4for initial testing - Use
text-embedding-3-smallinstead oftext-embedding-3-large
Monitoring and logging
1
Enable diagnostics
Enable diagnostic logging for Azure OpenAI:
2
Set up alerts
Create alerts for cost and performance:
Security best practices
Use managed identities
Avoid storing credentials, use Azure Managed Identity
Private endpoints
Configure private endpoints for Azure services
Network security
Implement VNet integration and firewall rules
Key rotation
Automate API key rotation using Key Vault
Next steps
Multi-lingual support
Deploy GraphRAG for multiple languages
Enterprise knowledge
Enterprise deployment patterns
Configuration reference
Complete configuration guide
Azure documentation
Azure OpenAI documentation