You are integrating an evaluation workflow for an agent that calls multiple tools. You discover that tool outputs frequently include HTML snippets from a legacy system, causing the model to misread structure. Which mitigation most aligns with foundational AI practitioner best practices?

Answer

Normalize tool output to a structured schema (e.g., JSON), sanitize content, and validate the tool response before it is provided to the model.

Explanation

Tool outputs should be transformed into consistent, validated structures so the model can reliably interpret them. Sanitization and schema validation prevent malformed or malicious content from misleading generations.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list