Skip to course content
Free generative AI app course

Generative AI Application Development with Python

Module 10 Knowledge Check

5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.

1. Validation belongs…

2. Content that must pass a later check should…

3. Your request timeout should be…

4. Work taking more than a couple of seconds should…

5. TestClient lets you exercise the app…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - on the request model, so it runs before your code

In the handler, the second endpoint gets a slightly different version and one path loses a rule.

2. B - not be streamed as an answer

If validation fails you must visibly replace text the user is already reading.

3. B - shorter than the infrastructure in front of you

Otherwise the user gets a generic 504 and never receives the request id you would have given them.

4. B - return a job id the client can come back to

A held-open connection fails on dropped connections, page reloads and mobile network changes.

5. B - in-process, with no server and no network

That is what makes the offline suite in the next module possible.

Practical Check

Apply this module to your own work: complete the module activity for *Simple App UI with FastAPI or Streamlit*, then write one sentence naming what your result shows and one naming what it does not.

Strong Answer Pattern

A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.