Q13Linguistic analysis
What is syntactic parsing?
What is syntactic parsing. Explain the core idea, use cases, and trade-offs.
Answer
Syntactic parsing analyzes grammatical structure, often by building a constituency tree or dependency relations between words.
Key Points
- Parsing helps represent grammatical relationships but can be difficult for ambiguous sentences
Q20Language modeling
What is an n-gram language model?
What is an n-gram language model. Explain the core idea, use cases, and trade-offs.
Answer
An n-gram model estimates a token's probability from the preceding n−1 tokens. It is simpler than neural language models but suffers from data sparsity and limited context.
Syntax
P(token_t | token_1...token_(t-1))
Key Points
- N-grams are useful baselines but have limited context length
Q22NLP approaches
What is the difference between rule-based and statistical NLP?
What is the difference between rule-based and statistical NLP. Explain the core idea, use cases, and trade-offs.
Answer
Rule-based systems use hand-written patterns or linguistic rules. Statistical systems learn patterns from examples, and modern neural methods learn complex representations from data.
Key Points
- Rules are transparent for narrow cases
- learned models generalize but need evaluation
Q25Neural NLP architectures
What is an encoder-decoder architecture?
What is an encoder-decoder architecture. Explain the core idea, use cases, and trade-offs.
Answer
An encoder transforms input into representations, and a decoder generates or predicts an output from those representations. It is common in translation, summarization, and sequence-to-sequence tasks.
Key Points
- Encoder-decoder models map an input sequence to an output sequence
Q26Neural NLP architectures
What is attention in NLP?
What is attention in NLP. Explain the core idea, use cases, and trade-offs.
Answer
Attention lets a model weight relevant tokens or representations when processing a sequence. It helps capture relationships that may be far apart in the input.
Key Points
- Attention weights are learned dynamically from representations
Q27Neural NLP architectures
What is a Transformer?
What is a Transformer. Explain the core idea, use cases, and trade-offs.
Answer
A Transformer is a neural architecture built around attention and feed-forward layers, with positional information to represent sequence order. It supports parallel training and underpins many modern language models.
Key Points
- Self-attention models token relationships
- positional information represents order
Q29Pretrained language models
What is BERT?
What is BERT. Explain the core idea, use cases, and trade-offs.
Answer
BERT is an encoder-style Transformer pretrained with objectives that help it build contextual representations. It is commonly adapted for classification, tagging, and extractive question answering.
Key Points
- BERT is primarily an encoder model suited to language understanding tasks
Q30Pretrained language models
Compare BERT and GPT.
Compare BERT and GPT.. Explain the core idea, use cases, and trade-offs.
Answer
BERT uses an encoder-oriented bidirectional representation objective and is commonly used for understanding tasks. GPT-style models use autoregressive next-token prediction and are suited to text generation and many instruction-following tasks.
Key Points
- Architecture and pretraining objective shape typical strengths
Q31Pretraining objectives
What is masked language modeling?
What is masked language modeling. Explain the core idea, use cases, and trade-offs.
Answer
Masked language modeling trains a model to predict selected tokens hidden from its input, encouraging it to use surrounding context.
Key Points
- It is a common pretraining objective for encoder models such as BERT
Q32Language modeling
What is autoregressive language modeling?
What is autoregressive language modeling. Explain the core idea, use cases, and trade-offs.
Answer
Autoregressive language modeling predicts the next token given previous tokens and trains by maximizing the likelihood of token sequences.
Key Points
- It supports left-to-right text generation
Q33Transfer learning
What is fine-tuning a pretrained NLP model?
What is fine-tuning a pretrained NLP model. Explain the core idea, use cases, and trade-offs.
Answer
Fine-tuning continues training a pretrained model on task-specific examples so its parameters adapt to the target task or domain.
Key Points
- Use held-out validation data and guard against overfitting on small datasets
Q34Language modeling
What is zero-shot versus few-shot classification?
What is zero-shot versus few-shot classification. Explain the core idea, use cases, and trade-offs.
Answer
Zero-shot classification predicts labels without task-specific labeled training examples, often using a pretrained model's capabilities. Few-shot methods provide a small number of labeled examples or demonstrations.
Key Points
- Evaluate on representative data
- few-shot results can depend on example choice
Q35Prompting and RAG
What is prompt engineering for NLP models?
What is prompt engineering for NLP models. Explain the core idea, use cases, and trade-offs.
Answer
Prompt engineering structures instructions, context, examples, and output requirements to guide a model. It can improve task performance but is not a substitute for access control or validation.
Key Points
- Test prompts systematically and validate generated outputs
Q38Evaluation
What are BLEU and ROUGE?
What are BLEU and ROUGE. Explain the core idea, use cases, and trade-offs.
Answer
BLEU measures n-gram precision with a brevity penalty and is often used in translation. ROUGE measures overlap-oriented recall variants and is common in summarization.
Key Points
- Overlap metrics are imperfect proxies for semantic quality
Q39Semantic similarity
What is semantic similarity in NLP?
What is semantic similarity in NLP. Explain the core idea, use cases, and trade-offs.
Answer
Semantic similarity estimates how close two texts are in meaning, often by comparing sentence embeddings with cosine similarity.
Key Points
- Similarity scores depend on embedding model and domain
- calibrate thresholds
Q40Semantic similarity
What is cosine similarity for text embeddings?
What is cosine similarity for text embeddings. Explain the core idea, use cases, and trade-offs.
Answer
Cosine similarity measures the cosine of the angle between two vectors. It is often used to compare embedding direction while reducing sensitivity to vector magnitude.
Syntax
cosine(a, b) = (a · b) / (||a|| * ||b||)
Key Points
- cosine(a,b) = (a · b) / (||a|| ||b||)
Q41Text representation
How do you handle out-of-vocabulary words?
How do you handle out-of-vocabulary words. Explain the core idea, use cases, and trade-offs.
Answer
Subword tokenization, character-level models, byte-level tokenization, or subword-aware embeddings help represent rare and unseen words.
Key Points
- Subword methods reduce dependence on a fixed whole-word vocabulary
Q42Multilingual NLP
What is multilingual NLP?
What is multilingual NLP. Explain the core idea, use cases, and trade-offs.
Answer
Multilingual NLP builds systems that process multiple languages, often using shared representations or language-specific data and components.
Key Points
- Performance can vary greatly by language and available training data