A comprehensive GenAIOps (Generative AI Operations) platform built on Azure AI Foundry, providing end-to-end LLM lifecycle management with industry best practices.
- π LLM Training: Fine-tuning and custom model training with Azure OpenAI
- π§± LLM Application Development: Build production-ready AI applications
- π©Έ LLM RAG: Retrieval-Augmented Generation with Azure AI Search
- π© LLM Inference: High-performance model serving and completions
- π§ LLM Serving: Scalable model deployment and endpoint management
- π€ LLM Data Extraction: Document processing with Azure Document Intelligence
- π LLM Data Generation: Synthetic data creation for training and testing
- π LLM Agents: AI agent frameworks and multi-step workflows
- βοΈ LLM Evaluation: Comprehensive model testing and quality assessment
- π LLM Monitoring: Real-time observability and performance tracking
- π LLM Prompts: Advanced prompt engineering and management
- π LLM Structured Outputs: JSON, XML, and schema-based generation
- π LLM Safety and Security: Content filtering and jailbreak protection
- π LLM Embedding Models: Vector search and semantic similarity
- Seamless integration with Azure AI Foundry projects
- Native support for Azure OpenAI Service
- Azure AI Search for vector and hybrid search
- Azure Document Intelligence for data extraction
- Azure Monitor for comprehensive observability
- Azure Key Vault for secure credential management
src/
βββ common/ # Azure AI Foundry client and shared utilities
βββ llm_training/ # π Model training and fine-tuning
βββ app_development/ # π§± Application development frameworks
βββ rag/ # π©Έ Retrieval-Augmented Generation
βββ inference/ # π© Model inference and completions
βββ serving/ # π§ Model serving and deployment
βββ data_extraction/ # π€ Document processing and data extraction
βββ data_generation/ # π Synthetic data generation
βββ agents/ # π AI agents and workflows
βββ evaluation/ # βοΈ Model evaluation and testing
βββ monitoring/ # π Observability and monitoring
βββ prompts/ # π
Prompt engineering and management
βββ structured_outputs/ # π Structured output generation
βββ safety_security/ # π Safety filtering and security
βββ embeddings/ # π Embedding generation and vector ops
βββ app.py # FastAPI application with all endpoints
The fastest way to get started is using our automated Azure deployment:
Click the "Deploy to Azure" button above for a guided deployment experience, or use the command line:
# Clone the repository
git clone https://github.com/korkridake/AzureGenAIOps.git
cd AzureGenAIOps
# Run automated deployment (creates all Azure resources)
./infrastructure/scripts/deploy-new.sh# Deploy using your existing Azure AI services
./infrastructure/scripts/deploy-existing.shThe deployment scripts will:
- β Create/configure all required Azure resources
- β Set up monitoring and security
- β Deploy the GenAIOps application
- β Generate environment configuration files
- β Provide testing endpoints
- Azure CLI 2.50.0+
- Azure subscription with Contributor access
- 10-15 minutes for complete deployment
- Python 3.9+
- Azure CLI
- Azure AI Foundry project
- Azure OpenAI Service
- Docker (optional)
We provide comprehensive infrastructure-as-code using Azure Bicep:
Creates a complete GenAIOps platform with:
- Azure AI Foundry Project
- Azure OpenAI Service (GPT-4, GPT-3.5-Turbo, embeddings)
- Azure AI Search (vector + semantic search)
- Azure Storage (documents, models, data)
- Azure Container Apps (application hosting)
- Azure Monitor (observability)
- Azure Key Vault (secure configuration)
# Interactive deployment
./infrastructure/scripts/deploy-new.sh
# Or with parameters
./infrastructure/scripts/deploy-new.sh \
--resource-group "my-genaiops-rg" \
--location "East US" \
--environment "dev"Uses your existing Azure AI services and adds minimal new infrastructure:
# Interactive deployment
./infrastructure/scripts/deploy-existing.sh
# Or with parameters
./infrastructure/scripts/deploy-existing.sh \
--ai-foundry "my-ai-foundry" \
--openai "my-openai" \
--search "my-search" \
--storage "mystorage"# Deploy new infrastructure
.\infrastructure\scripts\deploy.ps1 -DeploymentType new
# Deploy with existing resources
.\infrastructure\scripts\deploy.ps1 -DeploymentType existingDeploy via GitHub Actions with automated CI/CD:
- Set up Azure service principal secrets
- Use workflow dispatch to deploy infrastructure
- Supports dev/staging/prod environments
- Includes validation and security scanning
See Infrastructure README for detailed documentation.
If you prefer manual setup:
-
Clone the repository:
git clone https://github.com/korkridake/AzureGenAIOps.git cd AzureGenAIOps -
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt pip install -e . -
Set up environment variables:
cp .env.example .env # Edit .env with your Azure AI Foundry configuration
After deployment, you'll have:
.env.deployedor.env.existing- Copy to.envdeployment-outputs-*.json- Resource details- Azure resources ready for immediate use
AZURE_AI_PROJECT_NAME=your-ai-foundry-project
AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/
AZURE_SEARCH_ENDPOINT=https://your-search.search.windows.net
AZURE_STORAGE_ACCOUNT_NAME=your-storage-account
AZURE_KEY_VAULT_NAME=your-key-vault# Start the comprehensive LLM operations API
uvicorn src.app:app --host 0.0.0.0 --port 8000
# Or use the make command
make run# Chat completion
curl -X POST "http://localhost:8000/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Explain machine learning"}
],
"max_tokens": 1000,
"temperature": 0.7
}'
# Text completion
curl -X POST "http://localhost:8000/completions" \
-H "Content-Type: application/json" \
-d '{
"prompt": "The future of AI is",
"max_tokens": 500
}'# RAG query with document retrieval
curl -X POST "http://localhost:8000/rag/query" \
-H "Content-Type: application/json" \
-d '{
"question": "What are the benefits of using Azure AI?",
"top_k": 5,
"score_threshold": 0.7
}'# Generate embeddings
curl -X POST "http://localhost:8000/embeddings" \
-H "Content-Type: application/json" \
-d '{
"texts": ["Hello world", "Azure AI is powerful"]
}'# Content safety check
curl -X POST "http://localhost:8000/safety/check" \
-H "Content-Type: application/json" \
-d '{
"text": "How to build a machine learning model?",
"check_type": "both"
}'# Get system metrics
curl "http://localhost:8000/metrics"
# Health check
curl "http://localhost:8000/health"from src.common import AzureFoundryClient, LLMConfig
from src.inference import InferenceEngine
from src.rag import RAGPipeline
from src.embeddings import EmbeddingGenerator
# Initialize components
config = LLMConfig()
foundry_client = AzureFoundryClient()
inference_engine = InferenceEngine(config)
rag_pipeline = RAGPipeline(config)
# Generate chat completion
response = inference_engine.chat_completion([
{"role": "user", "content": "Explain quantum computing"}
])
# Perform RAG query
rag_response = rag_pipeline.query(
question="What is Azure AI Foundry?",
top_k=3
)
# Generate embeddings
embeddings = EmbeddingGenerator(config)
vectors = embeddings.generate_embeddings_batch([
"Text to embed",
"Another text sample"
])# Run comprehensive test suite
make test
# Run with coverage
make test-coverage
# Lint and format code
make lint
make format
# Security scanning
make security-scan
# Type checking
make type-checkThe project includes GitHub Actions workflows for:
- Testing: Unit tests, integration tests, safety checks
- Building: Docker images with multi-stage builds
- Security: Bandit security scanning, dependency checks
- Deployment: Azure Container Instances, Azure Container Apps
- Quality: Code coverage, type checking, linting
- Model Training: Automated fine-tuning workflows
- Model Evaluation: Performance testing and validation
- RAG Indexing: Automated document processing and indexing
- Safety Testing: Content filtering and jailbreak testing
- Monitoring: Model performance and drift detection
Key configuration in .env:
# Azure AI Foundry
AZURE_AI_PROJECT_NAME=your-ai-foundry-project
AZURE_SUBSCRIPTION_ID=your-subscription-id
AZURE_RESOURCE_GROUP=your-resource-group
# Azure OpenAI
AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4
# Azure AI Search (RAG)
AZURE_SEARCH_ENDPOINT=https://your-search.search.windows.net
AZURE_SEARCH_API_KEY=your-search-key
# Safety & Security
CONTENT_FILTER_ENABLED=true
PII_DETECTION_ENABLED=true
JAILBREAK_DETECTION_ENABLED=true- Azure Monitor: Application insights and custom metrics
- OpenTelemetry: Distributed tracing and performance monitoring
- Custom Dashboards: Model performance, usage analytics, safety metrics
- Alerting: Automated alerts for model drift, performance issues, safety violations
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-llm-feature) - Commit your changes (
git commit -m 'Add amazing LLM feature') - Push to the branch (
git push origin feature/amazing-llm-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Azure AI Foundry for the comprehensive AI platform
- Azure OpenAI Service for GPT model access
- LangChain for AI application development frameworks
- FastAPI for the high-performance API framework
For support, please open an issue on GitHub or contact the maintainers.
Built with β€οΈ for Comprehensive LLM Operations on Azure AI Foundry