|
| 1 | +import Image from '@theme/IdealImage'; |
| 2 | + |
| 3 | +# Guardrail Testing Playground |
| 4 | + |
| 5 | +Test and compare multiple guardrails in real-time with an interactive playground interface. |
| 6 | + |
| 7 | +<Image img={require('../../../img/guardrail_playground.png')} alt="Guardrail Test Playground" /> |
| 8 | + |
| 9 | +## How to Use the Guardrail Testing Playground |
| 10 | + |
| 11 | +The Guardrail Testing Playground allows you to quickly test and compare the behavior of different guardrails with sample inputs. |
| 12 | + |
| 13 | +### Steps to Test Guardrails |
| 14 | + |
| 15 | +1. **Navigate to the Guardrails Section** |
| 16 | + - Open the LiteLLM Admin UI |
| 17 | + - Go to the **Guardrails** section |
| 18 | + |
| 19 | +2. **Open Test Playground** |
| 20 | + - Click on the **Test Playground** tab at the top of the page |
| 21 | + |
| 22 | +3. **Select Guardrails to Test** |
| 23 | + - Check the guardrails you want to compare |
| 24 | + - You can select multiple guardrails to see how they each respond to the same input |
| 25 | + |
| 26 | +4. **Enter Your Input** |
| 27 | + - Type or paste your test input in the text area |
| 28 | + - This could be a prompt, message, or any text you want to validate against the guardrails |
| 29 | + |
| 30 | +5. **Run the Test** |
| 31 | + - Click the **Test guardrails** button (or press Enter) |
| 32 | + |
| 33 | +6. **View Results** |
| 34 | + - See the output from each selected guardrail |
| 35 | + - Compare how different guardrails handle the same input |
| 36 | + - Results will show whether the input passed or was blocked by each guardrail |
| 37 | + |
| 38 | +## Use Cases |
| 39 | + |
| 40 | +This is ideal for **Security Teams** & **LiteLLM Admins** evaluating guardrail solutions. |
| 41 | + |
| 42 | +This brings the following benefits for LiteLLM users: |
| 43 | + |
| 44 | +- **Compare guardrail responses**: test the same prompt across multiple providers (Lakera, Noma AI, Bedrock Guardrails, etc.) simultaneously. |
| 45 | + |
| 46 | +- **Validate configurations**: verify your guardrails catch the threats you care about before production deployment. |
0 commit comments