NashTech Blog

Azure OpenAI Service Models Part 1 – Language Models

Table of Contents

These models are trained using machine learning and vast amounts of data so they can perform tasks like:

🗣️ Writing and understanding language (e.g. GPT-4)

💬 Having conversations (like ChatGPT)

🖼️ Creating images from text (like DALL·E)

🔊 Turning speech into text (like Whisper)

The Azure OpenAI Service is a cloud-based offering from Microsoft Azure that gives developers access to OpenAI’s powerful language models — like GPT-4, GPT-3.5, DALL·E, and Whisper — through secure, scalable APIs.

It brings the capabilities of OpenAI’s models (the ones behind ChatGPT, Copilot, etc.) into the enterprise-grade environment of Microsoft Azure.

Architecture Overview (Simple Flow)

Based on model functionality, we can group models as follows:

Language Models (Text Understanding & Generation)

These are the core models for natural language processing — great for chatbots, summarization, reasoning, Q&A, content creation, etc.

Some example models:

GPT-4 Series
  • gpt-4
  • gpt-4-32k
  • gpt-4-0125-preview
  • gpt-4-turbo-2024-04-09 (supports vision too)
  • gpt-4-vision-preview
GPT-3.5 Turbo Series
  • gpt-35-turbo
  • gpt-35-turbo-16k

Reasoning & Problem-Solving Models

Focused on tasks like complex logic, math, code reasoning, and structured decision-making.

Some example models:

o-Series Models
  • o3-mini
  • o1
  • o1-mini
  • o1-preview

Multimodal Models (Text + Image + Audio)

Models that can process multiple input types (like images and audio alongside text).

Some example models:

GPT-4o Series (Omni Models)
  • gpt-4o (text, vision, and audio)
  • gpt-4o-mini
  • gpt-4o-audio-preview
  • gpt-4o-realtime-preview
  • gpt-4o-mini-audio-preview
  • gpt-4o-mini-realtime-preview

Image Generation Models

Designed to generate images based on text prompts.

Some example models:

DALL·E Series
  • dall-e-3
  • dall-e-2

Speech Recognition Models

For transcribing speech into text (speech-to-text tasks).

Some example models:

Whisper Model
  • whisper

Example 1

Well, let’s go through an example first. We will send the same prompt to GPT-4 Turbo and GPT-3.5 Turbo using the Azure OpenAI Python SDK — so you can compare their outputs in real time.

Setup

Make sure you’ve installed the Azure OpenAI package

pip install openai

Example Python Code

import openai

# Azure OpenAI configuration
openai.api_type = "azure"
openai.api_base = "https://<your-resource-name>.openai.azure.com/"
openai.api_version = "2025-03-01-preview"
openai.api_key = "<your-api-key>"

# Sample user prompt
prompt = "Explain quantum computing in simple terms a 10-year-old could understand."

# Request to GPT-4 Turbo
response_gpt4 = openai.ChatCompletion.create(
    engine="gpt-4-turbo",  # your GPT-4 deployment name
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": prompt}
    ],
    temperature=0.7,
    max_tokens=200
)

# Request to GPT-3.5 Turbo
response_gpt35 = openai.ChatCompletion.create(
    engine="gpt-35-turbo",  # your GPT-3.5 deployment name
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": prompt}
    ],
    temperature=0.7,
    max_tokens=200
)

# Print the results
print("GPT-4 Turbo Response:")
print(response_gpt4['choices'][0]['message']['content'])
print("\n---\n")
print("GPT-3.5 Turbo Response:")
print(response_gpt35['choices'][0]['message']['content'])

Compare simulated result

GPT-4 TurboGPT-3.5 Turbo
ResponseImagine your computer is like a superhero solving puzzles. Normal computers use tiny light switches called bits that are either ON (1) or OFF (0). But quantum computers use super special switches called qubits that can be ON, OFF, or both at the same time!
This lets them try lots of answers all at once, kind of like if you could take every turn in a maze at the same time and instantly find the best path. It’s like magic math that helps solve super tricky problems faster!
Quantum computers are special kinds of computers that don’t just use 1s and 0s like regular ones. They use something called “qubits” that can be both 1 and 0 at the same time.
This makes them very powerful for solving big problems, like cracking codes or helping scientists do research.
Highlights– Uses analogies (maze, superhero)
– Engaging and imaginative
– Easy for a child to follow
– Accurate but less playful
– Straightforward explanation
– Lacks storytelling or deeper metaphor

Now let’s go to another example with a coding-related input

Example 2

Prompt

Write a Python function that takes a list of numbers and returns the second largest number. Explain your code

Simulated Output

GPT-4 Turbo Response

def second_largest(numbers):
    unique_numbers = list(set(numbers))  # Remove duplicates
    if len(unique_numbers) < 2:
        return None  # Not enough distinct numbers
    unique_numbers.sort(reverse=True)
    return unique_numbers[1]

GPT-3.5 Turbo Response

def second_largest(numbers):
    numbers.sort()
    return numbers[-2]

Let’s compare!

GPT-4 TurboGPT-3.5 Turbo
ExplanationThis function first removes duplicates using set(), then checks if there are at least two unique numbers. It sorts the list in descending order and returns the second item. If there aren’t enough unique values, it returns NoneThis function sorts the list and returns the second last element, which is the second largest.
Strengths/Weaknesses– Handles duplicates
– Includes edge-case handling
– Clear, concise explanation
– Doesn’t handle duplicates correctly
– Doesn’t check for list length or uniqueness
– Short explanation, no edge-case coverage

Summary Comparison

FeatureGPT-4 TurboGPT-3.5 Turbo
CreativityHigh (fun analogies)Basic
Explanation Depth– Strong, layered
– Thorough and thoughtful
– Simple and brief
– Lless helpful
ReadabilityDesigned for young audienceStill a bit technical
Cost & SpeedSlower and costlierFast and affordable
CorrectnessHigh (handles edge cases)Prone to error
Code QualityRobust, reusableSimplified, fragile
FeatureGPT-4 SeriesGPT-3.5 Turbo Series
Modelsgpt-4, gpt-4-32k, gpt-4-turbogpt-35-turbo, gpt-35-turbo-16k
Reasoning PowerVery high (handles logic, nuance, ambiguity)Moderate (sometimes makes simple mistakes)
SpeedSlower than 3.5Very fast and efficient
CostHigherCheaper
Context LengthUp to 128k tokens (turbo)Up to 16k tokens
Training CutoffDecember 2023 (turbo version)October 2023
Function CallingSupported (with tool use + JSON mode)Supported (with tool use + JSON mode)
Use CasesAdvanced assistants, analysis, content creationChatbots, summarization, lighter tasks
Use CaseRecommended Model
Deep reasoning, long documentsGPT-4 Turbo
Fast & budget-friendly appsGPT-3.5 Turbo
Educational content or creativityGPT-4
Simple chat or summarizationGPT-3.5

Picture of mydinhletra1

mydinhletra1

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top