Question 1
When using uv for Python package management, which command sequence correctly creates a new project with a specific Python version and installs dependencies?

The IIT Madras BS Tools in Data Science (Tools in Data Science (TDS)) End Term paper sat on 31 Aug 2025, in the May 2025 term, set QDD1: 34 questions for 40 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
When using uv for Python package management, which command sequence correctly creates a new project with a specific Python version and installs dependencies?
Correct answer
In Git workflow for collaborative data science projects, what is the most appropriate sequence for integrating feature changes?
Correct answer
When designing error handling in Python data processing pipelines, which approach generally offers the most robust and maintainable solution for unexpected runtime errors?
Using only generic try-except blocks
Using try-except-finally with specific exception types and proper logging
Using pre-emptive condition checks (if-else) without exception handling
Allowing all exceptions to propagate to the top level
Correct answer
Using try-except-finally with specific exception types and proper logging
A data scientist needs to identify unique treatment combinations in a clinical trial dataset with 50,000 rows. Which pandas approach would be most memory-efficient for large datasets?
Correct answer
A developer debugging an API integration notices intermittent 429 status codes. Which Chrome DevTools approach would best help identify the rate limiting pattern?
Console tab with error filtering
Network tab with timing analysis and request throttling simulation
Application tab for storage inspection
Performance tab for bottleneck analysis
Correct answer
Network tab with timing analysis and request throttling simulation
For a geospatial analysis project involving buffer operations, spatial joins, and interactive mapping, which combination of libraries provides the most comprehensive solution?
Matplotlib + NumPy + Pandas
GeoPandas + Shapely + Folium
Plotly + Seaborn + SciPy
Bokeh + NetworkX + PyProj
Correct answer
GeoPandas + Shapely + Folium
When cleaning a dataset with company names like "Microsoft Corp", "Microsoft Corporation", "MSFT", which OpenRefine technique would be most effective?
Simple find and replace operations
Clustering algorithms with fingerprinting and n-gram comparison
Regular expression matching only
Manual standardization
Correct answer
Clustering algorithms with fingerprinting and n-gram comparison
Correct answer
When designing a SQLite database for time-series sensor data with millions of records, which indexing strategy optimizes both query performance and storage efficiency?
Primary key index only
Composite index on (timestamp, sensor_id) with partial indexes for active sensors
Individual indexes on all columns
No indexing to save storage space
Correct answer
Composite index on (timestamp, sensor_id) with partial indexes for active sensors
A data analyst needs to identify customers with purchase patterns similar to high-value segments. Which pandas operation most efficiently computes customer similarity?
Correct answer
You are working with a very large CSV file that is too big to fit into memory. Which pandas method is the best way to read and process the file without running out of memory?
Correct answer
A developer optimizing database-heavy applications needs to identify query bottlenecks and connection issues. Which monitoring approach provides comprehensive insights?
Application logs only
Database query profiling + connection pool metrics + application performance monitoring
Network traffic analysis only
Memory usage tracking exclusively
Correct answer
Database query profiling + connection pool metrics + application performance monitoring
Scenario 1: AI-Powered Research Assistant Development
Dr. Kumar is developing an AI research assistant for environmental science students. The system needs to process academic papers, generate summaries, and answer domain specific questions while encouraging critical thinking.
Based on the above data, answer the given subquestions.
The research assistant uses a system prompt to guide its behavior. Which system prompt design principle is most important for educational effectiveness?
Providing direct answers to maximize efficiency
Balancing information delivery with Socratic questioning to promote learning
Limiting responses to prevent information overload
Using technical jargon to maintain academic rigor
Correct answer
Balancing information delivery with Socratic questioning to promote learning
Scenario 1: AI-Powered Research Assistant Development
Dr. Kumar is developing an AI research assistant for environmental science students. The system needs to process academic papers, generate summaries, and answer domain specific questions while encouraging critical thinking.
Based on the above data, answer the given subquestions.
When students submit complex research queries, which factors most significantly impact the LLM's operational costs and response quality? (Select all that apply)
Token count of input prompts and generated responses
Complexity and specificity of the query requiring deeper reasoning
Time of day when queries are submitted
Context window utilization for multi-turn conversations
Student's academic level
Correct answers
Token count of input prompts and generated responses
Complexity and specificity of the query requiring deeper reasoning
Context window utilization for multi-turn conversations
Scenario 1: AI-Powered Research Assistant Development
Dr. Kumar is developing an AI research assistant for environmental science students. The system needs to process academic papers, generate summaries, and answer domain specific questions while encouraging critical thinking.
Based on the above data, answer the given subquestions.
Which prompt engineering technique would generate the most pedagogically valuable response for environmental research?
"Explain climate change impacts"
"Write about environmental issues"
"Analyze the interconnected effects of ocean acidification on marine ecosystems, considering pH changes, species adaptation, and food web dynamics. What research methodologies would be most appropriate for studying these relationships?"
"Discuss environmental problems briefly"
Correct answer
"Analyze the interconnected effects of ocean acidification on marine ecosystems, considering pH changes, species adaptation, and food web dynamics. What research methodologies would be most appropriate for studying these relationships?"
Scenario 2: Smart City Traffic Management System
A metropolitan city is implementing a real-time traffic management system that processes data from IoT sensors, traffic cameras, and GPS devices to optimize traffic flow across 500+ intersections.
System Architecture:
● IoT sensors at intersections (Lat/Long coordinates provided)
● Central processing hub: (28.6139^(o) N, 77.2090^(o) E)
● Real-time data streams: traffic density, weather conditions, accident reports
● ML models for traffic prediction and route optimization
Based on the above data, answer the given subquestions.
The development team uses Git for version control of traffic algorithms. When a critical traffic routing bug is discovered in production, which Git workflow ensures rapid deployment of fixes while maintaining code integrity?
Correct answer
Scenario 2: Smart City Traffic Management System
A metropolitan city is implementing a real-time traffic management system that processes data from IoT sensors, traffic cameras, and GPS devices to optimize traffic flow across 500+ intersections.
System Architecture:
● IoT sensors at intersections (Lat/Long coordinates provided)
● Central processing hub: (28.6139^(o) N, 77.2090^(o) E)
● Real-time data streams: traffic density, weather conditions, accident reports
● ML models for traffic prediction and route optimization
Based on the above data, answer the given subquestions.
Traffic engineers need to analyze historical data patterns. Which command-line approach efficiently processes large log files to extract peak traffic periods and route preferences?
Correct answer
Scenario 2: Smart City Traffic Management System
A metropolitan city is implementing a real-time traffic management system that processes data from IoT sensors, traffic cameras, and GPS devices to optimize traffic flow across 500+ intersections.
System Architecture:
● IoT sensors at intersections (Lat/Long coordinates provided)
● Central processing hub: (28.6139^(o) N, 77.2090^(o) E)
● Real-time data streams: traffic density, weather conditions, accident reports
● ML models for traffic prediction and route optimization
Based on the above data, answer the given subquestions.
For deploying the traffic management system across distributed edge computing nodes at intersections, which containerization strategy optimizes resource utilization and ensures consistent performance?
Single monolithic container with all services
Multi-stage Docker builds with service mesh architecture and resource constraints
Virtual machines for each intersection
Direct installation on edge hardware without containerization
Correct answer
Multi-stage Docker builds with service mesh architecture and resource constraints
Scenario 2: Smart City Traffic Management System
A metropolitan city is implementing a real-time traffic management system that processes data from IoT sensors, traffic cameras, and GPS devices to optimize traffic flow across 500+ intersections.
System Architecture:
● IoT sensors at intersections (Lat/Long coordinates provided)
● Central processing hub: (28.6139^(o) N, 77.2090^(o) E)
● Real-time data streams: traffic density, weather conditions, accident reports
● ML models for traffic prediction and route optimization
Based on the above data, answer the given subquestions.
When optimizing traffic routes for emergency vehicles during peak hours, which algorithmic approach best balances computational efficiency with real-time requirements?
Brute force calculation of all possible routes
A pathfinding with dynamic edge weights based on real-time traffic data
Random route selection
Static pre-computed emergency routes
Correct answer
A pathfinding with dynamic edge weights based on real-time traffic data
Scenario 2: Smart City Traffic Management System
A metropolitan city is implementing a real-time traffic management system that processes data from IoT sensors, traffic cameras, and GPS devices to optimize traffic flow across 500+ intersections.
System Architecture:
● IoT sensors at intersections (Lat/Long coordinates provided)
● Central processing hub: (28.6139^(o) N, 77.2090^(o) E)
● Real-time data streams: traffic density, weather conditions, accident reports
● ML models for traffic prediction and route optimization
Based on the above data, answer the given subquestions.
The system calculates distances between intersections for route optimization. What is the primary computational advantage of implementing the Haversine formula in the traffic management context?
Provides accurate great-circle distances for GPS coordinates without requiring road network data
Calculates exact travel time including traffic conditions
Determines elevation changes for fuel efficiency
Measures road surface quality for vehicle routing
Correct answer
Provides accurate great-circle distances for GPS coordinates without requiring road network data
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
Which of the following Apache log entries correctly represents a successful mobile checkout transaction that occurred during the peak analysis window (12:00–15:59)?
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
To extract essential fields for the analysis "mobile checkout transactions between 12:00-15:59 with successful status codes", which data elements are required?
IP, UserAgent, Referrer, VirtualHost
Timestamp, HTTP_METHOD, URL, StatusCode, UserAgent
RemoteUser, AuthUser, ResponseSize, ServerIP
IP, Timestamp, Referrer, ResponseSize
Correct answer
Timestamp, HTTP_METHOD, URL, StatusCode, UserAgent
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
%d/%b/%Y:%H:%M:%S
%d/%b/%Y:%H:%M:%S %z
%Y-%m-%d %H:%M:%S %Z
%d-%b-%Y:%H:%M:%S GMT
Correct answer
%d/%b/%Y:%H:%M:%S %z
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
To identify checkout transactions occurring between 12:00 and 15:59, which Python condition correctly validates the time range?
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
To identify mobile traffic from the UserAgent string, which Python approach provides the most reliable mobile device detection?
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
For determining successful transactions, which condition correctly identifies HTTP status codes indicating success?
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
Correct answer
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
If the transaction count appears unexpectedly high, which systematic debugging approach would identify the root cause?
Assume data corruption and discard results
Validate each filter condition independently: time range → HTTP method → URL pattern → status code
Reduce the dataset size randomly
Check only the timestamp filter
Correct answer
Validate each filter condition independently: time range → HTTP method → URL pattern → status code
Scenario 3: E-commerce Platform Log Analysis
You're analyzing Apache access logs from a major e-commerce platform. The logs contain customer browsing patterns, purchase behaviors, and system performance metrics during Black Friday sales.
Log Format Specification:
Analysis Requirements:
● Filter purchases (POST to /checkout/) during peak hours (12:00-15:59)
● Identify mobile vs desktop traffic patterns
● Track successful transactions (status codes 200-299)
● Analyze product category performance
Based on the above data, answer the given subquestions.
When processing very large Apache log files (10GB+), which of the following Python approaches offers the best memory efficiency?
Correct answer
Scenario 4: Academic Research RAG System with Multi-Modal Analysis
A research university implements an advanced RAG system that processes academic papers, datasets, code repositories, and experimental results to support interdisciplinary research across STEM fields.
Advanced Multi-Modal RAG Architecture:
● Text Processing: Research papers, grants, technical documentation
● Code Analysis: GitHub repositories, computational notebooks, algorithm implementations ● Data Integration: Experimental datasets, simulation results, sensor data
● Visual Processing: Figures, charts, experimental images, technical diagrams
● Semantic Linking: Cross-reference relationships between concepts, methods, and findings Based on the above data, answer the given subquestions.
What is the primary advantage of multi-modal RAG systems over text-only approaches in academic research contexts?
Reduced computational complexity for information retrieval
Comprehensive understanding through integration of textual concepts, visual data, and computational methods
Simplified system architecture and maintenance
Lower storage requirements for research materials
Correct answer
Comprehensive understanding through integration of textual concepts, visual data, and computational methods
Scenario 4: Academic Research RAG System with Multi-Modal Analysis
A research university implements an advanced RAG system that processes academic papers, datasets, code repositories, and experimental results to support interdisciplinary research across STEM fields.
Advanced Multi-Modal RAG Architecture:
● Text Processing: Research papers, grants, technical documentation
● Code Analysis: GitHub repositories, computational notebooks, algorithm implementations ● Data Integration: Experimental datasets, simulation results, sensor data
● Visual Processing: Figures, charts, experimental images, technical diagrams
● Semantic Linking: Cross-reference relationships between concepts, methods, and findings Based on the above data, answer the given subquestions.
Which system prompt design best supports interdisciplinary research collaboration and knowledge synthesis?
Correct answer
Scenario 4: Academic Research RAG System with Multi-Modal Analysis
A research university implements an advanced RAG system that processes academic papers, datasets, code repositories, and experimental results to support interdisciplinary research across STEM fields.
Advanced Multi-Modal RAG Architecture:
● Text Processing: Research papers, grants, technical documentation
● Code Analysis: GitHub repositories, computational notebooks, algorithm implementations ● Data Integration: Experimental datasets, simulation results, sensor data
● Visual Processing: Figures, charts, experimental images, technical diagrams
● Semantic Linking: Cross-reference relationships between concepts, methods, and findings Based on the above data, answer the given subquestions.
A researcher asks: "How can machine learning techniques be applied to optimize renewable energy grid integration, and what interdisciplinary approaches show promise?" Which response demonstrates the most effective research synthesis approach?
"Machine learning can predict energy demand and optimize grid operations through various algorithms."
"Here are 10 recent papers on ML applications in renewable energy: [lists papers with summaries]"
"Let's explore the intersection of several fields: What specific grid integration challenges interest you? ML approaches range from demand forecasting (time series analysis) to real-time optimization (reinforcement learning), while power systems engineering provides domain constraints. Materials science advances in energy storage create new optimization opportunities. Which aspect aligns with your research focus?"
"This is a complex topic requiring extensive literature review across multiple disciplines."
Correct answer
"Let's explore the intersection of several fields: What specific grid integration challenges interest you? ML approaches range from demand forecasting (time series analysis) to real-time optimization (reinforcement learning), while power systems engineering provides domain constraints. Materials science advances in energy storage create new optimization opportunities. Which aspect aligns with your research focus?"
Scenario 4: Academic Research RAG System with Multi-Modal Analysis
A research university implements an advanced RAG system that processes academic papers, datasets, code repositories, and experimental results to support interdisciplinary research across STEM fields.
Advanced Multi-Modal RAG Architecture:
● Text Processing: Research papers, grants, technical documentation
● Code Analysis: GitHub repositories, computational notebooks, algorithm implementations ● Data Integration: Experimental datasets, simulation results, sensor data
● Visual Processing: Figures, charts, experimental images, technical diagrams
● Semantic Linking: Cross-reference relationships between concepts, methods, and findings Based on the above data, answer the given subquestions.
Which processing sequence correctly describes the multi-modal RAG system's comprehensive research synthesis workflow?
Research Query → Text Search Only → Generate Literature Summary
Research Query → Keyword Matching → Return Most Recent Papers
Research Query → Multi-Modal Embedding (text + code + visual + data) → Cross-Disciplinary Retrieval → Concept Mapping → Synthesized Research Insights with Method Integration
Research Query → Database Search → Template Response Generation
Correct answer
Research Query → Multi-Modal Embedding (text + code + visual + data) → Cross-Disciplinary Retrieval → Concept Mapping → Synthesized Research Insights with Method Integration