Skip to course content
Free generative AI app course

Generative AI Application Development with Python

Module 11 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. The single change that makes an AI app testable is…

2. Scripted fake responses let you test…

3. An assertion on exact model output will…

4. A golden file with a type contract should be updated…

5. The offline part of a good suite is…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - taking the model as a parameter

A client created at import time forces every test to need a key, so the tests never run in CI.

2. B - the retry, refusal and give-up paths

You cannot reliably make a real model return invalid JSON on demand.

3. B - fail on harmless rewording and end up disabled

After the third false failure someone comments it out, and it is never the test that would have caught the real one.

4. B - only when the schema change was deliberate

Updated reflexively, the test becomes a record of current behaviour and can never fail.

5. B - most of the tests and a fraction of the time

Split it from the paid tests so it runs on every save.

Practical Check

Apply this module to your own work: complete the module activity for *Testing AI App Behaviour with Deterministic Fixtures*, 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.