Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : DATA SCIENCE AND AI LAB
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Inscript
Given the following code snippet, how many unique values will be present in the column (Z) of the resulting DataFrame (df)?

Given the following code snippet, how many unique values will be present in the column (Z) of the resulting DataFrame (df)?
Solution
Inscript
What will be the output of the following code?

What will be the output of the following code?
Solution
Inscript
A binary classification model is evaluated on a test set of 10 images, classifying each as either Horse ('H') or Zebra ('Z'). The true labels and the predicted labels are provided below:

What is the precision of the model for the "Horse" class?
A binary classification model is evaluated on a test set of 10 images, classifying each as either Horse ('H') or Zebra ('Z'). The true labels and the predicted labels are provided below:
What is the precision of the model for the "Horse" class?
Solution
Inscript
An agent's ReAct loop performs 1 initial reasoning step, then 3 more reasoning steps (one after each of 3 tool calls) — 4 reasoning steps total for one query. Each reasoning step consumes 250 input tokens + 150 output tokens. What is the total number of tokens consumed by reasoning alone for one query?
An agent's ReAct loop performs 1 initial reasoning step, then 3 more reasoning steps (one after each of 3 tool calls) — 4 reasoning steps total for one query. Each reasoning step consumes 250 input tokens + 150 output tokens. What is the total number of tokens consumed by reasoning alone for one query?
Solution
What will be the output of the following code?

Solution
An ML practitioner is evaluating a classification model by plotting its training and validation loss over 100 epochs. Which of the following statements regarding model evaluation and overfitting is true?
Solution
Which of the following describes the behavior of
in PyTorch regarding the input activation function?
Solution
When defining a custom layer by subclassing
, which method MUST be implemented to define the computation?
Solution
What is the effect of calling
on a network containing
layers?
Solution
What is the primary function of the learnable
token prepended to the input sequence in the original Vision Transformer architecture?
Solution
Which LangChain component is responsible for converting raw LLM responses into structured Python objects?
Solution
With the above configuration, how does the conversation history returned by
Solution
Choose the correct option with respect to the following code snippet:

Solution
Fix the broken chain:

This throws a
at runtime. What is the correct fix? (
is a helper function to format documents.)
This throws a
Solution
A legal-tech startup is building a tool that must always draft contracts using the firm's exact house style - specific clause phrasing, tone, and formatting conventions that must appear identically in every document, regardless of the underlying facts. The firm's knowledge (case law, templates) rarely changes. Which approach is the better primary fit, and why?
Solution
Inscript
Consider the following Python code snippet that defines the true class labels and the predicted probabilities for a batch of four data points:

What will be the output of the code snippet? (Round your answer to two decimal places)
Consider the following Python code snippet that defines the true class labels and the predicted probabilities for a batch of four data points:
What will be the output of the code snippet? (Round your answer to two decimal places)
Solution
Inscript
An RGB image of size
is fed into a standard Vision Transformer (ViT). The image is divided into non-overlapping square patches with a side length of
. Enter the final sequence length
of the token embeddings that is input into the transformer encoder.
An RGB image of size
Solution
Inscript
Consider the following code:

The training dataset contains 960 samples, and there is one GPU.
How many optimizer update steps are performed during training (ignore gradient accumulation and assume
)?
Consider the following code:
The training dataset contains 960 samples, and there is one GPU.
How many optimizer update steps are performed during training (ignore gradient accumulation and assume
Solution
You run the following code using huggingface:

What is the structure of the variable
?
What is the structure of the variable
Solution
What is the output of the following code?

Solution
Using the default f-string template formatter shown above, what happens if the following line is executed?
Solution
Consider the following LangGraph router for an email assistant. The graph should:
- Send high priority emails to
- Send low priority emails to
- Send all other emails to

Which of the following options correctly fills all six blanks?
- Send high priority emails to
- Send low priority emails to
- Send all other emails to
Which of the following options correctly fills all six blanks?
Solution
Consider the following code and select the correct statement:

Which of the following will be contained in
?
Which of the following will be contained in
Solution
A student justifies their chunking choice like this:
"I will set
and
so I get fewer, bigger chunks - that way retrieval is faster since there's less to search through, and I never lose any context since overlap does not matter if chunks are big enough."
What is wrong with this reasoning? (Select all that apply)
"I will set
What is wrong with this reasoning? (Select all that apply)
Solution
Examine the code below, which is meant to build a LangGraph agent: the
node decides whether to call a
or finish, based on
.

Which of the following statements about this code are correct? (Select all that apply)
Which of the following statements about this code are correct? (Select all that apply)
Solution
Shape
Thickness [ / ]
3
All colors