0% found this document useful (0 votes)
124 views44 pages

Understanding LLMs and NLP Techniques

The document outlines assignments and quizzes related to a course on Large Language Models (LLMs) offered by NPTEL. It includes questions on distributional semantics, statistical language models, and deep learning concepts, along with correct answers and scores. The assignments are due on specific dates in 2025, with submissions recorded for each week.

Uploaded by

extraworks121
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views44 pages

Understanding LLMs and NLP Techniques

The document outlines assignments and quizzes related to a course on Large Language Models (LLMs) offered by NPTEL. It includes questions on distributional semantics, statistical language models, and deep learning concepts, along with correct answers and scores. The assignments are due on specific dates in 2025, with submissions recorded for each week.

Uploaded by

extraworks121
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 1 : Assignment 1


outline The due date for submitting this assignment has passed.
Due on 2025-08-06, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-08-06, 17:56 IST
How does an 1) Which of the following best demonstrates the principle of distributional semantics? 1 point
NPTEL online
course work? Words that co-occur frequently tend to share semantic properties.
() Each word has a unique, fixed meaning regardless of context.
Syntax determines the entire meaning of a sentence.
Week 1 ()
Distributional semantics is unrelated to word embeddings.
Lec 01 : Yes, the answer is correct.
Introduction Score: 1
and Recent Accepted Answers:
Advances Words that co-occur frequently tend to share semantic properties.
(unit?
unit=18&lesson
2) Which of the following words is least likely to be polysemous? 1 point
=19)

Lec 02 : Bank
Introduction to Tree
Natural
Gravity
Language
Processing Idea
(unit? Yes, the answer is correct.
unit=18&lesson
=20)

[Link] 1/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1

Score: 1
Lecture
Materials (unit? Accepted Answers:
unit=18&lesson Gravity
=22)
3) Consider the following sentence pair: 1 point
Feedback Form
(unit? Sentence 1: Riya dropped the glass.
unit=18&lesson Sentence 2: The glass broke.
=27)

Quiz: Week 1 :
Does Sentence 1 entail Sentence 2?
Assignment 1
Yes
(assessment?
name=116) No

Yes, the answer is correct.


Week 2 () Score: 1
Accepted Answers:
Week 3 () No

Week 4 () 4) Which sentence contains a homonym? 0 points

Week 5 () He wound the clock before bed.


She tied her hair in a bun.
Week 6 ()
I can’t bear the noise.
He likes to bat after lunch.
Week 7 ()
No, the answer is incorrect.
Week 8 () Score: 0
Accepted Answers:
He likes to bat after lunch.
Week 9 ()

5) Which of the following relationships are incorrectly labeled? 1 point


Week 10 ()
Car is a meronym of wheel.
Week 11 ()
Rose is a hyponym of flower.

Week 12 () Keyboard is a holonym of key.


Tree is a hypernym of oak.
Year 2025 Yes, the answer is correct.
July Solution Score: 1
() Accepted Answers:
Car is a meronym of wheel.

6) _________ studies how context influences the interpretation of meaning. 1 point

Syntax
Morphology
Pragmatics
Semantics

[Link] 2/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1

Yes, the answer is correct.


Score: 1
Accepted Answers:
Pragmatics

7) In the sentence, “After Sita praised Radha, she smiled happily,” who does “she” most 1 point
likely refer to?

Sita
Radha
Ambiguous
Neither

Yes, the answer is correct.


Score: 1
Accepted Answers:
Ambiguous

8) Which of the following statements is true? 1 point

(i) Word embeddings capture semantic similarity through context.


(ii) Morphological analysis is irrelevant in LLMs.
(iii) Hypernyms are more specific than hyponyms.

Only (i)
Only (i) and (iii)
Only (ii) and (iii)
All of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Only (i)

9) What issues can be observed in the following text? 1 point

On a much-needed #workcation in beautiful Goa. Workin & chillin by d waves!

Idioms
Non-standard English
Tricky Entity Names
Neologisms

Partially Correct.
Score: 0.5
Accepted Answers:
Non-standard English
Neologisms

[Link] 3/4
10/28/25, 1:42 PM Introduction to Large Language Models (LLMs) - - Unit 3 - Week 1

10) In semantic role labelling, we determine the semantic role of each argument with 1 point
respect to the ___________ of the sentence.

noun phrase
subject
predicate
adjunct
Yes, the answer is correct.
Score: 1
Accepted Answers:
predicate

[Link] 4/4
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 2 : Assignment 2


outline The due date for submitting this assignment has passed.
Due on 2025-08-06, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-08-06, 18:00 IST
How does an 1) Which of the following does not directly affect perplexity? 1 point
NPTEL online
course work? Vocabulary size
() Sentence probability
Number of tokens
Week 1 ()
Sentence length

Week 2 () Yes, the answer is correct.


Score: 1
Lec 03 : Accepted Answers:
Introduction to Vocabulary size
Statistical
Language 2) Which equation expresses the chain rule for a 4-word sentence? 1 point
Models (unit?
unit=23&lesson P(w1, w2, w3, w4) = P(w1) + P(w2|w1) + P(w3|w2) + P(w4|w3)
=25)
P(w1, w2, w3, w4) = P(w1) × P(w2|w1) × P(w3|w1, w2) × P(w4|w1, w2, w3)
Lec 04 : P(w1, w2, w3, w4) = P(w1) × P(w2|w1) × P(w3|w2) × P(w4|w3)
Statistical LM:
P(w1, w2, w3, w4) = P(w4|w3) × P(w3|w2) × P(w2|w1) × P(w1)
Advanced
Smoothing and Yes, the answer is correct.
Evaluation
(unit?

[Link] 1/3
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2

unit=23&lesson Score: 1
=26) Accepted Answers:
P(w1, w2, w3, w4) = P(w1) × P(w2|w1) × P(w3|w1, w2) × P(w4|w1, w2, w3)
Lecture
Material (unit? 3) Which assumption allows n-gram models to reduce computation? 1 point
unit=23&lesson
=29) Bayes Assumption

Feedback Form
Chain Rule
(unit? Independence Assumption
unit=23&lesson
Markov Assumption
=28)
Yes, the answer is correct.
Quiz: Week 2 : Score: 1
Assignment 2 Accepted Answers:
(assessment? Markov Assumption
name=117)

4) In a trigram language model, which of the following is a correct example of linear 1 point
Week 3 ()
interpolation?

Week 4 () P(wi∣wi−2,wi−1)=λ1P(wi∣wi−2,wi−1)
P(wi∣wi−2,wi−1)=λ1P(wi∣wi−2,wi−1)+λ2P(wi∣wi−1)+λ3P(wi)
Week 5 ()
P(wi∣wi−2,wi−1)=max(P(wi∣wi−2,wi−1),P(wi∣wi−1))
Week 6 () P(wi∣wi−2,wi−1)=P(wi)P(wi−1)/P(wi−2)

Yes, the answer is correct.


Week 7 () Score: 1
Accepted Answers:
Week 8 () P(wi∣wi−2,wi−1)=λ1P(wi∣wi−2,wi−1)+λ2P(wi∣wi−1)+λ3P(wi)

Week 9 () 5) A trigram model is equivalent to which order Markov model? 1 point

3
Week 10 ()
2
Week 11 () 1
4
Week 12 ()
Yes, the answer is correct.
Score: 1
Year 2025
Accepted Answers:
July Solution 2
()

6) Which smoothing technique leverages the number of unique contexts a word appears 1 point
in?

Good-Turing
Add-k
Kneser-Ney
Absolute Discounting

[Link] 2/3
10/28/25, 1:43 PM Introduction to Large Language Models (LLMs) - - Unit 4 - Week 2

Yes, the answer is correct.


Score: 1
Accepted Answers:
Kneser-Ney
For Question 8 to 9, consider the following corpus:

<s>the sky is blue</s>

<s>birds fly in the sky</s>

<s>the blue birds sing</s>

7) Assuming a bi-gram language model, calculate the probability of the sentence: 2 points
<s>birds fly in the blue sky</s>
Ignore the unigram probability of P(<s>) in your calculation.

2/37
1/27
0
1/36

Yes, the answer is correct.


Score: 2
Accepted Answers:
0

8) Assuming a bi-gram language model, calculate the perplexity of the sentence: 2 points

<s>birds fly in the blue sky</s>

Please do not consider <s>and </s> as words of the sentence.

271/4
271/5
91/6
None of these

Yes, the answer is correct.


Score: 2
Accepted Answers:
None of these

[Link] 3/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 3 : Assignment 3


outline The due date for submitting this assignment has passed.
Due on 2025-08-13, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-08-13, 22:24 IST
How does an 1) In backpropagation, which method is used to compute the gradients? 1 point
NPTEL online
course work? Gradient descent
() Chain rule of derivatives
Matrix factorization
Week 1 ()
Linear regression

Week 2 () Yes, the answer is correct.


Score: 1
Week 3 () Accepted Answers:
Chain rule of derivatives
Lec 05 :
Introduction to 2) Which of the following functions is not differentiable at zero? 1 point
Deep Learning
(unit? Sigmoid
unit=30&lesson Tanh
=31)
ReLU
Lec 06 : Linear
Introduction to
PyTorch (unit? Yes, the answer is correct.
unit=30&lesson
=32)

[Link] 1/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3

Score: 1
Coding file
(unit? Accepted Answers:
unit=30&lesson ReLU
=33)
3) In the context of regularization, which of the following statements is true? 1 point
Feedback Form
(unit? L2 regularization tends to produce sparse weights
unit=30&lesson Dropout is applied during inference to improve accuracy
=34)
L1 regularization adds the squared weight penalties to the loss function
Quiz: Week 3 : Dropout prevents overfitting by randomly disabling neurons during training
Assignment 3
Yes, the answer is correct.
(assessment?
Score: 1
name=118)
Accepted Answers:
Dropout prevents overfitting by randomly disabling neurons during training
Week 4 ()

Week 5 () 4) Which activation function is least likely to suffer from vanishing gradients? 1 point

Tanh
Week 6 ()
Sigmoid

Week 7 () ReLU

Yes, the answer is correct.


Week 8 () Score: 1
Accepted Answers:
Week 9 () ReLU

Week 10 () 5) Which of the following equations correctly represents the derivative of the sigmoid 1 point
function?
Week 11 ()
σ(x) · (1 + σ(x))

Week 12 () σ(x)²
σ(x) · (1 − σ(x))
Year 2025 1 / (1 + e^x)
July Solution
Yes, the answer is correct.
()
Score: 1
Accepted Answers:
σ(x) · (1 − σ(x))

6) What condition must be met for the Perceptron learning algorithm to converge? 1 point

Learning rate must be zero


Data must be non-linearly separable
Data must be linearly separable
Activation function must be sigmoid

Yes, the answer is correct.


Score: 1
Accepted Answers:
Data must be linearly separable

[Link] 2/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3

7) Which of the following logic functions requires a network with at least one hidden layer 1 point
to model?

AND
OR
NOT
XOR
Yes, the answer is correct.
Score: 1
Accepted Answers:
XOR

8) Why is it necessary to include non-linear activation functions between layers in an 1 point


MLP?

Without them, the network is just a linear function


They prevent overfitting
They allow backpropagation to work
Yes, the answer is correct.
Score: 1
Accepted Answers:
Without them, the network is just a linear function

9) What is typically the output activation function for an MLP solving a binary classification 1 point
task?

Tanh
ReLU
Sigmoid
Softmax

Yes, the answer is correct.


Score: 1
Accepted Answers:
Sigmoid

10) Which type of regularization encourages sparsity in the weights? 1 point

L1 regularization
L2 regularization
Dropout
Early stopping

Yes, the answer is correct.


Score: 1
Accepted Answers:
L1 regularization

[Link] 3/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 5 - Week 3

[Link] 4/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 4 : Assignment 4


outline The due date for submitting this assignment has passed.
Due on 2025-08-20, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-08-20, 23:00 IST
How does an 1) A one-hot vector representation captures semantic similarity between related words 1 point
NPTEL online like "king" and "queen".
course work?
() True
False
Week 1 ()
Yes, the answer is correct.
Score: 1
Week 2 () Accepted Answers:
False
Week 3 ()
2) Which method is used to reduce the dimensionality of a term-context matrix in count- 1 point
Week 4 () based word representations?

Lec 07 : Word Principal Component Analysis


Representation
Matrix Inversion
: Word2Vec &
fastText (unit? Singular Value Decomposition (SVD)
unit=36&lesson Latent Dirichlet Allocation
=37)
Yes, the answer is correct.
Lec 08 : Word Score: 1
Representation Accepted Answers:
: GloVe (unit? Singular Value Decomposition (SVD)

[Link] 1/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4

unit=36&lesson
=38)
3) Which property makes tf-idf a better representation than raw term frequency? 1 point

Lec 09 : It is non-linear
Tokenization It accounts for the informativeness of words
Strategies
(unit?
It penalizes longer documents
unit=36&lesson It uses hierarchical clustering
=39)
Yes, the answer is correct.
Lecture
Score: 1
Material (unit? Accepted Answers:
unit=36&lesson It accounts for the informativeness of words
=40)
4) What is the purpose of using negative sampling in Word2Vec training? 1 point
Feedback Form
(unit?
To reduce dimensionality of word vectors
unit=36&lesson
=41) To ensure gradient convergence
To balance class distribution in classification
Quiz: Week 4 :
Assignment 4 To simplify softmax computation
(assessment? Yes, the answer is correct.
name=119) Score: 1
Accepted Answers:
Week 5 () To simplify softmax computation

Week 6 () 5) In skip-gram Word2Vec, the model: 1 point

Week 7 () Predicts a word given its context


Predicts the next sentence
Week 8 ()
Predicts surrounding context words given a target word
Learns n-gram frequencies
Week 9 ()
Yes, the answer is correct.
Week 10 () Score: 1
Accepted Answers:
Predicts surrounding context words given a target word
Week 11 ()

6) Why does SVD-based word embedding struggle with adding new words to the 1 point
Week 12 ()
vocabulary?

Year 2025
It uses online learning
July Solution
() It lacks semantic interpretability
It assumes word order
It is computationally expensive to retrain

Yes, the answer is correct.


Score: 1
Accepted Answers:
It is computationally expensive to retrain

[Link] 2/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4

7) Which of the following best describes the term “distributional hypothesis” in NLP? 1 point

Words with high frequency have greater meaning


Words are defined by their part-of-speech tags
A word’s meaning is characterized by the words around it
Words should be normalized before vectorization

Yes, the answer is correct.


Score: 1
Accepted Answers:
A word’s meaning is characterized by the words around it

8) In Word2Vec, similarity between word vectors is computed using Euclidean distance. 1 point

True
False

Yes, the answer is correct.


Score: 1
Accepted Answers:
False

9) Which method solves the problem of OOV (Out-Of-Vocabulary) words better? 1 point

One-hot encoding
CBOW
Skip-gram with subsampling
FastText embedding

Yes, the answer is correct.


Score: 1
Accepted Answers:
FastText embedding

10) If the word "economy" occurs 4 times in a corpus, and "growth" appears in a window of 1 point
5 words around it 3 times, what is the entry for (economy, growth) in a term-context matrix?

1
2
3
4

Yes, the answer is correct.


Score: 1
Accepted Answers:
3

[Link] 3/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 6 - Week 4

[Link] 4/4
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 5 : Assignment 5


outline The due date for submitting this assignment has passed.
Due on 2025-08-27, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-08-27, 22:53 IST
How does an 1) Which of the following best explains the vanishing gradient problem in RNNs? 1 point
NPTEL online
course work? RNNs lack memory mechanisms for long-term dependencies.
() Gradients grow too large during backpropagation.
Gradients shrink exponentially over long sequences.
Week 1 ()
RNNs cannot process variable-length sequences.

Week 2 () Yes, the answer is correct.


Score: 1
Week 3 () Accepted Answers:
Gradients shrink exponentially over long sequences.

Week 4 ()
2) In an attention mechanism, what does the softmax function ensure? 1 point

Week 5 ()
Normalization of decoder outputs

Lec 10 : Neural Stability of gradients during backpropagation


Language Values lie between -1 and 1
Models: CNN &
Attention weights sum to 1
RNN (unit?
unit=43&lesson Yes, the answer is correct.
=44)

[Link] 1/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5

Score: 1
Lec 11 : Neural
Language Accepted Answers:
Models: LSTM Attention weights sum to 1
& GRU (unit?
3) Which of the following is true about the difference between a standard RNN and an 1 point
unit=43&lesson
LSTM?
=45)

Lec 12 : LSTM does not use any non-linear activation.


Sequence-to- LSTM has a gating mechanism to control information flow.
Sequence
RNNs have fewer parameters than LSTMs because they use convolution.
Models (unit?
unit=43&lesson LSTMs cannot learn long-term dependencies.
=46)
Yes, the answer is correct.
Score: 1
Lec 13 :
Decoding
Accepted Answers:
Strategies
LSTM has a gating mechanism to control information flow.
(unit?
unit=43&lesson 4) Which gate in an LSTM is responsible for deciding how much of the cell state to keep? 1 point
=47)
Forget gate
Lec 14 :
Input gate
Attention in
Sequence-to- Output gate
Sequence Cell candidate gate
Models (unit?
unit=43&lesson Yes, the answer is correct.
Score: 1
=48)
Accepted Answers:
Lecture Forget gate
Material (unit?
unit=43&lesson 5) What improvement does attention bring to the basic Seq2Seq model? 1 point
=55)
Reduces training time
Feedback Form
(unit? Removes the need for an encoder
unit=43&lesson Allows access to all encoder states during decoding
=49)
Reduces the number of model parameters
Quiz: Week 5 :
Yes, the answer is correct.
Assignment 5
Score: 1
(assessment?
Accepted Answers:
name=120)
Allows access to all encoder states during decoding
Week 6 ()
6) Which of the following is a correct statement about the encoder-decoder architecture? 1 point
Week 7 ()
The encoder generates tokens one at a time.
The decoder summarizes the input sequence.
Week 8 ()
The decoder generates outputs based on encoder representations and its own prior outputs.
Week 9 () The encoder stores only the first token of the sequence.

Yes, the answer is correct.


Week 10 ()

[Link] 2/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 7 - Week 5

Score: 1
Week 11 () Accepted Answers:
The decoder generates outputs based on encoder representations and its own prior outputs.
Week 12 ()
7) What is self-attention in Transformers used for? 1 point
Year 2025
To enable sequential computation
July Solution
() To attend to the previous layer’s output
To relate different positions in the same sequence
To enforce fixed-length output

Yes, the answer is correct.


Score: 1
Accepted Answers:
To relate different positions in the same sequence

8) Why are RNNs preferred over fixed-window neural models? 1 point

They have a smaller parameter size.


They can process sequences of arbitrary length.
They eliminate the need for embedding layers.
None of the above.

Yes, the answer is correct.


Score: 1
Accepted Answers:
They can process sequences of arbitrary length.

9) Given the following encoder and decoder hidden states, compute the attention 2 points
scores. (Use dot product as the scoring function)

Encoder hidden states: h1=[7,3], h2=[0,2], h3=[1,4]


Decoder hidden state: s=[0.2,1.5]

0.42, 0.02, 0.56


0.15, 0.53, 0.32
0.64, 0.18, 0.18
0.08, 0.91, 0.01

Yes, the answer is correct.


Score: 2
Accepted Answers:
0.42, 0.02, 0.56

[Link] 3/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 6 : Assignment 6


outline The due date for submitting this assignment has passed.
Due on 2025-09-03, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-09-03, 20:42 IST
How does an 1) RoPE uses additive embeddings like sinusoidal encoding. 1 point
NPTEL online
course work? True
() False

Yes, the answer is correct.


Week 1 () Score: 1
Accepted Answers:
Week 2 () False

Week 3 () 2) Which of the following is true about multi-head attention? 1 point

Week 4 () It increases model interpretability by using a single set of attention weights


Each head operates on different parts of the input in parallel
Week 5 ()
It reduces the number of parameters in the model
Heads are averaged before applying the softmax function
Week 6 ()
Yes, the answer is correct.
Lec 15 : Score: 1
Introduction to Accepted Answers:
Transformer: Each head operates on different parts of the input in parallel
Self & Multi-
Head Attention 3) What is the role of the residual connection in the Transformer architecture? 1 point

[Link] 1/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6

(unit? Improve gradient flow during backpropagation


unit=56&lesson
=57)
Normalize input embeddings
Reduce computational complexity
Lec 16 :
Introduction to Prevent overfitting
Transformer: Yes, the answer is correct.
Positional Score: 1
Encoding and Accepted Answers:
Layer Improve gradient flow during backpropagation
Normalization
(unit? 4) The feedforward network in a Transformer block introduces non-linearity between 1 point
unit=56&lesson attention layers.
=58)
True
Lec 17 :
False
Implementation
of Transformer Yes, the answer is correct.
using PyTorch Score: 1
(unit? Accepted Answers:
unit=56&lesson True
=59)

Lecture
5) The sinusoidal positional encoding uses sine for even dimensions and ___ for odd 1 point
Material (unit? dimensions.
unit=56&lesson
=60) sine
cosine
Feedback Form
(unit? tangent
unit=56&lesson None of these
=61)
Yes, the answer is correct.
Quiz: Week 6 : Score: 1
Assignment 6 Accepted Answers:
(assessment? cosine
name=125)
6) Why is positional encoding added to input embeddings in Transformers? 1 point
Week 7 ()
To provide unique values for each word
Week 8 () To indicate the position of tokens since Transformers are non-sequential
To scale embeddings
Week 9 ()
To avoid vanishing gradients
Week 10 () Yes, the answer is correct.
Score: 1
Week 11 () Accepted Answers:
To indicate the position of tokens since Transformers are non-sequential

Week 12 ()
7) You are given a self-attention layer with input dimension 512, using 8 heads. What is 2 points
Year 2025 the output dimension per head?
July Solution
64

[Link] 2/3
10/28/25, 1:44 PM Introduction to Large Language Models (LLMs) - - Unit 8 - Week 6

() 128
32
256

Yes, the answer is correct.


Score: 2
Accepted Answers:
64

8) For a transformer with dmodel = 512, calculate the positional encoding for position 2 points
p=14 and dimensions 6 and 7 using the sinusoidal formula:

Yes, the answer is correct.


Score: 2
Accepted Answers:

[Link] 3/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 7 : Assignment 7


outline The due date for submitting this assignment has passed.
Due on 2025-09-10, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-09-10, 23:42 IST
How does an 1) Why can a pre-trained BART model be fine-tuned directly for abstractive 1 point
NPTEL online summarization?
course work?
() Its encoder alone is sufficient.
It shares vocabulary with summarization datasets.
Week 1 ()
It uses a larger context window than BERT.
It already contains a generative decoder trained jointly during pre-training.
Week 2 ()
Yes, the answer is correct.
Week 3 () Score: 1
Accepted Answers:
It already contains a generative decoder trained jointly during pre-training.
Week 4 ()

2) For pre-training of encoder-decoder models, which statement(s) is/are true? 2 points


Week 5 ()

The encoder attends bidirectionally to its whole input.


Week 6 ()
The decoder conditions on earlier decoder tokens and encoder outputs.

Week 7 () Unlabelled text is turned into a supervised task via a noising scheme.
Training relies on a next-sentence-prediction loss.
Lec 18 : Pre-
Training
Yes, the answer is correct.
Strategies:
S

[Link] 1/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7

ELMo, BERT Score: 2


(unit? Accepted Answers:
unit=63&lesson The encoder attends bidirectionally to its whole input.
=64) The decoder conditions on earlier decoder tokens and encoder outputs.
Unlabelled text is turned into a supervised task via a noising scheme.
Lec 19 : Pre-
Training 3) Which attention mask(s) prevent(s) a token from looking at future positions? 2 points
Strategies:
Encoder- Causal mask
decoder and
Fully-visible mask
Decoder-only
Models (unit? Prefix-LM mask
unit=63&lesson All of the above
=65)
None of the above
Lec 20 :
Yes, the answer is correct.
Introduction to Score: 2
HuggingFace
Accepted Answers:
(unit?
Causal mask
unit=63&lesson
Prefix-LM mask
=66)

Lecture 4) T5 experiments showed that clean and compact pre-training data can outperform a 1 point
Material (unit? larger but noisier corpus primarily because:
unit=63&lesson
=67) Larger corpora overfit.
Feedback Form Noise forces the model to waste capacity on modelling irrelevant patterns.
(unit? Clean data has longer documents.
unit=63&lesson
Compact data allows bigger batches.
=68)
Yes, the answer is correct.
Quiz: Week 7 : Score: 1
Assignment 7
Accepted Answers:
(assessment?
Noise forces the model to waste capacity on modelling irrelevant patterns.
name=126)

Week 8 () 5) What makes sampling from an auto-regressive language model straightforward? 1 point

The model is deterministic.


Week 9 ()
The vocabulary is small.
Week 10 () Each conditional distribution over the vocabulary is readily normalised and can be sampled
token-by-token.
Week 11 () Beam search guarantees optimality.

Yes, the answer is correct.


Week 12 () Score: 1
Accepted Answers:
Year 2025 Each conditional distribution over the vocabulary is readily normalised and can be sampled
July Solution token-by-token.
()
6) Why does ELMo build its input token representations from a character-level CNN 1 point
instead of fixed word embeddings?

[Link] 2/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 9 - Week 7

To reduce training time by sharing parameters


To avoid UNK tokens and generate representations for any string
To compress embeddings to 128 dimensions
To ensure the same vector for a word in every context

Yes, the answer is correct.


Score: 1
Accepted Answers:
To avoid UNK tokens and generate representations for any string

7)

87

Yes, the answer is correct.


Score: 2
Accepted Answers:
(Type: Numeric) 87

2 points

[Link] 3/3
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 8 : Assignment 8


outline The due date for submitting this assignment has passed.
Due on 2025-09-17, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-09-17, 22:00 IST
How does an 1) In standard instruction tuning with a decoder-only LM, which tokens typically contribute 1 point
NPTEL online to the next-token prediction loss?
course work?
() Only the prompt tokens
Only the response tokens
Week 1 ()
Both prompt and response tokens
Neither
Week 2 ()
loss is computed at the sequence level only
Week 3 () No, the answer is incorrect.
Score: 0
Week 4 () Accepted Answers:
Only the response tokens
Week 5 ()
2) Why can using multiple instruction templates for the same task help? 1 point
Week 6 ()
It only increases the dataset size.

Week 7 () It regularizes the reward model.


It improves generalization by exposing the model to different phrasings of the instruction.
Week 8 () It ensures the same tokenization across tasks.

[Link] 1/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8

Yes, the answer is correct.


Lec 21 :
Score: 1
Instruction
Accepted Answers:
Tuning (unit?
It improves generalization by exposing the model to different phrasings of the instruction.
unit=70&lesson
=71) 3) As the model size grows, what happens to prompt length and initialization sensitivity in 1 point
Lec 22 :
prompt tuning?
Prompt-based
Both matter more.
Learning (unit?
unit=70&lesson Both matter less.
=72) Length matters less but initialization matters more.
Lec 23 : Initialization matters less but length matters more.
Advanced
Yes, the answer is correct.
Prompting and
Score: 1
Prompt
Accepted Answers:
Sensitivity
Both matter less.
(unit?
unit=70&lesson
=73) 4) Which of the following statement(s) is/are true about the POSIX metric for quantifying 1 point
prompt sensitivity?
Lec 24 :
Alignment of POSIX is independent of the correctness of the generated responses and captures
Language sensitivity as a property independent of correctness
Models-I (unit?
POSIX is a length-normalized metric
unit=70&lesson
=74) POSIX compares the generated responses against the ground-truth to quantify prompt
sensitivity
Lec 25 :
Alignment of POSIX captures the variance in the log-likelihood of the same response for different input
Language prompt variations
Models-II (unit?
Yes, the answer is correct.
unit=70&lesson Score: 1
=75) Accepted Answers:
Lecture
POSIX is independent of the correctness of the generated responses and captures sensitivity as
Material (unit? a property independent of correctness
unit=70&lesson POSIX is a length-normalized metric
=82) POSIX captures the variance in the log-likelihood of the same response for different input prompt
variations
Feedback Form
(unit?
unit=70&lesson 5) Which statement is true about prompt sensitivity as captured by POSIX? 1 point
=76)
Larger models always have lower prompt sensitivity than smaller ones.
Quiz: Week 8 :
Larger models always have higher prompt sensitivity than smaller ones.
Assignment 8
(assessment? Prompt sensitivity decreases for models with a parameter count above a certain threshold.
name=127) Increasing parameter count does not necessarily reduce prompt sensitivity.

Week 9 () Yes, the answer is correct.


Score: 1
Accepted Answers:
Week 10 () Increasing parameter count does not necessarily reduce prompt sensitivity.

[Link] 2/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8

6) In training a reward model with pairwise preferences (x, y+, y-), the Bradley-Terry style 1 point
Week 11 ()
objective encourages:

Week 12 () Maximizing rθ (x,y- ) - rθ (x,y+ )


Minimizing the entropy of the policy
Year 2025
July Solution Maximizing log⁡σ (rθ (x,y+ ) - rθ (x,y- ))
() Setting rθ (x,y) equal to the log-probability under πref
Yes, the answer is correct.
Score: 1
Accepted Answers:
Maximizing log⁡σ (rθ (x,y+ ) - rθ (x,y- ))

7) Which of the following are recommended while performing REINFORCE-style policy 1 point
optimization?

Use the log-derivative trick to obtain an unbiased gradient estimator.


Weight token-level log-probs by the advantage function to reduce variance.
Use importance weights and clip them when sampling from a fixed policy.
Avoid any clipping to preserve gradient magnitude.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Use the log-derivative trick to obtain an unbiased gradient estimator.
Weight token-level log-probs by the advantage function to reduce variance.
Use importance weights and clip them when sampling from a fixed policy.

8) Which method combines reward maximization and minimizing KL divergence? 1 point

REINFORCE
Monte Carlo Approximation
Proximal Policy Optimization
Constitutional AI

Yes, the answer is correct.


Score: 1
Accepted Answers:
Proximal Policy Optimization

9) Which of the following is the reason for performing alignment beyond instruction tuning 1 point
in LLMs?

Instruction tuning guarantees safety on harmful queries.


Alignment can prevent outputs that a model might otherwise deem correct, but humans find
unacceptable.
Alignment is only needed for small models.
Instruction tuning already optimizes a human preference model.

[Link] 3/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 10 - Week 8

Yes, the answer is correct.


Score: 1
Accepted Answers:
Alignment can prevent outputs that a model might otherwise deem correct, but humans find
unacceptable.

10) Let πθ be the probability of choosing token at in state st assigned by the current policy 1 point
being optimized, πk be that by the old/reference policy and ∈ > 0 be the clip parameter. When the
token-level advantage At is positive, PPO-CLIP maximizes which of the following expression at step
t?

max ⁡(πθ/πk , 1 - ∈) At
max ⁡(πk/πθ ,1-∈) At
min ⁡(πk/πθ ,1+∈) At
min ⁡(πθ/πk ,1+∈) At

Yes, the answer is correct.


Score: 1
Accepted Answers:
min ⁡(πθ/πk ,1+∈) At

[Link] 4/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 9 : Assignment 9


outline The due date for submitting this assignment has passed.
Due on 2025-09-24, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-09-24, 23:37 IST
How does an 1) In the knowledge-graph training pipeline that models P(o ∣ s, r) with a softmax over all 1 point
NPTEL online entities, what practical difficulty motivates the use of negative sampling?
course work?
() The softmax is undefined for KG scores.
The denominator sums over all entities, which is computationally expensive.
Week 1 ()
The numerator requires the full adjacency list for each relation.
The scores must be normalized per relation rather than globally.
Week 2 ()
Yes, the answer is correct.
Week 3 () Score: 1
Accepted Answers:
The denominator sums over all entities, which is computationally expensive.
Week 4 ()

2) Which statements correctly characterize the local closed-world assumption in KG 1 point


Week 5 ()
training with negative sampling?

Week 6 ()
Any unobserved triple is treated as false for training purposes.
It is strictly correct because KGs are exhaustive.
Week 7 ()
It helps training but may mislabel genuinely missing positives as negatives.
Week 8 () It eliminates the need for development/test splits.

[Link] 1/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9

Yes, the answer is correct.


Week 9 () Score: 1
Accepted Answers:
Lec 26 : Any unobserved triple is treated as false for training purposes.
Knowledge and It helps training but may mislabel genuinely missing positives as negatives.
Retrieval:
Knowledge 3) For discriminative training, why is it infeasible to enforce all constraints f(s, r, o) ≥ m + 1 point
Graph (unit? f(s′,r,o′) over every possible negative triple?
unit=83&lesson
=84) The number of possible facts is O(E2R), overwhelmingly larger than positives.

Lec 27 : Because scores cannot be compared across relations.


Knowledge and Because margins must be tuned per entity.
Retrieval:
Because negatives are always ambiguous.
Knowledge
Graph Yes, the answer is correct.
Completion and Score: 1
Evaluation Accepted Answers:
(unit? The number of possible facts is O(E2R), overwhelmingly larger than positives.
unit=83&lesson
=85) 4) Which statement best describes score polarity in KG models? 1 point
Lec 28 :
Scores must always be larger for false triples.
Knowledge and
Retrieval: Score polarity is fixed by the dataset.
Translation and Some models use higher scores for more plausible triples, others use lower, and
Rotation probabilities/losses can be adapted accordingly.
Models (unit?
unit=83&lesson
Polarity only matters for RotatE
=86) Yes, the answer is correct.
Score: 1
Lecture
Accepted Answers:
Material (unit?
Some models use higher scores for more plausible triples, others use lower, and
unit=83&lesson
probabilities/losses can be adapted accordingly.
=89)

Feedback Form 5) Compared to semantic interpretation (logical-form execution), a differentiable KGQA 1 point
(unit? system:
unit=83&lesson
=87) Requires a hand-coded logical form for every question.
Quiz: Week 9 : Cannot be trained end-to-end.
Assignment 9 Provides complete interpretability of reasoning steps.
(assessment?
name=128)
Learns dense question and graph embeddings and uses cross-attention to align them.
Yes, the answer is correct.
Week 10 () Score: 1
Accepted Answers:
Week 11 () Learns dense question and graph embeddings and uses cross-attention to align them.

Week 12 () 6) Which statements correctly describe filtered evaluation? 1 point

Year 2025 It removes candidates that are true facts in train/dev from the ranked list before scoring the
July Solution test query.

[Link] 2/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9

() It increases fairness by not penalizing the model for ranking another correct answer that
happened to be in training data.
It always decreases MRR.
It affects measures like MRR and MAP.

Yes, the answer is correct.


Score: 1
Accepted Answers:
It removes candidates that are true facts in train/dev from the ranked list before scoring the test
query.
It increases fairness by not penalizing the model for ranking another correct answer that
happened to be in training data.
It affects measures like MRR and MAP.

7) Which of the following best captures the motivation for KG completion? 1 point

KGs are complete, KG completion mainly compresses them.


Manual curation keeps KGs fully up-to-date.
KGs are useful but incomplete, so we learn embeddings and a scoring function to infer
missing facts.
KG completion is only for alignment across languages.

Yes, the answer is correct.


Score: 1
Accepted Answers:
KGs are useful but incomplete, so we learn embeddings and a scoring function to infer missing
facts.

8) Consider pairwise hinge/ReLU loss for discriminative training with margin m: max{ 0, m 1 point
+ f(s’k , r, o’k) − f(s, r, o) }. When does this loss become exactly zero for a given negative (s’k , r,
o’k)?

When f(s, r, o) ≥ m + f(s’k , r, o’k)


When f(s, r, o) = f(s’k , r, o’k)
When f(s’k , r, o’k) ≥ m + f(s, r, o)
Only when m = 0

Yes, the answer is correct.


Score: 1
Accepted Answers:
When f(s, r, o) ≥ m + f(s’k , r, o’k)

9) Uniform negative sampling can introduce an extra bias unless you do which of the 1 point
following when forming the sampled denominator?

Exclude the true object o from the denominator.


Normalize scores per relation type.
Sample only from entities not connected to s.
Always include the true object o in the denominator.

[Link] 3/4
10/28/25, 1:45 PM Introduction to Large Language Models (LLMs) - - Unit 11 - Week 9

Yes, the answer is correct.


Score: 1
Accepted Answers:
Always include the true object o in the denominator.

10) Which of the following is the RotatE scoring function? 1 point

f(s, r, o) = ‖s+r−o‖²
f(s, r, o) = ‖s⊙r−o‖², where r lies on the unit circle element-wise
f(s, r, o) = sᵀRᵣo with Rᵣ orthonormal
f(s, r, o) = −⟨s, r, o⟩

Yes, the answer is correct.


Score: 1
Accepted Answers:
f(s, r, o) = ‖s⊙r−o‖², where r lies on the unit circle element-wise

[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 10 : Assignment 10


outline The due date for submitting this assignment has passed.
Due on 2025-10-01, 23:59 IST.
About NPTEL As per our records you have not submitted this assignment.
()
1) How do Prefix Tuning and Adapters differ in terms of where they inject new task- 1 point
specific parameters in the Transformer architecture?
How does an
NPTEL online
Prefix Tuning adds new feed-forward networks after every attention block, while Adapters
course work?
prepend tokens.
()
Both approaches modify only the final output layer but in different ways.
Week 1 () Prefix Tuning learns trainable “prefix” hidden states at each layer’s input, whereas Adapters
insert small bottleneck modules inside the Transformer blocks.
Week 2 () Both approaches rely entirely on attention masks to inject new task-specific knowledge.

No, the answer is incorrect.


Week 3 () Score: 0
Accepted Answers:
Week 4 () Prefix Tuning learns trainable “prefix” hidden states at each layer’s input, whereas Adapters insert
small bottleneck modules inside the Transformer blocks.
Week 5 ()
2) The Structure-Aware Intrinsic Dimension (SAID) improves over earlier low-rank 1 point
Week 6 () adaptation approaches by:

Week 7 () Ignoring the network structure entirely


Learning one scalar per layer for layer-wise scaling
Week 8 () Sharing the same random matrix across all layers
Using adapters within self-attention layers

[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10

No, the answer is incorrect.


Week 9 () Score: 0
Accepted Answers:
Week 10 () Learning one scalar per layer for layer-wise scaling

Lec 29 :
3) Which of the following are correct about the extensions of LoRA? 1 point
Parameter
LongLoRA supports inference on longer sequences using global attention
Efficient Fine-
Tuning (PEFT) QLoRA supports low-rank adaptation on 4-bit quantized models
(unit? DyLoRA automatically selects the optimal rank during training
unit=90&lesson
=92)
LoRA+ introduces gradient clipping to stabilize training

No, the answer is incorrect.


Lec 30 :
Score: 0
Quantization,
Accepted Answers:
Pruning &
QLoRA supports low-rank adaptation on 4-bit quantized models
Distillation
DyLoRA automatically selects the optimal rank during training
(unit?
unit=90&lesson
=93) 4) Which pruning technique specifically removes weights with the smallest absolute 1 point
values first, potentially followed by retraining to recover accuracy?
Lec 31 : An
Alternate Magnitude Pruning
Formulation of
Structured Pruning
Transformers:
Residual Random Pruning
Stream Knowledge Distillation
Perspective
(unit? No, the answer is incorrect.
unit=90&lesson
Score: 0
=94) Accepted Answers:
Magnitude Pruning
Lec 32 :
Interpretability
5) In Post-Training Quantization (PTQ) for LLMs, why is a calibration dataset used? 1 point
Techniques
(unit? To precompute the entire attention matrix for all tokens.
unit=90&lesson
=95)
To remove outlier dimensions before applying magnitude-based pruning.
To fine-tune the entire model on a small dataset and store the new weights.
Lecture
Material (unit? To estimate scale factors for quantizing weights and activations under representative data
unit=90&lesson conditions.
=97)
No, the answer is incorrect.
Score: 0
Feedback Form
Accepted Answers:
(unit?
To estimate scale factors for quantizing weights and activations under representative data
unit=90&lesson
=96) conditions.

Quiz: Week 10
6) Which best summarizes the function of the unembedding matrix WU? 1 point
: Assignment
10 It merges the queries and keys for each token before final classification.
(assessment?
name=129)
It converts the final residual vector into vocabulary logits for next-token prediction.
It is used for normalizing the QK and OV circuits so that their norms match.

[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10

Week 11 () It acts as a second attention layer that aggregates multiple heads

No, the answer is incorrect.


Week 12 () Score: 0
Accepted Answers:
It converts the final residual vector into vocabulary logits for next-token prediction.
Year 2025
July Solution 7) Which definition best matches an induction head as discovered in certain Transformer 1 point
() circuits?

A head that specifically attends to punctuation tokens to determine sentence boundaries


A feed-forward sub-layer specialized for outputting next-token probabilities for out-of-
distribution tokens
A head that looks for previous occurrences of a token A, retrieves the token B that followed it
last time, and then predicts B again
A masking head that prevents the model from looking ahead at future tokens

No, the answer is incorrect.


Score: 0
Accepted Answers:
A head that looks for previous occurrences of a token A, retrieves the token B that followed it last
time, and then predicts B again

8) In mechanistic interpretability, how can we define ‘circuit’? 1 point

A data pipeline for collecting training examples in an autoregressive model


A small LSTM module inserted into a Transformer for additional memory
A device external to the neural network used to fine-tune certain parameters after training
A subgraph of the neural network hypothesized to implement a specific function or behaviour
No, the answer is incorrect.
Score: 0
Accepted Answers:
A subgraph of the neural network hypothesized to implement a specific function or behaviour

9) Which best describes the role of Double Quantization in QLoRA? 1 point

It quantizes the attention weights twice to achieve 1-bit representations.


It reinitializes parts of the model with random bit patterns for improved regularization.
It quantizes the quantization constants themselves for additional memory savings.
It systematically reverts partial quantized weights back to FP16 whenever performance
degrades.

No, the answer is incorrect.


Score: 0
Accepted Answers:
It quantizes the quantization constants themselves for additional memory savings.

10) Which of the following are true about sequence-level distillation for LLMs? 1 point

[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 12 - Week 10

It trains a student model by matching the teacher’s sequence outputs (e.g., predicted token
sequences) rather than just individual token distributions.
It requires storing only the top-1 predictions from the teacher model for each token.
It can be combined with word-level distillation to transfer both local and global knowledge.
It forces the teacher to produce a chain-of-thought explanation for each example.

No, the answer is incorrect.


Score: 0
Accepted Answers:
It trains a student model by matching the teacher’s sequence outputs (e.g., predicted token
sequences) rather than just individual token distributions.
It can be combined with word-level distillation to transfer both local and global knowledge.

[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 11 : Assignment 11


outline The due date for submitting this assignment has passed.
Due on 2025-10-08, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-10-08, 23:03 IST
How does an 1) Assume that you build a document–term matrix M (rows: documents; columns: words) 1 point
NPTEL online and take its thin SVD M = U Σ Vᵀ. Which statement is most accurate for interpreting V in classical
course work? Latent Semantic Analysis (LSA)?
()
Columns of V (and rows of Vᵀ) give low-dimensional word representations that capture co-
Week 1 () occurrence similarity.
V gives only document embeddings, words are in U.
Week 2 ()
V and U are not orthonormal in LSA.
Σ can be ignored without affecting similarity.
Week 3 ()
Yes, the answer is correct.
Week 4 () Score: 1
Accepted Answers:
Columns of V (and rows of Vᵀ) give low-dimensional word representations that capture co-
Week 5 ()
occurrence similarity.

Week 6 ()
2) Which statements correctly characterize the basic DistMult approach for knowledge 1 point
graph completion?
Week 7 ()
Each relation 𝑟 is parameterized by a full D×D matrix that can capture asymmetric relations.
Week 8 ()
The relation embedding is a diagonal matrix, leading to a multiplicative interaction of entity
embeddings.

[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11

Week 9 () DistMult struggles with non-symmetric relations because score(s, r, o) = asT Mr ao is


inherently symmetric in s and o.
Week 10 () DistMult’s performance is typically tested only on fully symmetric KGs.

Yes, the answer is correct.


Week 11 () Score: 1
Accepted Answers:
Lec 33 : The relation embedding is a diagonal matrix, leading to a multiplicative interaction of entity
Knowledge and embeddings.
Retrieval:
DistMult struggles with non-symmetric relations because score(s, r, o) = asT Mr ao is inherently
Multiplicative
symmetric in s and o.
models (unit?
unit=98&lesson 3) Given a doc–term matrix M, what do MᵀM and MMᵀ capture? 1 point
=100)
MᵀM: word–word co-occurrence similarity across documents
Lec 34 :
Knowledge and MMᵀ: document–document similarity via shared terms
Retrieval: Both are identity matrices by construction
Modeling
MᵀM counts how often a word appears in the corpus total
Hierarchies
(unit? Yes, the answer is correct.
unit=98&lesson Score: 1
=101) Accepted Answers:
MᵀM: word–word co-occurrence similarity across documents
Lec 35 :
MMᵀ: document–document similarity via shared terms
Knowledge and
Retrieval:
Temporal 4) Which best describes the main advantage of using a factorized representation (e.g., 1 point
Knowledge DistMult, ComplEx) for large KGs?
Graphs (unit?
unit=98&lesson It enforces that every relation in the KG be perfectly symmetric.
=102) It ensures each entity is stored as a one-hot vector, simplifying nearest-neighbour queries.

Lecture It collapses the entire KG into a single scalar value.


Material (unit? It significantly reduces parameters and enables generalization to unseen triples by capturing
unit=98&lesson low-rank structure.
=103)
Yes, the answer is correct.
Feedback Form Score: 1
(unit? Accepted Answers:
unit=98&lesson It significantly reduces parameters and enables generalization to unseen triples by capturing low-
=104) rank structure.
Quiz: Week 11
: Assignment 5) Which statement best describes the reshaping of a 3D KG tensor X ∈R|E|×|R|×|E| into a 1 point
11 matrix factorization problem?
(assessment?
name=130) One axis remains for subject, one axis remains for object, and relations are combined into a
single expanded axis.
Week 12 () The subject dimension is repeated to match the relation dimension, resulting in a 2D matrix.
Each subject–relation pair is collapsed into a single dimension, while objects remain as
Year 2025
separate entries.
July Solution
() The entire KG is vectorized into a 1D array and then factorized with an SVD approach.

[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11

Yes, the answer is correct.


Score: 1
Accepted Answers:
Each subject–relation pair is collapsed into a single dimension, while objects remain as separate
entries.

6) SimplE addresses asymmetry by: 1 point

Using separate subject and object embeddings per entity and including inverse relations,
with an averaged score over the two directions
Constraining relation vectors to unit modulus
Replacing dot-products by max-pooling
Removing inverse relations entirely

Yes, the answer is correct.


Score: 1
Accepted Answers:
Using separate subject and object embeddings per entity and including inverse relations, with an
averaged score over the two directions

7) Which of the following statements correctly describe hyperbolic (Poincare) embeddings 1 point
for hierarchical data?

They map nodes onto a disk (or ball) such that large branching factors can be represented
with lower distortion than in Euclidean space.
Distance grows slowly near the center and becomes infinite near the boundary, making it
naturally suited for tree-like structures.
They require each node to be embedded on the surface of the Poincare disk of radius 1.
They can achieve arbitrarily low distortion embeddings for trees with the same dimension as
Euclidean space.

No, the answer is incorrect.


Score: 0
Accepted Answers:
They map nodes onto a disk (or ball) such that large branching factors can be represented with
lower distortion than in Euclidean space.
Distance grows slowly near the center and becomes infinite near the boundary, making it
naturally suited for tree-like structures.

8) Why might a partial-order-based approach (like order embeddings) be beneficial for 1 point
modelling ‘is-a’ relationships compared to purely distance-based approaches?

They explicitly encode the ancestor–descendant relation as a coordinate-wise inequality or


containment.
They can represent negative correlations (i.e., sibling vs. ancestor) more easily than
distance metrics.
They inherently guarantee transitive closure of the hierarchy in the learned embedding
space.

[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 13 - Week 11

They do not rely on pairwise distances but use a notion of coordinate-wise ordering or
interval containment.

No, the answer is incorrect.


Score: 0
Accepted Answers:
They explicitly encode the ancestor–descendant relation as a coordinate-wise inequality or
containment.
They do not rely on pairwise distances but use a notion of coordinate-wise ordering or interval
containment.

9) Which statement about box embeddings in hierarchical modelling is most accurate? 1 point

Each entity or type is assigned a single real-valued vector, ignoring bounding volumes.
Containment Ix ⊆ Iy all dimensions encodes x≺y .
They rely on spherical distances around a central node to measure tree depth.
They cannot be used to represent set intersections or partial overlap.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Containment Ix ⊆ Iy all dimensions encodes x≺y .

10) For order embeddings with axis-aligned open cones: 1 point

Represent each item x by apex ux ; encode x ≺ y as ux ≥ uy (element-wise).


Positive loss encourages all dimensions to satisfy the order ; negative loss enforces at least
one dimension to violate it.
All cones (and their intersections) have the same measure in this construction.
This makes modeling negative correlation between sibling types difficult.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Represent each item x by apex ux ; encode x ≺ y as ux ≥ uy (element-wise).
Positive loss encourages all dimensions to satisfy the order ; negative loss enforces at least one
dimension to violate it.
All cones (and their intersections) have the same measure in this construction.
This makes modeling negative correlation between sibling types difficult.

[Link] 4/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12

([Link] ([Link]

shahkartik369@[Link] 

NPTEL ([Link] » Introduction to Large Language Models (LLMs)

(course)

Course Week 12 : Assignment 12


outline The due date for submitting this assignment has passed.
Due on 2025-10-15, 23:59 IST.
About NPTEL
()
Assignment submitted on 2025-10-15, 15:00 IST
How does an 1) Which statements correctly characterize “bias” in the context of LLMs? 1 point
NPTEL online
course work? 1. Bias can generate objectionable or stereotypical views in model outputs.
() 2. Bias is always intentionally introduced by malicious data curators.
3. Bias can cause harmful real-world impacts such as reinforcing discrimination.
Week 1 () 4. Bias only affects low-resource languages; high-resource languages are unaffected.

Week 2 () 1 and 2
1 and 3
Week 3 ()
2 and 4
1, 3, and 4
Week 4 ()
Yes, the answer is correct.
Week 5 () Score: 1
Accepted Answers:
1 and 3
Week 6 ()

2) The Stereotype Score (ss) refers to: 1 point


Week 7 ()
The frequency with which a language model rejects biased associations.
Week 8 ()
The measure of how often a model’s predictions are meaningless as opposed to meaningful.
A ratio of positive sentiment to negative sentiment in model outputs.

[Link] 1/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12

Week 9 () The proportion of examples in which a model chooses a stereotypical association over an
anti-stereotypical one.
Week 10 () Yes, the answer is correct.
Score: 1
Week 11 () Accepted Answers:
The proportion of examples in which a model chooses a stereotypical association over an anti-
stereotypical one.
Week 12 ()
3) Which of the following are prominent sources of bias in LLMs? 1 point
Lec 36 :
Responsible
1. Improper selection of training data leading to skewed distributions.
LLMs (unit?
unit=105&lesso 2. Reliance on older datasets causing “temporal bias.”
n=106) 3. Overemphasis on low-resource languages causing “linguistic inversion.”
4. Unequal focus on high-resource languages resulting in “cultural bias.”
Lec 37 :
Conclusion: 1 and 2 only
Expert Panel
2 and 3 only
Discussion
(unit? 1, 2, and 4
unit=105&lesso 1, 3, and 4
n=107)
Yes, the answer is correct.
Lecture Score: 1
Material (unit? Accepted Answers:
unit=105&lesso 1, 2, and 4
n=108)

Feedback Form 4) In the context of bias mitigation based on adversarial triggers, which best describes the 1 point
(unit? goal of prepending specially chosen tokens to prompts?
unit=105&lesso
n=109) To directly fine-tune the model parameters to remove bias
To override all prior knowledge in a model, effectively “resetting” it
Quiz: Week 12
: Assignment To exploit the model’s distributional patterns, thereby neutralizing or flipping biased
12 associations in generated text
(assessment? To randomly shuffle the tokens so that the model becomes more robust
name=131)
Yes, the answer is correct.
Year 2025 Score: 1
July Solution Accepted Answers:
() To exploit the model’s distributional patterns, thereby neutralizing or flipping biased associations
in generated text

5) Which of the following best describes the “regard” metric? 1 point

It is a measure of how well a model can explain its internal decision process.
It is a measurement of a model’s perplexity on demographically sensitive text.
It is the proportion of times a model self-corrects discriminatory language.
It is a classification label reflecting the attitude towards a demographic group in the
generated text.

[Link] 2/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12

Yes, the answer is correct.


Score: 1
Accepted Answers:
It is a classification label reflecting the attitude towards a demographic group in the generated
text.

6) Which of the following steps compose the approach for improving response safety via 1 point
in-context learning?

Retrieving safety demonstrations similar to the user query.


Fine-tuning the model with additional labeled data after generation.
Providing retrieved demonstrations as examples in the prompt to guide the model’s
response generation.
Sampling multiple outputs from LLMs and choosing the majority opinion.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Retrieving safety demonstrations similar to the user query.
Providing retrieved demonstrations as examples in the prompt to guide the model’s response
generation.

7) Which statement(s) is/are correct about how high-resource (HRL) vs. low-resource 1 point
languages (LRL) affect model training?

LRLs typically have higher performance metrics due to smaller population sizes.
HRLs get more data, so the model might overfit to HRL cultural perspectives.
LRLs are often under-represented, leading to potential underestimation of their cultural
nuances.
The dominance of HRLs can cause a reinforcing cycle that perpetuates imbalance.

Yes, the answer is correct.


Score: 1
Accepted Answers:
HRLs get more data, so the model might overfit to HRL cultural perspectives.
LRLs are often under-represented, leading to potential underestimation of their cultural nuances.
The dominance of HRLs can cause a reinforcing cycle that perpetuates imbalance.

8) The “Responsible LLM” concept is stated to address: 1 point

Only the bias in LLMs


A set of concerns including explainability, fairness, robustness, and security
Balancing training costs with carbon footprint
Implementation of purely rule-based safety filters

Yes, the answer is correct.


Score: 1
Accepted Answers:
A set of concerns including explainability, fairness, robustness, and security

[Link] 3/4
10/28/25, 1:46 PM Introduction to Large Language Models (LLMs) - - Unit 14 - Week 12

9) Within the StereoSet framework, the icat metric specifically refers to: 1 point

The ratio of anti-stereotypical associations to neutral associations


The percentage of times a model refuses to generate content deemed hateful
A measure of domain coverage across different demographic groups
A balanced metric capturing both a model’s language modelling ability and the tendency to
avoid stereotypical bias
Yes, the answer is correct.
Score: 1
Accepted Answers:
A balanced metric capturing both a model’s language modelling ability and the tendency to avoid
stereotypical bias

10) Bias due to improper selection of training data typically arises in LLMs when: 1 point

Data are selected exclusively from curated, balanced sources with equal representation
The language model sees only real-time social media feeds without any historical texts
The training corpus over-represents some topics or groups, creating a skewed distribution
All data are automatically filtered to remove any demographic markers

Yes, the answer is correct.


Score: 1
Accepted Answers:
The training corpus over-represents some topics or groups, creating a skewed distribution

[Link] 4/4

Common questions

Powered by AI

The Markov assumption allows n-gram models to assume that the probability of a word given its predecessors depends only on the most recent predecessor(s). This assumption simplifies the computation by reducing the dependence from the entire history to a fixed number of preceding words, typically two in the case of trigrams .

Positional encoding is introduced to indicate the position of tokens because transformers process sequences in parallel rather than sequentially. By adding unique positional information to each token embedding, the model can distinguish and utilize the order of tokens, which is crucial for capturing the structural relationship of the sequence .

Multi-head attention allows the transformer to focus on different positions within the input sequence simultaneously. Each head processes the input in parallel, capturing multiple relationships and enabling the model to gain a richer understanding of the sequence. This parallel processing improves the model's ability to represent the input context, thus enhancing its overall interpretability and performance .

The feedforward network introduces non-linearity between attention layers in a transformer. This non-linearity allows the model to transform inputs through complex functions and adds depth, enabling more sophisticated pattern recognition and learning capabilities, which improves the overall performance of the model .

Negative sampling addresses the computational challenge of the large denominator in the softmax function, which sums over all entities in the knowledge graph, making it computationally expensive. By sampling a small number of negative examples, it reduces the computational burden significantly while maintaining the quality of training .

The dot product is used to compute attention scores because it efficiently measures the similarity between vectors, which correlates to relevance in transformers and other attention-based models. By scaling the result, it helps to control gradient behavior and captures the interactions across different layers, making it a crucial component in attention mechanisms .

Self-attention allows transformers to process input sequences by relating different positions of the same sequence to each other. Each token in the input sequence can attend to every other token and gather relevant information, enabling the model to capture long-range dependencies and context effectively .

Differentiable KGQA systems provide the advantage of being trainable end-to-end and do not require hand-coded logical forms for each question. They learn dense embeddings for both questions and the graph while using cross-attention mechanisms for alignment, providing a flexible and scalable method compared to the rigid logical-form execution .

Filtered evaluation improves fairness by removing from the ranked list any candidate facts that are known to be true from the train/dev sets before scoring a test query. This method ensures the model is fairly assessed for its ability to correctly rank new facts, thus enhancing precision in measures like Mean Reciprocal Rank (MRR) and Mean Average Precision (MAP).

Kneser-Ney smoothing is effective because it leverages the number of unique contexts a word appears in, making it more robust in estimating probabilities for infrequent words by distributing a calculated discount among all contexts the word appears in, unlike other techniques which might spread the probability equally across all words .

You might also like