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…
- A. the environment
- B. any object you might log
- C. a secrets manager
- D. a gitignored .env file
2. A key that was committed and then removed from history is…
- A. safe
- B. compromised - rotation is the only action that helps
- C. safe if the repo is private
- D. safe after a force push
3. Your cost estimate must include…
- A. only successful calls
- B. retries, which are a direct multiplier
- C. only the output tokens
- D. only peak traffic
4. A spend ceiling should be…
- A. a provider alert
- B. enforced in your code before each call
- C. checked daily
- D. a monthly budget review
5. The default model in your configuration should be…
- A. the production model
- B. a fake, so misconfiguration fails in tests
- C. the cheapest model
- D. unset
---
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.
