Home / Study library / Data Science and AI Lab / Quiz 2 · Jan 2026 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
Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 Q25 Q26
Question 2 MCQ · 2.0 marks You have two DataFrames:
and
. You want to combine them so that the
resulting DataFrame contains only the employees who belong to a department that exists in
table. Which of the arguments for the
parameter provided in the options should
you use in
to achieve this?
6406536644775. how='outer'
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:
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?
6406536644783. 6406536644784. 6406536644785. 6406536644786. 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:
Which of the following option correctly identifies the missing lines in the order they should appear
to ensure the model trains correctly?
6406536644804. A:
; B:
; C:
6406536644805. A:
; B:
; C:
6406536644806. A:
; B:
; C:
6406536644807. A:
; B:
; C:
A published solution is not available for this question yet.
Report a correction for Q5
Question 6 MCQ · 2.0 marks 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 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:
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.
which of the below option correctly describes the behavior of model with
6406536644836. 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. returns a dictionary mapping each input to its response, requiring
key-based access.
6406536644839. runs each input sequentially exactly like a for-loop using
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. 6406536644841. 6406536644842. 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
6406536644846. Temperature = 0
6406536644847. Temperature = 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. 6406536644858. 6406536644859. 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:
But your state schema expects:
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'?
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
is processed using the following code:
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
will be
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 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
, and the predicted labels are stored in
.
**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.
6406536644792. The
identified by GridSearchCV offers the best performance on
the
from the given choices in
6406536644793. Changing the scoring metric to
can lead to a different set of
hyperparameters returned by
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. 6406536644833. 6406536644834. Output can not be same if the code is run multiple times.
6406536644835. 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:
Which single change would MOST directly improve performance on multi-document synthesis
questions?
6406536644850. Decrease the value of chunk_size.
6406536644851. Increase the value of chunk_size.
6406536644852. Increase the value of chunk_overlap.
6406536644853. Increase the value of k.
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.
Which line correctly adds conditional routing?
6406536644861. 6406536644862. 6406536644863. 6406536644864. 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.
What happens on
6406536644869. Executes the
node and returns the updated state.
6406536644870. Executes the
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