Module 07 Activity
Scenario
A tool or two, and the question of whether you needed an agent at all.
What you build
Tools with model-facing descriptions and real validation, an enforced registry, bounded stopping conditions, and argument-level logging.
Steps
- Write one tool and check what the model actually sees: name, description, argument schema. Rewrite the docstring for the model.
- Put the guarantees in validation rather than the docstring, and test every refusal branch directly.
- Enforce a tool registry and include the real names in every rejection. Measure your invention rate.
- Implement all four stopping conditions and show which fires first on a tight loop.
- Log tool arguments as well as names, and find one wasted call caused by near-duplicate arguments.
- For each task in your system, decide chain or agent using the run-time-sequence test.
Evidence to hand in
- What the model sees for one tool, before and after rewriting.
- Direct tests of every refusal branch.
- The registry, a rejection message, and your invention rate.
- The four stopping conditions with which fired first.
- A wasted call found from argument logging.
- The chain-or-agent decision per task.
Review checklist
- The docstring is written for the model, not for developers.
- Guarantees live in validation, not prose.
- Rejections include the real tool names.
- All four stopping conditions exist.
- Arguments are logged, not just tool names.
- Anything with a known sequence is a chain.
