A procurement agent calls an external supplier API tool that occasionally returns partial JSON (missing required fields), HTTP 200 with an error object in the body, or numeric fields encoded as strings. The agent has begun treating these payloads as successful quotes and recommending invalid purchase orders. What is the most direct remediation within the tool ecosystem design?
Select an answer to reveal the explanation.
Short Explanation
If the tool returns garbage-shaped “success,” the agent will cheerfully reason over garbage. The fix is validation at the tool boundary: schema required fields, type coercion checks, and business-rule quality gates before anything enters the agent’s working context. Longer max_tokens just lets the agent elaborate on bad inputs. Inventing quotes from training data is worse for procurement accuracy. Changing UI locale does nothing for payload quality. A is the direct fix.
Full Explanation
Correct answer: A. Building tool ecosystems includes implementing tool result validation and quality checks. Agents should not trust raw tool outputs blindly; incomplete JSON, application-level errors under HTTP 200, and type mismatches must be detected and handled (retry, fallback, or escalate) before influencing recommendations.
B is incorrect because increasing max_tokens only affects generation length, not input integrity.
C is incorrect because inventing quotes from parametric knowledge undermines grounding and procurement controls.
D is incorrect because localization of the orchestrator UI is unrelated to tool payload validation.
Exam focus: treat tool outputs as untrusted until validated—schema, types, and domain rules.