Quiz 4 Question 3 of 20

A financial services company is designing a Claude integration for real-time risk alerts. Their system must handle token budget constraints carefully: each alert analysis must stay within a specific token budget to control costs. When Claude produces a response that approaches the max_tokens limit and appears truncated, the current implementation silently delivers the truncated response to downstream risk systems. This has caused incidents where incomplete risk assessments were acted upon. What is the correct error handling approach?

Select an answer to reveal the explanation.

Motivation