Agentic AI - Agent Safety and Guardrails
What is wrong with this output filtering snippet?
banned_words = ["spam", "scam"]
output = "This is a scam message"
for word in banned_words:
if word == output:
print("Blocked")
else:
print("Allowed")