Last updated on July 1, 2025
Azure OpenAI Cheat Sheet
- Azure OpenAI offers access to OpenAI’s powerful models (e.g., GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo, DALL-E, Whisper) with robust security and compliance for enterprises.
- Hosted on Microsoft Azure, allows for seamless integration with various Azure services and tools.
Key Concepts
- Model Deployment: You must deploy a model (e.g., gpt-4, gpt-35-turbo) to your Azure resource before using it.
- Quota Types:
- Dynamic Quota: Shared pool for flexible consumption.
- Provisioned Throughput Units (PTUs): Dedicated capacity for predictable performance.
- Content Filtering: Built-in safety system to detect and block harmful content.
- Prompt Engineering: Crafting effective prompts to guide model behavior.
Supported Models
- GPT-4o: Multimodal (text, vision, audio), fast and cost-effective.
- GPT-4 Turbo: Optimized for performance and cost.
- GPT-3.5-Turbo: Lightweight, fast, and ideal for chatbots.
- DALL-E: Image generation from text prompts.
- Whisper: Speech-to-text transcription.
- Embeddings: For semantic search and similarity tasks.
Core Use Cases
- Chatbots & Virtual Agents
- Document Summarization
- Code Generation & Review
- Image Generation
- Speech Transcription
- Search & Knowledge Mining
- Custom Assistants
Prompt Engineering Techniques
- Priming – Provide contextual background or input-output examples prior to the main prompt to guide the model’s behavior.
- Chain of Thought – Prompt the model to reason step by step, which can improve problem-solving and explainability.
- Zero-shot Prompting – Rely on the model’s general knowledge by giving a clear and well-formed prompt without providing examples.
- Few-shot Prompting – Present a small set of example interactions to establish a pattern the model can follow.
- System Instructions – Define the assistant’s tone, behavior, and role using system-level directives (e.g., “You are a technical assistant who answers concisely.”).
- Refinement Through Iteration – Experiment with parameters like temperature and
max_tokens
settings. - Avoiding Ambiguity – Make your prompts specific and unambiguous to reduce variability and improve consistency.
API Essentials
- Deployment endpoint format:
https://{endpoint}/openai/deployments/{deployment-id}/completions?api-version=2024-10-21
- Authentication: Use Microsoft Entra ID or API keys.
- Rate Limits: Governed by quota type and model.
Deployment Process in Azure OpenAI
- Set up your Azure OpenAI resource.
- Select and deploy the desired model.
- Retrieve your API endpoint and key.-
- Endpoint: The URL to call the model.
- Deployment Name: The name assigned when you deployed the model (used in API requests).
- API Key: Obtain from the Azure portal or use Microsoft Entra ID for authentication.
- Access the model using SDKs or REST calls.
Supported SDKs & Libraries
- Supported SDKs: Python, JavaScript, C#, Java
- Libraries:
Responsible AI Guidelines
- Fairness: Minimize and prevent bias.
- Reliability & Safety: Aim for consistent and dependable responses.
- Privacy & Security: Safeguard data and user privacy.
- Inclusiveness: Ensure accessibility for diverse users.
- Transparency: Clear about how AI works.
- Accountability: Promote human oversight and governance.
Validate Your Knowledge
Question 1
Question Type: Single choice
You are developing a web-based AI assistant for internal customer support using the Azure OpenAI model.
You have deployed the model in a resource named td-openai-prod
and are using the Azure OpenAI SDK in the backend.
You need to configure the SDK to authenticate and correctly send requests to the deployed model instance.
Which set of values must be included to successfully establish this connection through the Azure OpenAI SDK?
- deployment name, API key, and endpoint
- endpoint, region, and model ID
- deployment name, model type, and authentication token
- model name, model version, and key
For more Azure practice exam questions with detailed explanations, check out the Tutorials Dojo Portal:
Azure OpenAI Cheat Sheet Resources:
https://learn.microsoft.com/en-us/azure/ai-services/openai/
https://azure.microsoft.com/en-us/products/ai-services/openai-service
https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/assistant