For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage guardrails

Create guardrails that monitor or block unsafe requests across workspaces.

Guardrails evaluate model traffic before it reaches a provider. Use them to detect content that violates your safety or compliance requirements.

A guardrail can monitor matching requests or block them, and can be applied to the entire organization or only to selected workspaces.

For supported guardrails and provider-specific settings, see the guardrail catalog.


Configure a guardrail

Only organization owners and admins can add, edit, or delete guardrails.

  1. From the dashboard, open Organization → Guardrails.

  2. Click Configure guardrail.

  3. Follow the steps in the setup wizard:

    1. Select the type of risk you want to detect, such as bias, hallucination, content safety, PII, or toxicity.

    2. Choose a guardrail from the catalog for that check.

    3. Give the guardrail a name.

    4. Enter an API key, if any. Enter None to use the key from the guardrail’s environment variable.

    5. Complete the remaining configuration steps. These may vary depending on the guardrail provider you selected.

  4. Click Configure guardrail to save your settings.


Mandate a guardrail

Each guardrail can be applied across the entire organization or to specific workspaces. You can configure it to either block requests or monitor them without blocking. Once mandated, the guardrail will run on every request from the selected workspaces.

  1. In Guardrails, click Mandate a guardrail.

  2. Choose whether you want to use a guardrail configured from the catalog or your own guardrail service.

  3. If using a guardrail from the catalog:

    • Select a guardrail you previously configured.

    • Give the check a name that will identify it in requests.

    • Choose whether the guardrail should block requests or monitor them only.

    • Choose what should happen if the guardrail can’t run: refuse the request or serve it unchecked. Note that only blocking guardrails can refuse requests; monitoring guardrails will always serve them.

    • Select the workspaces where the guardrail should run.

  4. If using your own guardrail service:

    • Select the guardrail profile.

    • Enter the guardrail credential.

    • Complete the remaining configuration steps described above.

  5. Click Mandate a guardrail to save your settings.


Test a guardrail

Before applying a guardrail, you can test how it evaluates specific content. Enter the text you want to check, and the guardrail will process it just as it would a real request. Nothing entered during the test is saved. To test a guardrail:

  1. In Guardrails, select the guardrail you want to test by clicking on the test icon.

  2. Enter the text you want to check against the guardrail.

  3. Optionally, add a model output if you want to test checks that evaluate responses, such as hallucination or compliance.

  4. Optionally, add context documents in JSON format, such as retrieved RAG passages.

  5. Click Run test to see how the guardrail evaluates the content. Nothing from the test is saved.


Edit or delete a guardrail

In Guardrails, select the guardrail you want to update and click the Edit icon to modify its credentials or configuration parameters.

To delete a guardrail, make sure it is no longer mandated. If the guardrail is still in use, go to the Where to run section, select the relevant mandate, and click the Delete icon to remove it. Once all mandates have been removed, you can delete the guardrail itself.

Last updated

Was this helpful?