# Role Deep Dive: Azure AI Engineer

---

## Role Overview

Azure AI Engineers build AI-powered solutions using Azure AI Services (Cognitive Services), Azure OpenAI, and Azure AI Search. They integrate pre-built AI capabilities into applications, build custom models, and implement generative AI solutions. They focus on applied AI — making AI work in production.

**Alternative Titles:** AI Engineer, Applied AI Engineer, Cognitive Services Engineer, GenAI Engineer

**Typical Salary Range:** $110,000 – $180,000 (US)

---

## Core Responsibilities

### 1. Azure OpenAI Solutions (30% of role)
- Implement GPT-4o / GPT-4 integration in applications
- Build RAG (Retrieval-Augmented Generation) solutions
- Implement prompt engineering and optimization
- Deploy and configure Azure OpenAI instances
- Implement content safety and filtering

**Granular Tasks:**
- **Azure OpenAI Setup:**
  - Create Azure OpenAI resource
  - Deploy model: GPT-4o (general), GPT-4 (complex reasoning), GPT-3.5-turbo (fast/cheap), DALL-E 3 (image generation), text-embedding-ada-002 (embeddings)
  - Configure content filters: hate, sexual, violence, self-harm (default medium). Adjust per use case.
  - Private Endpoint for secure access
  - RBAC: Cognitive Services OpenAI User, Cognitive Services OpenAI Contributor

- **RAG Architecture:**
  ```
  User Query → Embed query (text-embedding-ada-002)
            → Search AI Search index (vector + semantic search)
            → Retrieve top-k relevant documents
            → Construct prompt: system instructions + retrieved context + user query
            → Call GPT-4o with prompt
            → Return grounded response with citations
  ```
  - AI Search index: chunk documents (512-1024 tokens), embed chunks, store with metadata
  - Hybrid search: vector search (semantic similarity) + keyword search (exact match)
  - Semantic ranking: AI Search re-ranks results by relevance
  - Citation: return source document + chunk reference with each response

- **Prompt Engineering:**
  - System prompt: define role, behavior, constraints, output format
  - Few-shot: provide examples in prompt
  - Chain-of-thought: ask model to reason step by step
  - Temperature: 0 (deterministic) for factual, 0.7 (creative) for generation
  - Max tokens: control response length
  - Grounding: always provide relevant context (RAG) to reduce hallucinations

- **Assistants API:**
  - Create assistant with instructions and tools
  - Tools: code interpreter (run Python), file search (RAG built-in), function calling (call your APIs)
  - Thread management: maintain conversation context
  - File uploads: add documents for code interpreter and file search

- **Content Safety:**
  - Built-in content filters (hate, sexual, violence, self-harm)
  - Custom blocklists: block specific terms or patterns
  - Prompt shields: detect and block prompt injection attempts
  - Groundedness detection: flag ungrounded responses
  - Protected material detection: flag copyrighted content

### 2. Azure AI Services (Cognitive Services) (25% of role)
- Implement Vision solutions (Computer Vision, Custom Vision, Face)
- Implement Speech solutions (Speech-to-Text, Text-to-Speech, Translation)
- Implement Language solutions (Language Service, Translator, Document Intelligence)
- Implement Decision solutions (Content Safety, Personalizer)
- Configure multi-service resource vs single-service resources

**Granular Tasks:**
- **Vision:**
  - Computer Vision: analyze images (tags, objects, faces, description), OCR (read text), spatial analysis
  - Custom Vision: train custom image classifier or object detector with your labeled images
  - Face: detect faces, verify identity, find similar faces, group faces

- **Speech:**
  - Speech-to-Text: real-time transcription, custom models for domain vocabulary
  - Text-to-Speech: neural voices (prebuilt + custom neural voice)
  - Speech Translation: real-time speech-to-speech translation
  - Speaker Recognition: identify speakers by voice

- **Language:**
  - Language Service: sentiment analysis, NER, key phrase extraction, PII detection, text summarization, entity linking, language detection
  - Custom NER: extract custom entity types from text
  - Custom text classification: classify documents into custom categories
  - Conversational Language Understanding (CLU): build intent/entity models for chatbots
  - Translator: translate text across 100+ languages, custom translation for domain terms
  - Document Intelligence: extract structure from forms, invoices, receipts, IDs, business cards

- **Multi-Service Resource:**
  - One resource for multiple AI services (cost management, single endpoint/key)
  - Use when: multiple AI services needed, same billing
  - Single-service: when you need specific pricing tier or region

### 3. Azure AI Search (Cognitive Search) (20% of role)
- Design and implement search indexes
- Configure indexers for automated data ingestion
- Implement AI enrichment with skillsets
- Build vector search and semantic search
- Optimize search relevance

**Granular Tasks:**
- **Index Design:**
  - Fields: define searchable, filterable, sortable, facetable, retrievable per field
  - Analyzer: choose language analyzer (English, etc.) or custom analyzer
  - Suggesters: configure autocomplete/suggestions
  - Scoring profiles: boost results by recency, location, or custom weight

- **Indexer Configuration:**
  - Data source: Blob, SQL, Cosmos DB, SharePoint
  - Schedule: run every hour/day or on-demand
  - Change detection: track changes via watermark column or blob modification time
  - Field mappings: map source fields to index fields

- **AI Enrichment (Skillset):**
  - Built-in skills: OCR, entity recognition, key phrase extraction, language detection, text translation, image analysis, custom classification
  - Custom skills: call your own API (Azure Function) for custom processing
  - Knowledge Store: save enriched documents to Storage/Tables for downstream use

- **Vector Search:**
  - Generate embeddings (text-embedding-ada-002 or open-source models)
  - Configure vector field in index
  - Vector search: find semantically similar documents
  - Hybrid: combine vector + keyword search for best results

- **Semantic Search:**
  - Enable semantic ranker (Standard tier+)
  - Re-ranks top results by semantic relevance
  - Returns semantic captions and answers
  - Significantly improves search quality

### 4. Bot Development (10% of role)
- Build chatbots with Azure Bot Service
- Implement conversational flows
- Integrate with channels (Teams, Web, Slack, etc.)
- Connect to AI services for intelligence

**Granular Tasks:**
- Bot Framework SDK: build bot in C#/Python/Node.js
- Bot Service: host bot, configure channels (Teams, Web Chat, Slack, Facebook, etc.)
- Conversational flow: dialogs, waterfalls, prompts
- Connect to CLU (Language Understanding) for intent recognition
- Connect to Azure OpenAI for generative responses
- Copilot Studio: low-code bot builder (formerly Power Virtual Agents)

### 5. AI Solution Architecture (15% of role)
- Design end-to-end AI solution architecture
- Choose appropriate AI services for use cases
- Implement responsible AI practices
- Optimize for performance and cost
- Handle scale and latency requirements

**Granular Tasks:**
- Architecture decision: pre-built API (fast, less control) vs custom model (slow, more control)
- Latency optimization: cache responses, use smaller models for real-time, batch for offline
- Cost optimization: choose right pricing tier, throttle API calls, cache embeddings
- Responsible AI: assess fairness, reliability, privacy, transparency, accountability
- Multi-region: deploy AI services in nearest region for low latency

---

## AI Solution Architecture Patterns

### Pattern 1: Document Intelligence Pipeline
```
Documents (PDF/images) → Document Intelligence (extract structure)
                       → AI Search (index + search)
                       → Azure OpenAI (summarize, Q&A over documents)
                       → Web App (user interface)
```

### Pattern 2: Conversational AI
```
User → Bot Service → CLU (intent/entity recognition)
                   → Azure OpenAI (generative response)
                   → AI Search (knowledge base lookup)
                   → Custom APIs (action execution)
                   → User
```

### Pattern 3: Real-time Vision Pipeline
```
Camera/IoT → Event Hubs → Functions → Computer Vision API
                                            → Cosmos DB (store results)
                                            → Alerts (anomaly detection)
```

### Pattern 4: Enterprise RAG
```
Internal Documents → AI Search Indexer (chunk + embed) → AI Search Index
User Query → Frontend → API → Embed query → AI Search (vector + semantic)
                                           → Azure OpenAI (generate response)
                                           → Frontend (display with citations)
```

---

## Certification Path

| Certification | Level | Focus |
|---|---|---|
| **AI-900** | Foundational | AI fundamentals |
| **AI-102** | Associate | **Core cert** — Azure AI Engineer |
| **DP-100** | Associate | Data Scientist (complement for ML) |

### AI-102 Exam Breakdown
| Domain | Weight |
|---|---|
| Plan and manage an Azure AI solution | 5-10% |
| Implement decision support solutions | 15-20% |
| Implement computer vision solutions | 15-20% |
| Implement natural language processing solutions | 20-25% |
| Implement knowledge mining and document intelligence solutions | 15-20% |
| Implement generative AI solutions | 15-20% |

---

## Interview Focus Areas

1. **How do you build a RAG solution on Azure?**
   → Chunk documents → embed with text-embedding-ada-002 → store in AI Search index (vector field). On query: embed query → vector search → retrieve context → send to GPT-4o with system prompt + context → return grounded response with citations.

2. **How do you prevent hallucinations in LLM responses?**
   → RAG (ground responses in retrieved context), prompt engineering (explicit instructions to use only provided context), content safety filters, groundedness detection, citation tracking, lower temperature (0-0.3 for factual).

3. **How do you choose between pre-built AI services and custom models?**
   → Pre-built: fast to implement, no training data needed, good for common tasks (sentiment, OCR, translation). Custom: when pre-built doesn't cover your domain, need higher accuracy, unique classification. Start with pre-built, build custom only if needed.

4. **How do you implement document processing at scale?**
   → Document Intelligence for extraction → AI Search for indexing → AI enrichment skillset for deeper analysis → Azure OpenAI for Q&A. Indexer runs on schedule. Batch processing for large volumes.

5. **How do you secure Azure OpenAI in production?**
   → Private Endpoint (no public access), RBAC (OpenAI User/Contributor), content filters, prompt shields, rate limiting, API management for external consumers, log all requests/responses, monitor for abuse.

6. **What is semantic search vs keyword search vs vector search?**
   → Keyword: exact term match. Vector: semantic similarity via embeddings. Semantic: re-ranks keyword results by meaning. Best: hybrid (keyword + vector) + semantic ranker. Semantic understanding improves relevance significantly.

7. **How do you handle multi-language AI solutions?**
   → Translator API for translation, language-specific analyzers in AI Search, multi-language Document Intelligence models, Azure OpenAI works in 50+ languages, store language preference per user, auto-detect language.

8. **How do you implement responsible AI?**
   → Fairness: test across demographic groups. Reliability: test edge cases, adversarial inputs. Privacy: no PII in prompts, data retention policies. Transparency: document model limitations. Accountability: human review for high-stakes decisions. Content safety filters.
