Module 04 Summary
What this module established
A prompt is a function and can be tested like one - with hostile inputs. Braces in user content break str.format, and an empty context renders successfully into a prompt asking the model to answer from nothing.
Carry forward
- Assert on structure. Exact-match assertions fail on harmless rewording and get the suite disabled.
- Tools are the one part where testing is free, deterministic and exhaustive - so cover every refusal branch, which is most of the code you wrote.
- Split the offline suite from the paid one and keep it under a minute. A slow suite is a suite people stop running.
Before moving on
Move on when every tool refusal branch has a direct test and the offline suite runs in under a minute on every commit.
