Skill 4.2.2

Design and implement custom guardrails for domain-specific constraints

Key Concepts

Built-in options for customization include blocklists of terms and custom categories in Azure AI Content Safety, which detect a domain-specific type of content from a definition and examples. Many domain constraints are better enforced in code: middleware or tool wrappers that validate arguments (amount limits, allowed destinations, permitted accounts), redact identifiers and block categories of advice, such as personalised investment or dosage advice.

Custom guardrails are specified as testable rules with an owner, an action (block, redact, escalate or annotate) and logging for audit. Where a rule needs judgement, a small classifier or LLM-based check can be used, with its own evaluation for precision and recall.