Recipes

Applying Guardrails Within Recipes

Recipes support the integration of guardrails to ensure that prompt interactions conform to organizational standards for safety, compliance, and content quality. When a guardrail-enabled prompt is selected either within the prompt or agent prompt,the associated guardrail configuration becomes automatically visible alongside the selected LLM and its config parameters. This visibility allows recipe authors to review and validate enforcement logic during the recipe creation process.

Guardrail enforcement behavior is determined by the configuration defined during prompt setup. Depending on the requirements, guardrails can be applied at the request level, response level, or both. These modes provide targeted or end-to-end coverage for evaluating user inputs and model outputs against policy-defined controls.

Default Guardrail Configuration

In addition to custom guardrails applied at the prompt level, the recipe interface also offers the option to enable a default guardrail directly within the prompt or agent prompt. This default guardrail is centrally managed via the Organization settings and ensures consistent enforcement of baseline safety and compliance rules across all recipes.

When enabled:

  • Predefined guardrail logic is applied automatically.

  • Request and response evaluation toggles become visible in the recipe interface.

  • No manual setup is required from the user, streamlining the configuration process.

Guardrail Enforcement Modes

Recipes support the following guardrail enforcement modes:

  • Request Enabled User input is evaluated before it is passed to the LLM, based on the configured guardrail policies. Inputs that violate defined rules such as unsafe, unethical, or restricted content are blocked. A predefined message is returned to the user, and both trace logs and violation reports are generated for review.

  • Response Enabled The model's output is evaluated after it is generated. If the response violates configured content policies, it is blocked, and a standard fallback message is presented. Enforcement actions are logged, with detailed traceability provided via violation reports and logs.

  • Request and Response Enabled This comprehensive mode evaluates both user input and model output. The input is screened before reaching the model, and the output is checked before it is delivered to the end user. This dual-layer enforcement ensures full policy compliance, supported by detailed trace logs and violation insights.

Last updated