Natural Language Processing Fundamentals Flashcards
7 cards from real DSE practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Natural Language Processing Fundamentals flashcards as text
What distinguishes zero-shot classification from few-shot classification in NLP?
Answer: Zero-shot provides no examples; few-shot provides a small number of examples in the prompt
Zero-shot classification relies only on task descriptions or label names, while few-shot provides a handful of labeled examples in the input.
Which NLP task involves identifying the grammatical role of each word in a sentence, such as noun or verb?
Answer: Part-of-speech tagging
Part-of-speech tagging assigns grammatical categories (noun, verb, adjective, etc.) to each token in a sentence.
What is the key advantage of using pre-trained contextual embeddings (like those from BERT) over static word embeddings (like word2vec)?
Answer: They produce different representations for the same word in different contexts
Contextual embeddings dynamically encode a word's meaning based on its surrounding context, addressing polysemy that static embeddings cannot.
In text classification with imbalanced classes, which strategy is most appropriate?
Answer: Use class-weighted loss or oversample the minority class
Class-weighted loss or oversampling corrects the model's bias toward the majority class when training data is imbalanced.
What is the purpose of the 'CLS' token in BERT-style models?
Answer: To serve as an aggregate sequence representation for classification tasks
The [CLS] token is prepended to inputs, and its final hidden state is used as a pooled sentence-level representation for downstream classification.
Which of the following tasks is best described as a seq2seq problem?
Answer: Text summarization
Text summarization takes a long input sequence and generates a shorter output sequence, matching the encoder-decoder seq2seq paradigm.
What is 'catastrophic forgetting' in the context of fine-tuning language models?
Answer: The model loses previously learned knowledge when updated on new task data
Catastrophic forgetting occurs when fine-tuning on a new task overwrites the weights learned during pre-training, degrading performance on original capabilities.