Question 38
Domain 5: Describe knowledge mining and generative AI workloads on AzureWhat is the primary function of transformers in natural language processing (NLP)?
Correct answer: A
Explanation
Transformers are used to convert language tokens into numerical representations that models can process. In NLP, this means encoding words or subwords as vector-based embeddings so the model can learn relationships and context from the input sequence.
Why each option is right or wrong
A. Encoding language tokens as vector-based embeddings
Transformers are the architecture used in modern NLP to map discrete tokens into dense numerical representations and then refine those representations through self-attention across the sequence. In practice, the model’s embedding layer and attention blocks produce context-aware vectors for each token, which is the core mechanism enabling downstream language understanding and generation.
B. Removing noise from textual data
C. Generating image captions