Quiz Space

Tools in Data Science · End Term · 10 May 2026 · January 2026 term

Question 23: Robust Improvements : Write the necessary Python/FastAPI…

Question 23

+2 marksWritten answer

Please provide a comprehensive structural analysis addressing the given two core logic flaws:
Based on the above data, answer the given subquestions.

Robust Improvements : Write the necessary Python/FastAPI technical improvements required (e.g., Type Hinting) to structurally force the endpoint to become reliable.
NOTE: Your answer should not exceed 200 words.

Show answer

A written answer, not marked automatically.

Question 23 of 27 in the IIT Madras BS Tools in Data Science (Tools in Data Science (TDS)) End Term paper sat on 10 May 2026, in the January 2026 term (Tools In Data Science 06 May 26). It carries 2 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2You deploy your portfolio website to GitHub Pages. You try to add a Python FastAPI backend to handle form submissions d…
  3. Q3Figure question
  4. Q4You build a Docker image locally and push it to Docker Hub. Your colleague pulls it on Windows. Your code runs Ubuntu L…
  5. Q5Why is it highly recommended to use HTTPS instead of HTTP when sending an API token over the internet?\ Choose the corr…
  6. Q6Figure question
  7. Q7Figure question
  8. Q8Figure question
  9. Q9You write a script that loads a 2GB file into memory. It works on your laptop but crashes with "Out of Memory" on a fre…
  10. Q10Figure question
  11. Q11Your app blocks the word "Ignore" to prevent prompt injection. A user types "I-g-n-o-r-e the above instructions" and by…
  12. Q12Figure question
  13. Q13Figure question
  14. Q14When sending instructions to an LLM, developers often place core rules (like "you are a strict assistant") into a "Syst…
  15. Q15Two users attempt to sign up with the same username simultaneously. Your server checks if the username exists, then add…
  16. Q16A team trains a sentiment classifier achieving 94% test accuracy. They discover 200 test reviews accidentally appeared …
  17. Q17When the student opens their testing HTML file in Chrome, why does it block the connection to their backend API?\ Choos…
  18. Q18Read the following passage carefully:\ A student builds a simple API that connects to a Large Language Model (LLM). To …
  19. Q19Read the following passage carefully:\ A student builds a simple API that connects to a Large Language Model (LLM). To …
  20. Q20The student wants to bypass the cache to get fresh results. What technical trick forces a new request?\ Choose the corr…
  21. Q21What's the key difference between LLM "Structured Outputs" and Python validation for preventing malformed JSON?\ Choose…
  22. Q22User bypasses "Ignore" filter with "IGNORE" or "Ign0re". What validation is more robust?\ Choose the correct answer.
  23. Q24RESTful Semantics : Should an LLM/Sentiment inference endpoint ideally operate via a GET mapped method, or a POST metho…
  24. Q25Figure question
  25. Q26During a traffic spike, your single API gateway instance crashes. What architectural change prevents complete platform …
  26. Q27Figure question