Courseiva
Fundamentals of Large Language ModelseasyMultiple ChoiceObjective-mapped

1Z0-1127-25 Fundamentals of Large Language Models Practice Question

Which of the following best describes the role of attention in transformer models?

⚠ Common exam trap

Oracle often tests the misconception that attention is only for training or that it replaces positional encoding, so candidates must remember that attention is inherently order-agnostic and requires positional encoding to capture sequence order, and that it is used in both training and inference phases.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

It allows the model to focus on relevant parts of the input sequence when generating output.

The attention mechanism in transformer models dynamically computes a weighted sum of all input tokens, allowing the model to focus on the most relevant parts of the input sequence when generating each output token. This is achieved through scaled dot-product attention, which assigns higher weights to tokens that are more contextually important, enabling the model to capture long-range dependencies effectively.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • It assigns equal weight to all words in the input.

    Why it's wrong here

    Attention computes dynamic weights, not equal weights. Some tokens are more relevant than others.

  • It is used only during training, not inference.

    Why it's wrong here

    Attention is used during both training and inference to compute context-aware representations.

  • It allows the model to focus on relevant parts of the input sequence when generating output.

    Why this is correct

    This is the core function of attention: it enables the model to selectively attend to important input parts.

  • It replaces the need for positional encoding.

    Why it's wrong here

    Attention is permutation invariant; positional encoding is still needed to provide order information.

About these practice questions

One of 768 original 1Z0-1127-25 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-1127-25 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-1127-25 exam.