Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
What is the main purpose of a generative NLP model?
Not quite. Try another option.
Answer: To produce new text
Generative NLP models learn language patterns and use them to produce new text.
Question 2 of 60 · Generative NLP models · Easy
During text generation, what does an autoregressive language model usually predict?
Not quite. Try another option.
Answer: The next token
An autoregressive model generates text by repeatedly predicting the next token from earlier tokens.
Question 3 of 60 · Text generation strategies · Easy
Why are text generation strategies used with language models?
Not quite. Try another option.
Answer: To choose output tokens
A generation strategy determines how tokens are selected from the model's predicted probability distribution.
Question 4 of 60 · Greedy search · Easy
How does greedy search select the next token?
Not quite. Try another option.
Answer: It selects the most probable token
Greedy search chooses the token with the highest predicted probability at each generation step.
Question 5 of 60 · Beam search · Easy
What does beam search keep during text generation?
Not quite. Try another option.
Answer: Several likely sequences
Beam search tracks several promising candidate sequences and expands them over multiple generation steps.
Question 6 of 60 · Beam search · Easy
What does the beam width control in beam search?
Not quite. Try another option.
Answer: The number of candidate sequences
The beam width specifies how many candidate sequences are retained at each step.
Question 7 of 60 · Top-k sampling · Easy
In top-k sampling, which tokens can be sampled at each step?
Not quite. Try another option.
Answer: The most probable tokens
Top-k sampling restricts selection to the tokens with the highest predicted probabilities.
Question 8 of 60 · Nucleus sampling · Easy
How does nucleus sampling choose its candidate token set?
Not quite. Try another option.
Answer: By reaching a cumulative probability threshold
Nucleus sampling keeps the smallest high-probability token set whose cumulative probability reaches a chosen threshold .
Question 9 of 60 · Instruction-tuned large language models · Easy
What are instruction-tuned large language models trained to do?
Not quite. Try another option.
Answer: Follow natural-language instructions
Instruction tuning teaches a language model to respond more effectively to tasks expressed as natural-language instructions.
Question 10 of 60 · Instruction-tuned large language models · Easy
Which prompt is most directly suited to an instruction-tuned model?
Not quite. Try another option.
Answer: Summarize this paragraph in one sentence.
Instruction-tuned models are designed to follow clear commands such as requests to summarize, classify, or answer.
Question 11 of 60 · Model behaviors in summarization · Easy
What should a good text summary mainly preserve?
Not quite. Try another option.
Answer: The central ideas
A useful summary presents the source's main ideas in a shorter and coherent form.
Question 12 of 60 · Model behaviors in summarization · Easy
Which summarization behavior is undesirable?
Not quite. Try another option.
Answer: Adding unsupported facts
A summary should remain faithful to its source and should not introduce claims that the source does not support.
Question 13 of 60 · Dialogue generation · Easy
What is an important quality of a dialogue generation system?
Not quite. Try another option.
Answer: Maintaining conversational context
A dialogue system should use relevant information from earlier turns to produce coherent responses.
Question 14 of 60 · Reasoning tasks · Easy
Which activity is an example of a reasoning task for a language model?
Not quite. Try another option.
Answer: Drawing a conclusion from facts
Reasoning tasks require the model to use provided information to infer or determine an answer.
Question 15 of 60 · Evaluation metrics · Easy
What is the purpose of an evaluation metric in NLP?
Not quite. Try another option.
Answer: To measure model performance
Evaluation metrics provide consistent ways to assess and compare model outputs or capabilities.
Question 16 of 60 · Perplexity · Easy
What does lower perplexity generally indicate for a language model on a test set?
Not quite. Try another option.
Answer: Better prediction of the text
Lower perplexity generally means the model assigns higher probability to the observed test text.
Question 17 of 60 · Perplexity · Easy
Perplexity is most directly based on which model output?
Not quite. Try another option.
Answer: Token probabilities
Perplexity is calculated from the probabilities that a language model assigns to tokens in a sequence.
Question 18 of 60 · Human judgment measures · Easy
Which quality can human evaluators directly rate in generated text?
Not quite. Try another option.
Answer: Response coherence
Human evaluators can judge qualities such as coherence, relevance, fluency, and factuality.
Question 19 of 60 · Explainability in LLMs · Easy
What is the main goal of explainability in large language models?
Not quite. Try another option.
Answer: To clarify model behavior
Explainability methods aim to help people understand a model's outputs, influences, or decision patterns.
Question 20 of 60 · Hallucination in LLMs · Easy
What is a hallucination in the output of a large language model?
Not quite. Try another option.
Answer: A plausible but unsupported claim
A hallucination occurs when a model generates information that sounds credible but is false or unsupported.
Question 21 of 60 · Generative NLP models · Medium
A sequence-to-sequence model performs well during training with teacher forcing but produces increasingly poor text at inference time after making one early mistake. Which issue best explains this behavior?
Not quite. Try another option.
Answer: Exposure bias from relying on correct previous tokens during training
Teacher forcing supplies correct previous tokens during training, while inference uses the model's own predictions. This mismatch can cause errors to accumulate.
Question 22 of 60 · Text generation strategies · Medium
A developer wants a language model to produce several varied story ideas from the same prompt while avoiding extremely unlikely tokens. Which decoding setup is most appropriate?
Not quite. Try another option.
Answer: Sampling with moderate temperature and probability truncation
Moderate-temperature sampling introduces variation, while top-k or nucleus truncation reduces the chance of selecting very unlikely tokens.
Question 23 of 60 · Greedy search · Medium
At the first decoding step, token A has probability and token B has probability . Their best possible next-token probabilities are and , respectively. Which sequence does greedy search select based on these values?
Not quite. Try another option.
Answer: The sequence beginning with A, because A is locally most probable
Greedy search chooses the highest-probability token at the current step and does not reconsider it using future continuation probabilities.
Question 24 of 60 · Beam search · Medium
A beam-search system consistently favors very short translations because sequence probabilities shrink as more token probabilities are multiplied. Which modification most directly addresses this problem?
Not quite. Try another option.
Answer: Apply a length-normalized sequence score
Length normalization adjusts sequence scores so that longer candidates are not penalized solely for containing more probability factors.
Question 25 of 60 · Top-k sampling · Medium
A model uses top-k sampling with . At a particular decoding step, the five retained tokens together contain only of the original probability mass. What happens before sampling?
Not quite. Try another option.
Answer: The five retained probabilities are renormalized to sum to one
Top-k sampling discards tokens outside the top and renormalizes the retained probabilities before drawing a token.
Question 26 of 60 · Nucleus sampling · Medium
A model uses nucleus sampling with threshold . Why can the number of candidate tokens change from one decoding step to another?
Not quite. Try another option.
Answer: It keeps the smallest token set whose cumulative probability reaches
A concentrated distribution may reach the threshold with few tokens, while a flatter distribution may require many tokens.
Question 27 of 60 · Instruction-tuned large language models · Medium
A pretrained language model often continues a user's prompt instead of carrying out the requested task. Why can instruction tuning improve this behavior?
Not quite. Try another option.
Answer: It trains the model on examples that map instructions to desired responses
Instruction tuning exposes the model to task descriptions and appropriate outputs, improving its ability to interpret and follow user requests.
Question 28 of 60 · Instruction-tuned large language models · Medium
An instruction-tuned model answers common tasks well but performs poorly when a request uses an unfamiliar format. Which intervention is most likely to improve its performance on that format?
Not quite. Try another option.
Answer: Provide a few demonstrations using the requested input-output format
Few-shot demonstrations clarify the intended task structure and output format through in-context examples.
Question 29 of 60 · Model behaviors in summarization · Medium
An abstractive summarizer produces fluent summaries but occasionally changes dates and names from the source document. Which evaluation should be prioritized?
Not quite. Try another option.
Answer: Checking factual consistency between the summary and source
Fluency does not ensure faithfulness. Factual consistency evaluation checks whether summary claims are supported by the source.
Question 30 of 60 · Dialogue generation · Medium
A dialogue model gives a restaurant recommendation and later denies making that recommendation. Which capability most directly needs improvement?
Not quite. Try another option.
Answer: Tracking conversational context across dialogue turns
Maintaining dialogue state and prior-turn information is necessary for consistent responses across a conversation.
Question 31 of 60 · Reasoning tasks · Medium
A model solves single-operation arithmetic problems but often fails on problems requiring several dependent operations. Which prompting method is most likely to improve accuracy?
Not quite. Try another option.
Answer: Prompt the model to produce intermediate reasoning steps
Requesting intermediate steps can help the model organize multi-stage computations, although the final result should still be independently checked.
Question 32 of 60 · Evaluation metrics · Medium
Two machine-generated summaries express the same meaning as a reference summary but use different wording. Their ROUGE scores are unexpectedly low. What is the most likely reason?
Not quite. Try another option.
Answer: ROUGE depends heavily on lexical overlap with reference text
ROUGE primarily compares overlapping units such as n-grams, so valid paraphrases can receive low scores despite preserving meaning.
Question 33 of 60 · Perplexity · Medium
A language model assigns probabilities and to the two correct tokens in a sequence. Using , what is the sequence perplexity?
Not quite. Try another option.
Answer:
The product of the probabilities is . The inverse geometric mean is .
Question 34 of 60 · Perplexity · Medium
Model X reports lower perplexity than Model Y, but the models use different tokenizers. Why should the comparison be treated cautiously?
Not quite. Try another option.
Answer: Per-token probabilities depend on how each tokenizer segments text
Different segmentations change the prediction units and sequence lengths, so raw token-level perplexities may not be directly comparable.
Question 35 of 60 · Human judgment measures · Medium
Three annotators rate dialogue responses for relevance on a five-point scale, but their scores differ substantially. Which measure would best assess rating consistency?
Not quite. Try another option.
Answer: An inter-rater agreement coefficient
Inter-rater agreement measures how consistently multiple evaluators apply the same judgment criteria.
Question 36 of 60 · Human judgment measures · Medium
A team compares two dialogue models through human evaluation. Which design best reduces bias caused by model identity and response order?
Not quite. Try another option.
Answer: Blind the model labels and randomize response order
Blinding prevents identity-based bias, while randomization reduces systematic preference for responses shown first or second.
Question 37 of 60 · Explainability in LLMs · Medium
An analyst claims that the token receiving the highest attention weight is always the sole cause of a model's prediction. What is the main problem with this claim?
Not quite. Try another option.
Answer: Attention weights do not necessarily provide a complete causal explanation
Attention can indicate associations, but predictions also depend on multiple layers, representations, and interactions. High attention alone does not prove causation.
Question 38 of 60 · Explainability in LLMs · Medium
To test whether a phrase truly influences a classifier's output, an analyst removes the phrase and observes the change in prediction. What explainability approach is being used?
Not quite. Try another option.
Answer: Counterfactual or perturbation-based analysis
Perturbation methods modify the input and measure the resulting output change to estimate which input features influence a prediction.
Question 39 of 60 · Hallucination in LLMs · Medium
A question-answering model invents recent company statistics that were not present in its training data. Which system change most directly reduces this type of hallucination?
Not quite. Try another option.
Answer: Retrieve current documents and condition answers on their contents
Retrieval-augmented generation supplies current, relevant evidence that can ground the model's response and reduce unsupported claims.
Question 40 of 60 · Hallucination in LLMs · Medium
A medical summarization system generates a statement that is plausible but absent from the patient's record. How should this output be classified?
Not quite. Try another option.
Answer: An unsupported hallucination requiring factual review
A claim is hallucinated when it lacks support from the source or verified evidence, even if it is fluent and plausible.
Question 41 of 60 · Generative NLP models · Hard
An autoregressive language model factorizes a sequence probability as . During training, all target positions can still be processed in parallel using teacher forcing. Why does this not permit fully parallel generation?
Not quite. Try another option.
Answer: Each generated token changes the conditioning context required for the next token
Training knows the complete target sequence and can evaluate shifted conditionals simultaneously. At inference, must be produced before it can condition the distribution for .
Question 42 of 60 · Greedy search · Hard
At the first decoding step, a model assigns and . At the next step, and , with all other continuations having lower complete-sequence probability. Which sequence does greedy decoding return, and which has the greatest joint probability?
Not quite. Try another option.
Answer: Greedy returns , but has greater probability
Greedy selects because . However, the complete probabilities are and , so is globally better.
Question 43 of 60 · Beam search · Hard
A decoder ranks completed hypotheses by the unnormalized score . Assuming token probabilities are strictly below , what systematic preference can this introduce, and what modification most directly addresses it?
Not quite. Try another option.
Answer: A preference for short sequences; apply a length-normalized sequence score
Each added token contributes a negative log probability, so raw summed scores often favor early termination. Length normalization or a calibrated length penalty can reduce this bias.
Question 44 of 60 · Beam search · Hard
A width- beam discards a prefix at step because its current cumulative log probability ranks third. Later, that prefix would have led to the globally highest-scoring completed sequence. Which statement best characterizes this outcome?
Not quite. Try another option.
Answer: It is possible because beam search cannot recover a prefix once it is pruned
Beam search is approximate. A temporarily weak prefix can have strong later continuations, but pruning permanently removes it from consideration.
Question 45 of 60 · Top-k sampling · Hard
Let contain the tokens with highest model probabilities. Which distribution is sampled by standard top-k decoding before any temperature adjustment?
Not quite. Try another option.
Answer: for , and otherwise
Top-k sampling removes all tokens outside the highest-probability set and renormalizes the retained probabilities; it does not make retained tokens uniform.
Question 46 of 60 · Nucleus sampling · Hard
A model's sorted next-token probabilities are . Under nucleus sampling with threshold , what is the sampling probability of the third token after truncation and renormalization?
Not quite. Try another option.
Answer:
The smallest prefix reaching at least is , whose mass is . The third token therefore receives .
Question 47 of 60 · Text generation strategies · Hard
Two candidate tokens have original probability ratio . Temperature scaling uses . What is the new ratio when ?
Not quite. Try another option.
Answer:
Temperature rescales the odds to . With , the ratio becomes , making the distribution sharper.
Question 48 of 60 · Text generation strategies · Hard
A developer wants generated answers to be reproducible while retaining more global sequence optimization than greedy decoding. Which configuration best satisfies both goals?
Not quite. Try another option.
Answer: Deterministic beam search with fixed tie-breaking and no sampling
Beam search explores multiple prefixes while remaining reproducible when scoring and tie-breaking are deterministic. Sampling methods remain stochastic unless their complete random state is controlled.
Question 49 of 60 · Instruction-tuned large language models · Hard
An instruction-tuned model follows requested output formats much better than its base model but confidently repeats the same false historical claim. Which explanation is most accurate?
Instruction tuning primarily teaches models to follow prompts and preferred response patterns. It does not inherently verify, update, or ground every factual association in the base model.
Question 50 of 60 · Instruction-tuned large language models · Hard
A supervised instruction-tuning dataset contains many prompts where uncertain questions are answered with polished guesses rather than abstentions. What behavior is most likely after fine-tuning?
Not quite. Try another option.
Answer: The model may learn that confident completion is preferred even under uncertainty
Supervised fine-tuning imitates patterns in its demonstrations. If polished guessing is repeatedly rewarded by the targets, the model can learn that behavior instead of calibrated abstention.
Question 51 of 60 · Model behaviors in summarization · Hard
A system summary states, "The treatment reduced mortality," while the source says, "The treatment did not reduce mortality." The summary contains no outside information. What is the most precise diagnosis?
Not quite. Try another option.
Answer: An intrinsic factual inconsistency caused by contradicting the source
The generated claim is directly derived from source content but reverses its meaning. That makes it intrinsic inconsistency rather than an unsupported external addition.
Question 52 of 60 · Dialogue generation · Hard
A dialogue model is coherent for the first few turns but gradually repeats itself and responds to claims that no participant made. Which training-inference mismatch most directly contributes to this pattern?
Not quite. Try another option.
Answer: Training conditions on gold histories, while inference conditions on model-generated histories
This exposure mismatch allows small generation errors to enter the dialogue history and compound over later turns, causing drift, repetition, and invented context.
Question 53 of 60 · Reasoning tasks · Hard
For a reasoning benchmark, a model samples 25 diverse reasoning paths and returns the answer occurring most often. Under what condition can this self-consistency strategy still reliably select a wrong answer?
Not quite. Try another option.
Answer: The sampled paths share a systematic bias toward the same incorrect conclusion
Majority voting reduces independent variation, not correlated error. If many reasoning paths inherit the same misconception, the wrong conclusion can dominate the vote.
Question 54 of 60 · Evaluation metrics · Hard
A semantically correct generated answer uses different wording from a single reference and receives a low BLEU score. Which property of BLEU best explains this result?
Not quite. Try another option.
Answer: Its n-gram overlap can penalize valid paraphrases absent from the reference
BLEU primarily measures surface n-gram overlap. With limited references, a valid paraphrase may share few n-grams and therefore receive an unjustifiably low score.
Question 55 of 60 · Perplexity · Hard
A three-token sequence has token negative log-likelihoods , , and . Using natural logarithms, what is its token-level perplexity?
Not quite. Try another option.
Answer:
The mean negative log-likelihood is . Thus perplexity is .
Question 56 of 60 · Perplexity · Hard
Model X reports lower token-level perplexity than Model Y on the same raw documents, but the models use different tokenizers. Why is the direct comparison potentially invalid?
Not quite. Try another option.
Answer: Per-token normalization depends on how each tokenizer segments the documents
A tokenizer changes the number and identity of prediction events. Per-token perplexities therefore use different units unless segmentation is aligned or scores are normalized to a common unit.
Question 57 of 60 · Human judgment measures · Hard
Two summarization systems are compared by asking each annotator to choose the better output for the same document. Which design most directly controls for annotator severity and document difficulty?
Not quite. Try another option.
Answer: Use paired judgments with randomized system order on each document
Paired evaluation holds the document and annotator context constant, while randomized order reduces position bias. This supports a cleaner comparison between systems.
Question 58 of 60 · Explainability in LLMs · Hard
A researcher presents one attention head's weights as proof that specific input tokens caused an LLM's answer. What is the strongest methodological objection?
Not quite. Try another option.
Answer: Attention weights need not be faithful measures of causal influence on the output
Attention shows how a component distributes weight, but the final prediction also depends on values, residual paths, other heads, and nonlinear transformations. Causal claims require interventions or stronger faithfulness tests.
Question 59 of 60 · Explainability in LLMs · Hard
An explanation method identifies a hidden unit as representing negation. Which experiment provides the strongest evidence that the unit causally affects negation-sensitive predictions?
Not quite. Try another option.
Answer: Intervene on the unit and measure targeted changes in negation-sensitive outputs
Correlation and visualization establish association, not causation. Controlled activation patching or ablation tests whether changing the unit systematically changes the relevant behavior.
Question 60 of 60 · Hallucination in LLMs · Hard
A retrieval-augmented LLM receives a passage containing the correct answer but generates a conflicting claim. Which conclusion is best supported?
Not quite. Try another option.
Answer: Retrieval availability alone does not ensure that generation is grounded in the evidence
The evidence was retrieved successfully, but the generator failed to use it faithfully. Retrieval reduces some knowledge gaps without guaranteeing grounded synthesis.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of CSE472 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of CSE472 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.