Skip to course content
Free generative AI app course

Generative AI Application Development with Python

Module 05 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. Routing on prose rather than a field breaks when…

2. Truncated JSON in a response is usually caused by…

3. A successful JSON parse tells you…

4. A retry after a malformed response should include…

5. Widening an enum in a schema breaks…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - the model says 'invoicing' instead of 'billing'

Each of those is a normal thing for generated text to do, and the regex accumulates special cases.

2. B - max_tokens set too low

It presents as intermittent parse failure and has a completely different fix from a model problem.

3. B - only that the shape was JSON

A plausible label outside your allowed set parses perfectly and breaks the router.

4. B - the specific error that occurred

'Please try again' gives the model nothing it did not have, at full cost per attempt.

5. B - old code reading new data

Deploy readers first - during a rolling deploy both versions run at once.

Practical Check

Apply this module to your own work: complete the module activity for *Structured Outputs with Schemas*, 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.