Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Tools in Data Science
All 2024 papers
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ1 Mark·Choose one option

- AThe numeric part of the order (123, 456, 789, 101)
- BOnly the first character of the order ID (O, O, O, O)
- CThe column will remain unchanged
- DEach character of the order ID will be split into separate cells (O, r, d, e, r, I, D, 1, 2, 3)
- Q2MCQ1 Mark·Choose one option
You and your friend are building a KNN model to classify customers based on their shopping patterns. You use cross-validation to choose K = 6, while your friend guesses and sets K = 2. On the test set, you notice that your friend's model has a much higher training accuracy but much lower test accuracy than yours. Which of the following is the best explanation?
- AYour friend’s model has higher bias than yours
- BYour friend’s model has higher variance and overfits the data
- CYour model underfits the data compared to your friend’s model
- DYour model overfits the data compared to your friend’s model
- Q3MCQ1 Mark·Choose one option
You are running a K-means clustering algorithm on customer segmentation data. Each time you run the model, you get different cluster assignments, making it hard to compare results. Which parameter should you adjust in the kmeans() function to achieve more stable and consistent results?
- Aalgorithm
- Bmax_iter
- Cn_clusters
- Dn_init
- Q4MCQ1 Mark·Choose one option
You are fitting an ARIMA model to a stock price time series. You want to use no moving average component, 5 lags for autoregression, and 1 difference to make the series stationary. Which of the following model specifications should you use?
- AARIMA(..., trend = (5,1,0))
- BARIMA(..., order = (5,1,0))
- CARIMA(..., order = (0,5,1))
- DARIMA(..., trend = (0,5,1))
- Q5MCQ1 Mark·Choose one option
You are debugging a login issue on a website and want to check if the site is setting a "session" cookie properly. In Chrome DevTools, which tab should you open to view the cookies associated with the website?
- AElements
- BNetwork
- CSource
- DApplication
- Q6MCQ1 Mark·Choose one option
You are building a linear regression model to predict house prices based on the number of bedrooms. You obtain a p-value of 0.03 for the coefficient of "number of bedrooms." Which of the following conclusions can you draw?
- AThe relationship between number of bedrooms and house prices is statistically significant
- BThere is no relationship between number of bedrooms and house prices
- CThe analysis is inconclusive
- DThe model is overfitting
- Q7MCQ1 Mark·Choose one option
You have a dataset of customer names that includes duplicates due to inconsistent capitalization and extra whitespace (e.g., 'John Doe', 'JOHN DOE', 'John Doe'). Which of the following tools would be best for cleaning and de-duplicating this data?
- AOpenRefine
- BTableau
- CMySQL
- DMicrosoft Excel
- Q8MCQ1 Mark·Choose one option
You want to check if a button click on a website triggers an API call to the backend. Which tab in Chrome DevTools should you monitor to see the network request?
- AElements
- BConsole
- CSources
- DNetwork
- Q9MCQ1 Mark·Choose one option
You are creating a Streamlit app to display COVID-19 statistics. At the top of the app, you want to display an introductory message explaining the purpose of the app. Which of the following commands will achieve this ?
- Ast.add_text()
- Bst.text()
- Cst.insert_text()
- Dst.display_text()
- Q10MCQ1 Mark·Choose one option
Your manager asks you to share your Tableau file with the sales team so they can see all the visualizations, dashboards, and underlying data. What type of file would you share with them to include everything needed for the team to view the content and access the data?
- AA Microsoft Excel workbook
- BA Tableau workbook file (.twb) containing sheets, dashboards, and stories
- CA Tableau story file (.twb) containing a sequence of sheets and dashboards
- DA Tableau Packaged Workbook (.twbx) including all sheets, dashboards, stories, and data
- Q11MSQ2 Marks·Choose all correct options

- Adata_df.book_genre.unique()
- Bdata_df.book_genre.category_name()
- Cdata_df['book_genre'].distinct()
- Ddata_df['book_genre'].unique()
- Q12MSQ1 Mark·Choose all correct options
You are asked to create an interactive map showing the locations of COVID-19 vaccination centers. Which of the following Python libraries would be most useful for geospatial analysis and visualization?
- AGeopandas
- BQGIS
- CFolium
- DOpenStreetMap
Read the passage below, then answer Q13–Q15
Scenario 1
Reema is working on her project report and decides to use an LLM (like ChatGPT) to generate content for the “Introduction” section of her report. Below is her interaction with the LLM. Reema: "Write an introduction on the impact of AI on employment. Make it sound academic and professional."
LLM:
The rise of artificial intelligence (AI) has significantly transformed employment patterns worldwide. While automation increases productivity and efficiency, it also leads to displacement of certain jobs. Sectors like manufacturing and logistics are experiencing reduced demand for human labor, while jobs requiring creativity, empathy, and complex problem-solving are on the rise. Policymakers and educators are now focusing on reskilling workers to adapt to this change. Based on the above data, answer the given subquestions.
Q13MCQ1 Mark·Choose one optionWhich of the following actions should Reema take to validate the LLM's claims?
- AAsk the LLM to provide sources for the claims it makes.
- BUse trusted sources (like academic journals, industry reports, or government publications) to verify the LLM's information.
- CAssume the LLM is always accurate and submit the report as-is.
- DCopy and paste the same prompt into another LLM (like Bard or Claude) and compare the responses.
- Q14MSQ2 Marks·Choose all correct options
Reema realizes that the LLM's response was too short, and she wants more details for the introduction. She tries the following prompt: "Give a more detailed and comprehensive introduction on the impact of AI on employment. Include key trends, specific examples, and the role of governments in addressing employment issues." The LLM takes longer to generate the response and produces a longer, more detailed introduction.Which of the following is TRUE about how this new prompt impacts usage and costs?
- AThe cost of LLM usage increases as more words are included in the output.
- BThe cost of LLM usage depends only on the number of requests, not the length of the response.
- CThe time it takes for the LLM to generate the output depends on the size of the prompt and the complexity of the instructions.
- DThe time it takes for the LLM is dependent only on the size of the prompt
- Q15MCQ1 Mark·Choose one option
Reema notices that the LLM sometimes produces "generic" and "vague" responses. She wants more specific, detailed, and structured answers. Which of the following prompts would most likely produce a more specific and useful response from the LLM?
- A"Write a detailed introduction on the impact of AI on employment."
- B"List 3 key trends in the impact of AI on employment and provide a real-world example for each."
- C"Discuss how AI impacts employment in different sectors."
- D"Explain the impact of AI on employment."
Read the passage below, then answer Q16–Q20
Scenario 2
Geospatial Distance Calculation for Emergency Response
Background:
As part of the course, you have been introduced with the concept of Haversine formula and its use in distance calculations between two points. The below is a transcript of the conversation between a student in TDS and ChatGPT while they were trying to solve the questions in Graded Assignment 6.
Student-ChatGPT Discussion Thread
Student:
Hi, I have two locations with the following coordinates:
- Location A: Latitude = 40.748817, Longitude = -73.985428
- Location B: Latitude = 40.761293, Longitude = -73.982294
I need to calculate the distance between them. I heard that the Haversine formula can be used for this. Can you help me understand how to do this step-by-step?


Student:
Ah, I see my mistake. I’ll correct the second part and continue with the calculation. Thanks! Assume that the student got the full marks for the answers in Graded Assignment 6. Use the information given in the above conversation to answer the given subquestions for the given scenario.
Emergency Medical Supply Delivery in Storm-Critical Zones
Background:
The city of Hillton has been hit by a severe storm, leading to power outages and road closures. The city’s emergency response team is tasked with delivering medical supplies to four hospitals located in different areas of the city. Due to time constraints, the response team wants to find the most optimal route to minimize travel distance.
The team has access to a file called hospital_locations.csv, which contains the following information:
- Hospital Name
- Business ID
- Latitude
- Longitude
The 4 hospitals in need of supplies are:
1. North Hill Hospital (Business ID: 2103) — (Latitude: 40.7128, Longitude: -74.0060) 2. Eastview Medical Center (Business ID: 2158) — (Latitude: 40.7306, Longitude: -73.9866) 3. Westbrook Hospital (Business ID: 1987) — (Latitude: 40.6995, Longitude: -74.1745) 4. Southend Clinic (Business ID: 2895) — (Latitude: 40.6526, Longitude: -73.9497)
The emergency response team is currently stationed at the Emergency Supply Center at (Latitude: 40.7222, Longitude: -74.0134). The team must deliver supplies to each of the 4 hospitals and return to the supply center.
The goal is to minimize the total distance traveled.
Based on the above data, answer the given subquestions.
Q16MSQ1 Mark·Choose all correct optionsThe first step is to calculate the distance (in meters) between the Emergency Supply Center and each of the 4 hospitals using the Haversine formula. Which of the following is the correct distance (in meters,most closest) from the Emergency Supply Center (Latitude: 40.7222, Longitude: -74.0134) to Eastview Medical Center (Latitude: 40.7306, Longitude: -73.9866)?
- A1,975 meters
- B2,346 meters
- C2,925 meters
- D3,254 meters
- Q17MCQ2 Marks·Choose one option
The response team wants to deliver to the nearest hospital first. Which of the following hospitals is closest to the Emergency Supply Center (Latitude: 40.7222, Longitude: -74.0134)?
- ANorth Hill Hospital (Latitude: 40.7128, Longitude: -74.0060)
- BEastview Medical Center (Latitude: 40.7306, Longitude: -73.9866)
- CWestbrook Hospital (Latitude: 40.6995, Longitude: -74.1745)
- DSouthend Clinic (Latitude: 40.6526, Longitude: -73.9497)
- Q18MCQ2 Marks·Choose one option
The response team has decided to follow the "nearest hospital first" strategy. The team first goes from the Emergency Supply Center to the nearest hospital identified in the previous question, then proceeds to the next closest hospital from there, and so on until all hospitals are served. Based on this strategy, which of the following represents the correct order of hospitals to visit?
- ANorth Hill Hospital → Eastview Medical Center → Southend Clinic → Westbrook Hospital
- BEastview Medical Center → North Hill Hospital → Southend Clinic → Westbrook Hospital
- CNorth Hill Hospital → Southend Clinic → Eastview Medical Center → Westbrook Hospital
- DEastview Medical Center → Southend Clinic → North Hill Hospital → Westbrook Hospital
- Q19MCQ1 Mark·Choose one option
The response team realizes that following the "nearest hospital first" strategy may not be optimal. They consider using a more advanced strategy where they plan the entire route before starting. The team uses geospatial optimization tools to find the shortest route using a "traveling salesperson problem (TSP)" approach. Which of the following tools would be the most appropriate for implementing this route optimization?
- AQGIS to calculate the optimal route using the shortest path network analysis tool.
- BExcel to calculate the distances between each pair of hospitals and identify the optimal route manually.
- CPower BI to visualize the hospital locations on a map and create an optimized route.
- DA TSP algorithm using Python libraries like NetworkX, SciPy, or OR-Tools to calculate the optimal route.
- Q20MCQ1 Mark·Choose one option
Which of the following best describes the purpose of using the Haversine formula in geospatial analysis?
- AIt calculates the distance between two points along a road or path on a map.
- BIt computes the distance between two points along the surface of a sphere.
- CIt measures the Euclidean distance between two points in a Cartesian coordinate system.
- DIt calculates the total travel time between two points based on traffic conditions.
Read the passage below, then answer Q21–Q31
Q21MSQ2 Marks·Choose all correct optionsWhich of the below can be a valid log file entry based on the descriptions provided in the main question?
- A40.77.167.48 - - [30/Apr/2024:07:12:09 -0500] "GET /mplayer2.jsz HTTP/1.1" 200 7416 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" www.s-anand.net 192.254.190.216
- B40.77.167.48 - - [30/Apr/2024:07:12:09 -0500] "POST /mplayer2.jsz HTTP/1.1" 200 7416 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" www.s-anand.net 192.254.190.216
- C40.77.167.48 - - [30-Apr-2024 07:12:09 -0500] "GET /mplayer2.jsz HTTP/1.1" 200 7416 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" www.s-anand.net 192.254.190.216
- D40.77.167.48 - - [30/Apr/2024:07:12:09 -0500] "GET /mplayer2.jsz HTTP/1.1" OK 7416 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" www.s-anand.net 192.254.190.216
- Q22MCQ1 Mark·Choose one option
Which of the following fields are necessary to filter "GET requests made for pages under /telugump3/ from 10:00 until before 21:00 on Saturdays"?
- ATime, Request, URL, Method
- BTime, Request, Status, Size
- CTime, Method, URL, Status
- DTime, Status, URL, Referer
- Q23MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q24MCQ1 Mark·Choose one option
Which of the following methods is best for identifying if a log entry's timestamp corresponds to a Saturday? (timestamp is a method in datetime library)
- A

- B

- C

- D

- A
- Q25MSQ1 Mark·Choose all correct options
How would you identify log entries where the time is between 10:00 and 20:59 on Saturdays?
- A

- B

- C

- D

- A
- Q26MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q27MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q28MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q29MCQ1 Mark·Choose one option
How would you identify if the Status code of a log entry indicates a successful request? (Assume that status is correctly stored in the variable ‘status’)
- A

- B

- C

- D

- A
- Q30MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q31MCQ1 Mark·Choose one option
If the count of log entries appears much smaller than expected, which of the following could be the reason?
- AThe filter for Saturday is incorrect.
- BThe filter for time range is incorrect.
- CThe filter for successful status codes is incorrect.
- DAny of the given option could be the reason.
Read the passage below, then answer Q32–Q35
Scenario 4
The course instructor of TDS is developing an LLM-powered learning assistant called EduBot. This assistant is used by students to learn concepts in geospatial analysis, optimization, and data science. This bot will be highly helpful for students in solving the questions given in the context of “Emergency Medical Supply Delivery in Storm-Critical Zones” in this question paper. The goal of the assistant is to help students think critically and solve problems independently without receiving direct answers or step-by-step solutions.
The instructor defines the following constraints for the LLM assistant (EduBot):
1. Do not provide final answers — If a student asks for the solution, the agent must not give the final answer.
2. Do not provide step-by-step code — The agent must avoid giving Python, SQL, or R code directly.
3. Encourage critical thinking — The agent should guide students using reflective questions, sanity checks, and logical reasoning.
4. Use context-aware prompts — The agent should recognize when a student might have made a conceptual mistake (like unit errors) and provide guidance.
The instructor asks you, as part of a course assignment, to design the system prompt that will be sent to OpenAI’s API for creating this LLM-based agent. Your task is to answer the given sub- questions to ensure EduBot works as expected.
Q32MCQ1 Mark·Choose one optionThe instructor wants to ensure that the agent’s purpose is clear to the LLM. What is the role of the system prompt in controlling the LLM's behavior?
- AIt defines the role, constraints, and communication style of the LLM agent, ensuring it guides rather than solves.
- BIt acts as a script that contains hard-coded responses for every student question.
- CIt ensures that the LLM only responds with exact pre-written answers to specific queries.
- DIt modifies the OpenAI model itself to force it to behave like a teaching assistant.
- Q33MCQ1 Mark·Choose one option
Choose the best system prompt that achieves the instructor's goals.
- A“””You are an interactive assistant. Answer student questions directly and provide Python code or final answers if requested. If the student asks for clarification, provide a detailed step-by-step solution.”””
- B“””You are a learning assistant for a Data Science course. Do not provide final answers or direct solutions. Do not provide Python or step-by-step code. Encourage critical thinking using reflective questions. Use sanity checks to help students validate their work. If a student provides a calculation, prompt them to review units, radian-to-degree conversions, or other potential points of error.”””
- C“””You are a teaching assistant for a Data Science course. Answer questions using logical reasoning, and if the student requests the final solution, provide the exact distance or value. Ask follow-up questions to help students understand the answer.”””
- D“””You are a simple assistant. Do not provide step-by-step guidance or explanations. When asked about concepts like geospatial distance, tell students to look up the concept themselves. If a student asks for the answer, refuse to respond.”””
- Q34MCQ1 Mark·Choose one option
A student asks the following question to EduBot: "How do I convert degrees to radians?" The goal of the LLM assistant is to use logical reasoning to prompt the student to think critically. Instead of directly providing the formula, the assistant should encourage the student to recall or derive it on their own. The assistant should use concepts, relationships, and reasoning techniques that help the student make connections. Which of the below responses will be an ideal response from the agent in this situation?
- A

- B

- C

- D

- A
- Q35MCQ1 Mark·Choose one option
Assume that the EduBot is designed to provide context-aware, personalized guidance to students by using a RAG (Retrieval-Augmented Generation) system. The RAG system works as follows: 1. Course Material Storage: Custom course content (like PDFs, guides, and notes) is split into smaller chunks. Each chunk is vectorized using an embedding model. 2. Vector Database: The vectorized chunks are stored in a FAISS or Weaviate vector database. 3. Retriever: When a student asks a question, the system retrieves the most relevant content (based on semantic similarity) from the vector database. 4. LLM Contextualization: The retrieved content is added as context in the assistant's prompt, which is then used by the LLM (like GPT-4) to generate a personalized, context-aware response. Which of the following correctly describes the process flow of a RAG-based system for the IITM TDS Teaching Assistant?
- A

- B

- C

- D

- A