Home › Studies › AI-901 › AI Concepts › AI Models & Deployment

AI Models & Deployment

How language models generate text · model types and benchmarks · deployment types · temperature and max output tokens

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

How a generative AI model works

Generative AI is a branch of AI that enables software applications to generate new content, often natural language dialogs but also images, video, code and other formats. It is based on a language model trained with huge volumes of data.

  1. Tokenize. Training text is broken into tokens (words, sub-words, punctuation and other common character sequences), and each token gets a unique integer identifier.
  2. Vectors and position. Each token gets a vector (an array of numeric values), fed into the transformer with a positional encoding that shows where the token appears in the sequence.
  3. Encoder. The encoder block creates embeddings by applying attention, which determines how each token is influenced by the tokens around it.
  4. Decoder. The decoder block uses the embeddings to determine the next most probable token in a sequence started by a prompt. The predicted token is added to the sequence and the process repeats until the decoder predicts that the sequence has ended.

Prompts, grounding and agents

TermMeaning
System promptSets the behavior and tone of the model and any constraints; usually set by the application that uses the model
User promptElicits a response to a specific question or instruction; may be typed by a person or generated by the application on the user's behalf
Conversation historyApps track the history and include summarized versions of it in later prompts so the model has ongoing context
RAG (retrieval augmented generation)Retrieved information, like documents or emails, augments the prompt, so the response is grounded in the information provided
AgentSoftware built on generative AI with three key elements: a large language model, instructions (a system prompt that defines role and behavior) and tools (knowledge tools and action tools)

Choose a model by capability

The Foundry model catalog is a central hub for discovering and comparing models. Each model card shows the provider, capabilities, benchmark metrics, responsible AI considerations and deployment options. You can filter by collection, capabilities, source, inference tasks, fine-tuning methods and industry.

NeedModel type (examples from Learn)
Deep reasoning, complex content, long contextLarge language model (LLM), such as GPT-5, Mistral Large, Llama 3 70B
Efficiency and low cost; lower-end hardware or edge devicesSmall language model (SLM), such as Phi-4, Llama 3 8B
Conversation and text generationChat completion model (most models in the catalog)
Complex math, coding, science, strategy, logisticsReasoning model, such as Claude Opus 4.6
Semantic search, recommendations, RAGEmbedding model, such as text-embedding-3-small
Images from text descriptionsImage generation model, such as GPT-image-1
Video from text descriptionsVideo generation model, such as Sora 2
Analyze images in a promptImage analysis (multimodal) model, such as GPT-4.1
Text to spoken audioText to speech model, such as GPT-4o-tts
Audio to text transcriptSpeech to text model, such as GPT-4o-transcribe

Compare models with benchmarks

Benchmark groupWhat it shows
QualityThe Quality index averages accuracy scores across benchmark datasets for reasoning, knowledge, question answering, math and coding. Scores run from zero to one; higher is better
SafetyHarmful behavior is measured with HarmBench as an Attack Success Rate; lower values indicate safer, more robust models
CostCost per input tokens and per output tokens (per 1 million tokens); estimated cost uses a typical 3:1 input to output ratio; lower is more cost-effective
PerformanceLatency (mean, P50, P90, P95, P99), time to first token and throughput such as generated tokens per second

Deployment types

Deploying a model makes it available for production through a stable, scalable and secure endpoint. The deployment type determines where your data is processed, how you pay, and the performance characteristics. Start with Global Standard for most workloads and move only for a specific reason such as data residency, reserved throughput or asynchronous batch processing.

Deployment typeData processingBillingBest for
Global StandardAny Azure regionPay-per-tokenGeneral workloads, highest quota
Global ProvisionedAny Azure regionReserved PTUPredictable high throughput
Global BatchAny Azure region50% discount, 24-hourLarge asynchronous jobs
Data Zone StandardWithin a data zone (US, EU or APAC)Pay-per-tokenData zone compliance
Data Zone ProvisionedWithin a data zoneReserved PTUData zone plus predictable throughput
Data Zone BatchWithin a data zone50% discountLarge asynchronous jobs within a data zone
Standard (regional)Within an Azure geographyPay-per-tokenGeography compliance, low volume
Regional ProvisionedWithin an Azure geographyReserved PTUGeography compliance plus throughput
DeveloperAny Azure regionPay-per-tokenFine-tuned model evaluation only

Configuration parameters and the client call

SettingEffect
Deployment type, model version, tokens per minute (TPM)Deployment parameters you can customize. TPM sets the rate-limit boundary; larger prompts and higher max output token settings consume more TPM
Deployment nameUsed in the model parameter of API requests to route to your deployment
TemperatureControls creativity versus determinism
Max output tokensCaps response length; affects token consumption and throttling
Top-pNucleus sampling
System instructionsSets the behavior and role of the model

If you see throttling, lower max tokens or reduce concurrent requests in code. To call a deployment you need the endpoint URL, an authentication key or a Microsoft Entra ID token (recommended for production), and the deployment name. The Foundry SDK exposes a Project client and an OpenAI-compatible client that calls models through the Responses API. The Learn example:

response = client.responses.create(model=os.environ["DEPLOYMENT_NAME"], input=[...], max_output_tokens=300, temperature=0.7)
print(response.output_text)

Exam Tips

Tick each tip once you can answer it without looking.

“First step in training a language model on text” → Break the text into tokens and give each a unique integer ID. Trap: Embeddings come later; they are produced by the transformer from token vectors.

“Which transformer block creates embeddings by applying attention?” → Encoder. Trap: The decoder predicts the next token from the embeddings; it doesn't create them.

“Which block predicts the next most probable token from a prompt?” → Decoder. Trap: Encoder builds the embeddings; positional encoding only marks token position.

“Measure how close two tokens are in meaning” → Cosine similarity of their embeddings. Trap: Token IDs are just unique integers and carry no meaning by themselves.

“Sets the model's behavior, tone and constraints, usually set by the app” → System prompt. Trap: A user prompt is the specific question or instruction.

“Ground answers in your own documents” → RAG: retrieve information and add it to the prompt. Trap: Changing temperature changes creativity, not grounding.

“Semantic search or RAG needs text turned into numbers” → Embedding model. Trap: A chat completion model generates text; it is not built for semantic vector representations.

“Text in, picture out” → Image generation model (for example GPT-image-1). Trap: An image analysis model takes images in and returns natural language.

“Efficient and cheap, runs on edge devices, common NLP tasks” → Small language model (SLM). Trap: LLMs suit deep reasoning but need more compute.

“Find the best model for a coding or groundedness use case” → Scenario leaderboard. Trap: The overall Quality index averages across many datasets, not one scenario.

“Safety benchmark: Attack Success Rate” → Lower is safer. Trap: Higher ASR means the model is easier to push into unsafe output.

“Default deployment type for most workloads” → Global Standard. Trap: Provisioned types reserve capacity (PTUs); Learn says to start with Global Standard for most workloads.

“Data must be processed only inside the EU or US data zone” → Data Zone Standard (or Data Zone Provisioned). Trap: Global types may process in any Azure region.

“Reserved, predictable throughput billed in PTUs” → Provisioned deployment (Global, Data Zone or Regional). Trap: Standard types are pay-per-token, best-effort.

“Large asynchronous jobs, 50% discount, 24 hours” → Global Batch. Trap: Batch requests have no real-time SLA and target completion within 24 hours; it trades responsiveness for cost.

“Rate-limit errors from throttling” → Lower max output tokens or reduce concurrent requests. Trap: Raising max output tokens makes it worse; it consumes more TPM.

“The model argument in a client call” → The deployment name. Trap: It is not the key or the endpoint URL; those authenticate and locate the service.

“Creativity versus determinism setting” → Temperature. Trap: Max output tokens caps response length; it doesn't change creativity.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Responsible AIAI Workloads →