Skip to course content
Free generative AI app course

Generative AI Application Development with Python

Module 02 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. An API key should never appear in…

2. A key that was committed and then removed from history is…

3. Your cost estimate must include…

4. A spend ceiling should be…

5. The default model in your configuration should be…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - any object you might log

Config dicts get logged in error reports and support tickets, and a secret in one reaches all of them.

2. B - compromised - rotation is the only action that helps

Every clone, fork and CI cache still has it. Rotate first; history rewriting is tidying.

3. B - retries, which are a direct multiplier

A 20% retry rate is a 20% cost increase that arrives on the invoice looking like traffic growth.

4. B - enforced in your code before each call

A provider alert fires after the money is spent and does not stop the next thousand calls.

5. B - a fake, so misconfiguration fails in tests

Otherwise a misconfigured environment silently calls a paid API with production settings.

Practical Check

Apply this module to your own work: complete the module activity for *API Keys, Environment Variables, Costs and Safe Local Setup*, 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.