MauryaHub PYQ Practice

Data Science and AI Lab · Quiz 2 · Jan 2026

Data Science and AI Lab · Quiz 2 · Jan 2026

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 25 published solutions

Question 2 MCQ · 2.0 marks

You have two DataFrames:
Source diagram or notation
and
Source diagram or notation
. You want to combine them so that the resulting DataFrame contains only the employees who belong to a department that exists in
Source diagram or notation
table. Which of the arguments for the
Source diagram or notation
parameter provided in the options should you use in
Source diagram or notation
to achieve this?
Source diagram or notation
6406536644775.
how='outer'
6406536644776.
how='left'
6406536644777.
how='inner'
6406536644778.
how='cross'

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 2.0 marks

You have a 'long' DataFrame df containing weather data for different cities:
Source diagram or notation
You want to reshape this so that each City has its own column, with Date as the index. Which command will produce this wide-format table?
6406536644779.
df.columns.tolist()
6406536644780.
df.pivot(index='Date', columns='City', values='Temp')
6406536644781.
df.groupby(['Date', 'City']).sum()
6406536644782.
df.transpose()

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 2.0 marks

What is the output of the following snippet of code?
Source diagram or notation
6406536644783.Source diagram or notation
6406536644784.Source diagram or notation
6406536644785.Source diagram or notation
6406536644786.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 2.0 marks

A student is writing a training loop for a neural network. Consider the following code snippet, where three critical lines are missing:
Source diagram or notation
Which of the following option correctly identifies the missing lines in the order they should appear to ensure the model trains correctly?
6406536644804.
A:
Source diagram or notation
; B:
Source diagram or notation
; C:
Source diagram or notation
6406536644805.
A:
Source diagram or notation
; B:
Source diagram or notation
; C:
Source diagram or notation
6406536644806.
A:
Source diagram or notation
; B:
Source diagram or notation
; C:
Source diagram or notation
6406536644807.
A:
Source diagram or notation
; B:
Source diagram or notation
; C:
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 2.0 marks

Source diagram or notation
6406536644812.
1 - C; 2 - D; 3 - A; 4 - B
6406536644813.
1 - C; 2 - B; 3 - A; 4 - D
6406536644814.
1 - C; 2 - B; 3 - D; 4 - A
6406536644815.
1 - C; 2 - D; 3 - B; 4 - A

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 2.0 marks

Which of the following best describes the logic of Non-Maximum Suppression algorithm used in the YOLO (You Only Look Once) model?
6406536644816.
It calculates the average coordinates of all overlapping boxes to produce a single refined box while suppressing the original set of boxes
6406536644817.
It selects the box with the highest confidence score and suppresses remaining boxes that have high overlap with the selected box
6406536644818.
It maximises the confidence score of boxes that are distant from each other while suppressing the score of overlapping boxes
6406536644819.
It implements a recursive search to merge overlapping boxes into a single box by taking the higher coordinate values at each step

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 2.0 marks

Source diagram or notation
6406536644820.
LoRA will be applied to the entire model, including the embedding layers.
6406536644821.
LoRA will only be applied to the final classification layer of the model.
6406536644822.
LoRA will not be applied to any layer of the model.
6406536644823.
The model will throw an error because an empty list is invalid.

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MCQ · 2.0 marks

Consider the following code:
Source diagram or notation
Which of the following statements is TRUE regarding the output generated by the tokenizer?
6406536644828.
Each sentence will be tokenized independently without any padding because max_length is specified.
6406536644829.
All tokenized sequences in output["input_ids"] will have a length exactly equal to 6.
6406536644830.
The tokenizer will return a list of Python integer.
6406536644831.
Special tokens like [CLS] and [SEP] will not be added because padding is enabled.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 MCQ · 2.0 marks

Consider the following code and answer the following question.
Source diagram or notation
which of the below option correctly describes the behavior of model with
Source diagram or notation
6406536644836.Source diagram or notation
merges all inputs into one combined prompt and returns a single response string.
6406536644837.
The model processes all inputs in a single batch request and returns a list of response objects in the same order as inputs.
6406536644838.Source diagram or notation
returns a dictionary mapping each input to its response, requiring key-based access.
6406536644839.Source diagram or notation
runs each input sequentially exactly like a for-loop using
Source diagram or notation
and returns plain strings instead of response objects.

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MCQ · 2.0 marks

Which of the following code snippets will run successfully given that you have all the required installation, no billing issue, API KEYS are configured correctly, access of all mentioned models is present?
6406536644840.Source diagram or notation
6406536644841.Source diagram or notation
6406536644842.Source diagram or notation
6406536644843.
None of these

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 2.0 marks

A legal chatbot must answer strictly based on internal case documents and should minimize hallucination. Which of the following approaches is MOST suitable?
6406536644844.
Fine-tuning
6406536644845.
RAG
6406536644846.
Temperature = 0
6406536644847.
Temperature = 1
6406536644848.
Top-p = 1
6406536644849.
Top-k = 1

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 2.0 marks

Which analogy best describes RAG vs Fine-Tuning?
6406536644854.
RAG = memorizing textbook, Fine-tuning = Googling
6406536644855.
RAG = Googling before answering, Fine-tuning = learning permanently
6406536644856.
RAG = increasing IQ, Fine-tuning = reading newspaper

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 2.0 marks

A developer wants only the top 2 most relevant chunks retrieved. Which of the following correctly achieves this?
6406536644857.Source diagram or notation
6406536644858.Source diagram or notation
6406536644859.Source diagram or notation
6406536644860.
None of these

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 2.0 marks

You accidentally wrote:
Source diagram or notation
But your state schema expects:
Source diagram or notation
What is the most likely result?
6406536644865.
LLM auto converts input to messages
6406536644866.
Runtime error due to missing state key
6406536644867.
Graph ignores output
6406536644868.
Messages auto populated

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MSQ · 3.0 marks

Which of the following statements are true regarding regularization?
6406536644787.
Regularization can be used when a model overfits, and it typically helps by reducing model complexity
6406536644788.
Ridge regularization can be used to perform feature selection as it forces some weights exactly to zero
6406536644789.
Regularization adds constraints to the model and can lead to an increase in bias while reducing the variance
6406536644790.
Regularization can be used to increase sensitivity of the model to small changes in the input data

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MSQ · 3.0 marks

A student is building a linear regression model. Which of the following code snippets correctly prevents PyTorch from tracking gradients during the evaluation phase? Select all that apply.
6406536644796.
Wrapping the code in a with torch.no_grad(): context manager.
6406536644797.
Setting requires_grad=False on the model parameters manually.
6406536644798.
Calling optimizer.zero_grad() before the forward pass.
6406536644799.
Calling model.eval() before passing the validation data through the model.

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 MSQ · 3.0 marks

When implementing a custom dataset by inheriting from 'torch.utils.data.Dataset', which of the following methods must be overridden to ensure compatibility with a 'DataLoader'?
6406536644800.
getitem
6406536644801.
iter
6406536644802.
len
6406536644803.
init

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 MSQ · 3.0 marks

An image "sample.jpg" with the shape
Source diagram or notation
is processed using the following code:
Source diagram or notation
Which of the following statements regarding the transformation are False?
6406536644808.
The operation fails because the target width and height do not match the original dimensions
6406536644809.
The operation fails because the number of channels is not specified while resizing
6406536644810.
The output from
Source diagram or notation
will be
Source diagram or notation
6406536644811.
The new aspect ratio of the resized image is 1:1

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 MSQ · 3.0 marks

Source diagram or notation
6406536644824.
The sample dataset contains 50 samples.
6406536644825.
The range(0, 500, 10) function selects rows in steps of 10.
6406536644826.
The original dataset is modified after the .select() operation.
6406536644827.
The sample object is of type Dataset.

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 NAT · 3.0 marks

Consider the following code snippet for a multi-class classification problem with three classes: 0, 1, and 2. The ground-truth labels are stored in
Source diagram or notation
, and the predicted labels are stored in
Source diagram or notation
.
Source diagram or notation
**What is the recall score for class 1? (Round off to two decimal places)**

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 MSQ · 2.0 marks

Consider the following code snippet and select the true statements from the options provided.
Source diagram or notation
6406536644792.
The
Source diagram or notation
identified by GridSearchCV offers the best performance on the
Source diagram or notation
from the given choices in
Source diagram or notation
6406536644793.
Changing the scoring metric to
Source diagram or notation
can lead to a different set of hyperparameters returned by
Source diagram or notation
6406536644794.
Based on the configuration provided for GridSearchCV, 48 decision tree models are trained in total
6406536644795.
Based on the configuration provided for GridSearchCV, a total of 48 different hyperparameter combinations are evaluated

A published solution is not available for this question yet.

Report a correction for Q22

Question 23 MCQ · 3.0 marks

Which of the following code snippets will produce the same output every time they are run? (Assume the model and its infrastructure remain unchanged.)
6406536644832.Source diagram or notation
6406536644833.Source diagram or notation
6406536644834.
Output can not be same if the code is run multiple times.
6406536644835.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q23

Question 24 MCQ · 3.0 marks

A RAG system answers direct factual questions well, but struggles when the answer requires piecing together information spread across multiple documents. A developer has the following setup:
Source diagram or notation
Which single change would MOST directly improve performance on multi-document synthesis questions?
6406536644850.
Decrease the value of chunk_size.
Source diagram or notation
6406536644851.
Increase the value of chunk_size.
Source diagram or notation
6406536644852.
Increase the value of chunk_overlap.
Source diagram or notation
6406536644853.
Increase the value of k.
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q24

Question 25 MCQ · 3.0 marks

You are building a simple LangGraph agent that: 1. Starts at the agent node 2. If the LLM response contains a tool call, go to tool 3. Otherwise, end the workflow Fill in the missing line.
Source diagram or notation
Which line correctly adds conditional routing?
6406536644861.Source diagram or notation
6406536644862.Source diagram or notation
6406536644863.Source diagram or notation
6406536644864.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q25

Question 26 MCQ · 3.0 marks

You are building a ReAct style agent using LangGraph.
Source diagram or notation
What happens on
Source diagram or notation
6406536644869.
Executes the
Source diagram or notation
node and returns the updated state.
6406536644870.
Executes the
Source diagram or notation
node directly.
6406536644871.
Raises a runtime error due to missing entry point
6406536644872.
Returns an empty state without executing any node

A published solution is not available for this question yet.

Report a correction for Q26