Start here. This is the direct spoken answer to practice first.
Overview
A model response is generated input to the next component, not a trusted instruction or safe rendering artifact.
Model output can contain incorrect fields, hostile markup, executable code, unsafe URLs, leaked data, or tool arguments influenced by an attacker. I validate it against the destination's contract and encode or sanitize it for the exact sink. The application independently authorizes any requested operation and never executes generated SQL, shell, HTML, or code merely because the model produced it.