Skip to main content
Brixus
  1. Courses
  2. Certification Study Guides
  3. AI-901 Azure AI Fundamentals Study Guide & Exam Questions
  4. Read
AI-901 Azure AI Fundamentals Study Guide & Exam Questions
  • 1.Part 1: Responsible AI: Fairness, Safety, Privacy, Inclusiveness, Transparency and Accountability
  • 2.Part 2: Generative AI Models, Model Selection and Deployment Options
    • 1. How Generative AI Models Work: LLMs, Tokens, Embeddings and Transformers
    • 2. Choosing a Foundry Model: Model Catalog, Model Cards, Benchmarks and Model Router
    • 3. Model Deployment Options: Serverless API, Managed Compute, Deployment Types and Parameters
  • 3.Part 3: AI Workloads: Generative AI, Agents, Text, Speech, Vision and Information Extraction
  • 4.Part 4: Generative AI Apps and Agents in Microsoft Foundry
  • 5.Part 5: Text Analysis and Speech Solutions with Foundry Tools
  • 6.Part 6: Computer Vision and Image Generation in Microsoft Foundry
  • 7.Part 7: Information Extraction with Azure Content Understanding

Your progress is not saved. You are trying this lesson as a guest, so your answers and progress are not saved.

2.1 How Generative AI Models Work: LLMs, Tokens, Embeddings and Transformers

Generative AI creates original content based on the input you provide. Its models learn patterns from large training datasets and use those patterns to produce new, statistically similar content. ChatGPT, developed by OpenAI, is an example of a chat application that accepts natural language input.

From input to generated content

  1. Parse the input into a form the model can use.

  2. Use the parsed input to identify relevant patterns learned during training.

  3. Combine those patterns to build the output.

Applications that accept or produce natural language use large language models (LLMs). The LLM performs natural language processing (NLP), which includes classifying the input text and determining its sentiment. The generative AI model uses that analysis to identify patterns for the output. The LLM alone can generate text; for image or audio output, additional models provide patterns and data for the requested format.

Output

What users can request

Example use

Natural language

A profile summary, a product description, or meal ideas

Suggest breakfasts with peppers, such as an egg and pepper scramble or pepper and avocado toast.

Image

Depending on the application and its models, specify subjects, artistic styles, or reference images.

Generate an avatar, design a logo, or explore an artistic idea.

Audio

Depending on the application and its models, synthesize a voice from text, create music in a specified style, or modify an audio file using natural language instructions.

Produce a spoken assistant response, add backing instruments, or reproduce a user's voice from reference recordings.

Code

Depending on the application and its models, specify the language, input and output structure, or technologies described in reference documentation.

Generate sorting or filtering code, translate code between languages, or ask questions about a documented technology.

A request for an elephant eating a burger might produce a playful illustration of a gray elephant reaching left with its trunk to hold a burger, with lettuce and a patty between two buns. The background is white, with no other objects.

A request to show how to code tic-tac-toe in C# might produce the following excerpt. It represents the board with a one-dimensional array and includes a check for whether a mark appears on it; the rest of the game logic is omitted.

using System;

namespace TicTacToe
{
    class Program
    {
        static char[] board = { '1', '2', '3', '4', '5', '6', '7', '8', '9' };
        static int player = 1; // Player 1 will start
        static int choice; // The number the player chooses
        static int flag = 0; // Set the flag value to 0

        // Check if the position is already marked or not
        private static int CheckPosition(char mark)
        {
            for (int i = 0; i < 9; i++)
            {
                if (board[i] == mark)
                {
                    return 1;
                }
            }
            return 0;
        }

        // The rest of the generated code has been omitted for brevity
        // ...
    }
}
1. A generative AI application accepts natural language instructions. How does generating a written description differ from generating an image from those instructions?
  • The LLM generates the description; image generation draws on additional models for patterns and data in that format.
  • The LLM generates the image by itself but needs an image model to generate the description.
  • The requested output format never affects which models contribute.
Show answer and explanation
  • The LLM generates the description; image generation draws on additional models for patterns and data in that format.

The LLM alone can generate the written description. For image output, additional models provide the data and patterns for the image format.

2. Match each natural language request to the kind of output needed to fulfill it.
  • Draft a rich description for an online storefront item.
  • Create a logo in a specified artistic style.
  • Add backing instruments to a song.
  • Translate a sorting implementation into another programming language.
  • Audio
  • Code
  • Image
  • Natural language
Show answer and explanation
  • Draft a rich description for an online storefront item.: Natural language
  • Create a logo in a specified artistic style.: Image
  • Add backing instruments to a song.: Audio
  • Translate a sorting implementation into another programming language.: Code

The requested artifact is written prose.

The requested artifact is a visual design.

The requested artifact is modified audio.

The requested artifact is a new implementation in code.

How LLMs represent text

A tokenizer splits text into tokens. This process, called tokenization, is the first step in training an LLM on text. A token can be a word, a word part, a set of characters, or a combination of words and punctuation. The set of unique tokens the model is trained on is its vocabulary. Each unique token gets an ID, so repeated occurrences of the same token reuse that ID.

With word tokenization, I heard a dog bark loudly at a cat could become the ID sequence [1, 2, 3, 4, 5, 6, 7, 3, 8]. Both occurrences of a reuse ID 3. With the same IDs, I heard a cat becomes [1, 2, 3, 8]. As training continues, new tokens are added to the vocabulary and assigned IDs.

An embedding is a vector of numeric values that represents semantic attributes. The model learns token embeddings from how often tokens appear together or in similar contexts. After training, it can tokenize a longer text and calculate an overall embedding from the learned token embeddings. This supports applications such as semantic document search or adding a vector store to an AI application.

Tokenization methods and trade-offs

  • Word tokenization splits text into words based on a delimiter.

  • Character tokenization splits text into individual characters.

  • Subword tokenization splits text into partial words or character sets. OpenAI's GPT models use a type of subword tokenization called Byte-Pair Encoding (BPE).

Token size

Advantages

Disadvantages

Smaller tokens (character or subword tokenization)

Handle a wider range of inputs, including unknown words, typos, or complex syntax. May reduce vocabulary size and memory needs.

Produce more tokens for the same text, requiring more computation. At a fixed token limit, less text fits in the input and output.

Larger tokens (word tokenization)

Produce fewer tokens for the same text, requiring less computation. At the same token limit, more text fits in the input and output.

May increase vocabulary size and memory needs. Can limit the ability to handle unknown words, typos, or complex syntax.

Try OpenAI's tokenizer visualization tool to see how text is split into tokens.

3. If word tokenization splits a sentence into individual words, repeated occurrences of the same token reuse its ID rather than getting new IDs for each position.
  • True
  • False
Show answer and explanation
  • True

An ID identifies a unique token in the vocabulary, not a position in a sentence.

4. A ____ identifies a unique token, while an ____ represents learned semantic attributes as a numeric vector.

Distinguish identity from meaning in a model's representation of text.

  • context window
  • embedding
  • token ID
  • vocabulary
Show answer
  • A token ID identifies a unique token, while an embedding represents learned semantic attributes as a numeric vector.
5. A search application needs one embedding for a document containing multiple tokens. How can a trained model obtain it?
  • Calculate an overall vector from the learned embeddings of the document's tokens.
  • Use the sequence of token IDs directly as the overall embedding.
  • Use the number of unique tokens in the model's vocabulary as the document embedding.
Show answer and explanation
  • Calculate an overall vector from the learned embeddings of the document's tokens.

The model tokenizes the document and calculates an overall embedding based on the learned embeddings of its tokens.

6. A model switches from word tokenization to smaller tokens to better handle typos and unfamiliar words. What trade-off applies when the token limit stays fixed?
  • The same text uses more tokens, so less text fits within the limit.
  • The same text uses fewer tokens, so more text fits within the limit.
  • The same text uses the same number of tokens, so the amount that fits cannot change.
Show answer and explanation
  • The same text uses more tokens, so less text fits within the limit.

Smaller tokens split the same text into more pieces. Processing those pieces requires more computation, and less text fits under the same token limit.

How LLMs predict the next token

An autoregressive model predicts what comes next from the sequence so far. Like autocomplete, it updates its prediction after each addition. Model weights are parameters learned during training; in next-token prediction, weights represent the relative influence of preceding tokens.

  1. Use the weights and embeddings of preceding tokens to predict a vector for the next token. In practice, the model calculates multiple vectors from elements of earlier embeddings.

  2. Evaluate possible tokens from the vocabulary and select the most probable next token based on those vectors.

  3. Append the selected token and use the extended sequence as input for the next prediction. Repeat to build the output one token at a time.

Diagram: Sequence so far, Use preceding weights and embeddings to predict next vector, Select most probable token from vocabulary, Append the token

During training, the full sequence is known, but the model ignores later tokens when making the current prediction. It compares the predicted vector with the actual value to calculate loss, then incrementally adjusts its weights to reduce that loss.

7. Put the steps of one autoregressive next-token generation cycle in order, starting with the sequence already available to the model.
  • Append the selected token and feed the extended sequence into the next iteration.
  • Select the most probable next token from the vocabulary based on the predicted vector.
  • Use preceding tokens' weights and embeddings to predict a vector for the next token.
Show answer
  1. Use preceding tokens' weights and embeddings to predict a vector for the next token.
  2. Select the most probable next token from the vocabulary based on the predicted vector.
  3. Append the selected token and feed the extended sequence into the next iteration.
8. During next-token training, an LLM has a complete reference sequence but ignores later tokens while making its prediction. How does it use the reference sequence to improve?
  • Compare the prediction with the actual value, then adjust weights to reduce the loss.
  • Use the later tokens to make the current prediction and skip the loss calculation.
  • Change the actual reference value to match the prediction and leave the weights unchanged.
Show answer and explanation
  • Compare the prediction with the actual value, then adjust weights to reduce the loss.

The model compares the predicted vector with the actual value to calculate loss. Weight adjustments aim to reduce that loss.

Token budgets and service limits

An LLM's token limit is often expressed as a combined context window for input and output. For example, with a 100-token window, I heard a dog bark loudly at a cat uses nine tokens with word tokenization, leaving 91 for output. With character tokenization, it uses 34 tokens including spaces, leaving 66 for output.

  • Token-based pricing: A request's cost often depends on its input and output token counts. Prices might differ between input and output. Microsoft provides Azure OpenAI Service pricing.

  • Rate limiting: Generative AI services enforce a maximum number of tokens per minute (TPM). This limit can vary by service region and LLM.

9. In a combined context window, a longer input measured in tokens leaves less room for generated output if the window size stays fixed.
  • True
  • False
Show answer and explanation
  • True

Input and output share the same token budget, so tokens used by the input reduce what remains for generation.

10. Match each token-related constraint to what it governs in a generative AI service.
  • How much input and output can fit together for a request.
  • How input and output token counts affect the charge for a request.
  • How many tokens the service allows over a one-minute interval.
  • Combined context window
  • Token-based pricing
  • Tokens per minute
Show answer and explanation
  • How much input and output can fit together for a request.: Combined context window
  • How input and output token counts affect the charge for a request.: Token-based pricing
  • How many tokens the service allows over a one-minute interval.: Tokens per minute

The combined context window limits input and output together.

Token-based pricing uses token counts and might price input and output differently.

Tokens per minute measures the service's token processing rate limit.

Azure OpenAI model capabilities

Azure OpenAI is a fully managed Foundry Tool that provides access to OpenAI models. Azure OpenAI Service integrates those models with Microsoft-developed Guardrails (previously content filters) and abuse detection models.

Model group

Text / code

Vision

Audio / Speech

GPT-image-1 series

—

✓

—

GPT-image-2

—

✓

—

Transcribe

—

—

✓

GPT-4 Turbo with Vision

✓

✓

—

GPT-4o GPT-4o-mini

✓

✓

✓

GPT-4.1 GPT-4.1-mini GPT-4.1-nano

✓

✓

—

GPT-5 series

✓

✓

—

GPT-5.1-Codex-Max

✓

✓

—

GPT-oss-120b

✓

—

—

GPT-Realtime series

✓

✓

✓

GPT-Live series

—

—

✓

computer-use-preview

✓

✓

—

  • Text and code: GPT-4o, the GPT-4.1 series, and the GPT-5 series, including its reasoning models, can understand and generate natural language and code. Changing the input text can adapt an autoregressive model to different tasks.

  • Vision: GPT-4 Turbo with Vision and GPT-4o can accept image and text inputs and return natural language or code. For example, a prompt can pair images of a tomato and tomato soup with a question about how to make the soup.

  • Computer use: The Computer Use (Preview) model accepts text on the first turn and screenshot images on subsequent turns. It outputs keyboard and mouse commands. Used with the Computer Use tool, it can help developers build agentic AI systems.

  • Audio and speech: GPT realtime models support turn-based speech interactions, including speech recognition, synthesis, and real-time translation. GPT-Live models are full-duplex: they can listen while generating a response and can delegate part of a conversation to a configured Responses API model or the calling application while the session continues. The transcription model can transcribe audio in the language spoken or translate non-English speech into English.

GPT-3 was pretrained on publicly available text from web crawling and higher-quality datasets. The GPT-4 base model was trained on publicly available and licensed data, then fine-tuned with reinforcement learning with human feedback (RLHF). OpenAI describes its training and modeling techniques in the GPT-3, GPT-4, and Codex research papers.

Warning

Fine-tuning further trains a pretrained model by adjusting its weights on a more specific dataset. In Azure OpenAI, fine-tuning is available for selected text and code models, and vision fine-tuning (images in the training data) is supported for gpt-4o (2024-08-06) and gpt-4.1 (2025-04-14).

Term

Meaning in text and code workflows

Prompt

Text sent to the service in an API call and passed to the model. For example, it can ask the model to convert a request into a command and provide an example of the desired conversion.

Completion or Generation

Text Azure OpenAI returns in response, such as a command that sends Greg a message about whether things are ready for Wednesday.

Token

A text unit, such as a word or a chunk of characters. For example, hamburger can be split into ham, bur, and ger, while pear is a single token.

Fine tuning

Further training a pretrained model for a more specific task by adjusting its weights with a smaller, specific dataset. Methods include supervised fine-tuning (SFT), reinforcement fine-tuning (RFT), and direct preference optimization (DPO).

Model Weights

Parameters learned during training that determine the model's output for a given input and are adjusted to reduce prediction error.

Ungrounded content

Generated content that is nonfactual or inaccurate relative to the source materials.

Agentic AI systems

Autonomous AI systems that sense and act on their environment to achieve goals.

Autonomy

The ability to execute actions and control system behavior independently, with limited or no direct human supervision.

Computer Use tool

Translates mouse and keyboard actions generated by the Computer Use model into executable commands.

Term

Meaning in vision workflows

Text-to-image

Generates images from text prompts.

Prompt

Text sent to the model in an API call, such as a request for an image of a botanical garden in a specified style.

Metaprompt

Also called a system message or system prompt; developer-written context or instructions used to prime the model, primarily to enforce safety instructions.

Zero-shot translation

In the image-generation case, the ability to act on a user prompt the model was not explicitly trained on.

GPT-4 Turbo with Vision

Accepts prompts containing text, images, or interleaved text and images.

Face blurring

Blurs detected faces during preprocessing of image or video inputs. It cannot uniquely identify individuals and helps protect privacy.

Agentic AI systems

Autonomous AI systems that sense and act on their environment to achieve goals.

Autonomy

The ability to act and control system behavior independently, with limited or no direct human supervision.

Computer Use tool

Translates the Computer Use model's mouse and keyboard actions into executable commands.

Inpainting

Generates content within a masked area to correct, complete, or alter an image while keeping its surroundings coherent.

Term

Meaning in audio and speech workflows

Transcription

Text automatically generated from speech by a speech model rather than by a human transcriber.

Automatic Speech Recognition (ASR)

Also called Speech-to-Text (STT); a model processes spoken audio into text.

Speech Translation

Translates speech into a target language. The Azure OpenAI Service transcription model translates non-English speech into English only.

Prompt

Context or cues that guide transcription, such as instructions for handling jargon, acronyms, or filler words.

Completion / Generation

The audio or text Azure OpenAI returns in response.

Token

A unit Azure OpenAI uses when processing audio or text. Text tokens can be words or chunks of characters.

OpenAI's speech-to-text guide explains transcription prompts, and its Whisper research paper describes the transcription model's training and modeling techniques.

11. A team using Azure OpenAI wants to use a task-specific dataset to change a pretrained model's weights. Which approach fits that goal?
  • Fine-tune a supported model on the dataset.
  • Ground each request in the dataset with retrieval so the weights update.
  • Change the wording of a prompt to update the model's weights.
Show answer and explanation
  • Fine-tune a supported model on the dataset.

Fine-tuning adjusts model weights through further training on a specific dataset. Prompt wording and retrieved grounding data change what the model sees in a request, not its weights.

12. A GPT-Live speech-to-speech model can continue listening while generating a response, unlike a turn-based GPT realtime model.
  • True
  • False
Show answer and explanation
  • True

GPT-Live models are full-duplex, so they do not have to wait for the other party to finish speaking before responding.

13. Match each desired result to the AI capability that directly provides it.
  • Alter just the masked part of an image while keeping the surrounding context coherent.
  • Convert spoken audio into written text.
  • Generate a new image from a written description.
  • Turn a model's mouse and keyboard actions into executable commands.
  • Automatic Speech Recognition
  • Computer Use tool
  • Inpainting
  • Text-to-image
Show answer and explanation
  • Alter just the masked part of an image while keeping the surrounding context coherent.: Inpainting
  • Convert spoken audio into written text.: Automatic Speech Recognition
  • Generate a new image from a written description.: Text-to-image
  • Turn a model's mouse and keyboard actions into executable commands.: Computer Use tool

Inpainting generates content in a specified masked region.

Automatic Speech Recognition transcribes speech into text.

Text-to-image generates images from text prompts.

The Computer Use tool translates actions generated by the Computer Use model into commands.

Reasoning tokens and multi-turn requests

Azure OpenAI reasoning models spend more time working through tasks such as complex coding, problem-solving, document comparison, and following instructions in workflows with shorter contexts. They generate reasoning tokens to break down a prompt, weigh approaches, and abandon approaches that do not hold up. These tokens do not appear in message content, but they occupy context space and are billed as output tokens.

With the Responses API, gpt-5.4 and gpt-5.5 support interleaved thinking: they can produce visible output before and between periods of reasoning and can reason between tool calls.

Input and output tokens carry forward across conversation turns. What happens to prior reasoning depends on the model and reasoning.context. Across three turns, current_turn drops earlier reasoning, while all_turns carries compatible reasoning forward.

Diagram: current_turn, Turn 1, Turn 2, Turn 3, all_turns

To inspect reasoning usage, check completion_tokens_details.reasoning_tokens in a Chat Completions API response or output_tokens_details.reasoning_tokens in a Responses API response. The usage object reports exact counts for each request:

{
  "usage": {
    "input_tokens": 75,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 1186,
    "output_tokens_details": {
      "reasoning_tokens": 1024
    },
    "total_tokens": 1261
  }
}
  • Cap generated tokens. Use max_output_tokens with the Responses API or max_completion_tokens with the Chat Completions API. Both caps cover reasoning, visible output, and formatting tokens. They do not cap the growing conversation resent as input each turn; all_turns adds earlier reasoning items to that input.

  • Allow room for reasoning and output. Context windows differ by model. While learning a workload, reserve at least 25,000 tokens for reasoning and output, then adjust the buffer to observed usage.

  • Check response status. Reaching the context window limit or token cap can leave a response incomplete, even before any visible output appears. Input and reasoning tokens can still incur charges.

{
  "status": "incomplete",
  "incomplete_details": {
    "reason": "max_output_tokens"
  }
}

Preserving reasoning during function calls

For function calls through the Responses API, pass the previous response's reasoning items back with your function output. If the model calls several functions in a row, send every reasoning item, function call item, and function call output item since the last user message. This lets the model continue its reasoning rather than start over.

The simplest approach is to pass all previous output items using previous_response_id or copy them into the next input array. Reasoning items that are irrelevant to the functions are ignored. If you trim or reorder context, keep everything between the last user message and your function call output intact.

Explore OpenAI reasoning models in the Microsoft Foundry model catalog.

14. A reasoning model reaches its generated-token cap before showing any visible answer. Why is that possible?
  • Reasoning tokens count toward the generated-token cap even when they do not appear in the message.
  • Only visible message text counts toward the generated-token cap.
  • The generated-token cap counts only the input prompt.
Show answer and explanation
  • Reasoning tokens count toward the generated-token cap even when they do not appear in the message.

The cap covers reasoning, visible output, and formatting tokens. A model can exhaust it during reasoning and return an incomplete response without a visible answer.

15. Setting a generated-token cap also caps the growing conversation input resent on later turns.
  • True
  • False
Show answer and explanation
  • False

The generated-token cap controls reasoning, visible output, and formatting tokens generated in the request. It does not cap the conversation resent as input.

16. With `reasoning.context` set to ____, earlier reasoning is dropped. With it set to ____, compatible reasoning carries forward across turns.

Distinguish the two reasoning context modes.

  • all_turns
  • current_turn
  • max_output_tokens
Show answer
  • With `reasoning.context` set to current_turn, earlier reasoning is dropped. With it set to all_turns, compatible reasoning carries forward across turns.
17. A reasoning model makes several consecutive function calls through the Responses API. How should the application preserve continuity when it sends back the function output?
  • Return every reasoning item, function call item, and function call output item since the last user message.
  • Return only the latest function output and discard all reasoning items since the last user message.
  • Return the earlier reasoning items but omit the function call outputs.
Show answer and explanation
  • Return every reasoning item, function call item, and function call output item since the last user message.

Retaining every reasoning item, function call item, and function call output item since the last user message lets the model continue the same line of reasoning.

Privacy and Security, Transparency and Accountability in AI SolutionsPage 3 of 24Choosing a Foundry Model: Model Catalog, Model Cards, Benchmarks and Model Router