You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(uipath-agents): update guardrails guide with new validators and corrections (#440)
* fix(uipath-agents): update guardrails guide with new validators, operators, and corrections
- Add validators quick reference table (pii_detection, prompt_injection, harmful_content, intellectual_property, user_prompt_attacks)
- Add missing string operators (notStartsWith, notEndsWith, isEmpty, isNotEmpty)
- Add examples for user_prompt_attacks and intellectual_property validators
- Fix applyTo enum value: "both" → "inputAndOutput"
- Fix harmfulContentEntityThresholds to use valid even severity values (0/2/4/6)
- Add critical rules for filter action support and threshold values
- Remove "masks" from filter action description (filter only removes fields)
Closes AL-368
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(uipath-agents): filter action only supported on custom rules, not built-in validators
Built-in validators (pii_detection, intellectual_property, etc.) only support
block, log, and escalate. Filter is exclusive to customWordRule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(uipath-agents): use "deterministic rules" instead of "customWordRule" in critical rule 14
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(uipath-agents): correct guardrail operator names to match validation
Word operators: notContains→doesNotContain, notEquals→doesNotEqual,
notStartsWith→doesNotStartWith, notEndsWith→doesNotEndWith.
Number operators: notEquals→doesNotEqual.
Also trim matchNames description.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|`"number"`| Scalar numbers (e.g., `threshold` for prompt injection) | number |
309
313
310
-
### Validators Reference
314
+
### Validators Quick Reference
311
315
312
-
Run `uip agent guardrails list --output json` to get the full list of available validators with their allowed scopes, stages, and parameters. Use the output to populate `validatorType`, `selector.scopes`, and `validatorParameters` fields.
|`pii_detection`| Agent, Llm, Tool | Pre + Post | Block, Log, Escalate |
319
+
|`prompt_injection`| Llm | Pre only | Block, Log, Escalate |
320
+
|`harmful_content`| Agent, Llm, Tool | Pre + Post | Block, Log, Escalate |
321
+
|`intellectual_property`| Llm, Agent | Post only | Block, Log, Escalate |
322
+
|`user_prompt_attacks`| Llm | Pre only | Block, Log, Escalate |
323
+
324
+
Run `uip agent guardrails list --output json` to get the authoritative list. Use the output to populate `validatorType`, `selector.scopes`, and `validatorParameters` fields.
313
325
314
326
**How to map `uip agent guardrails list` output to guardrail JSON:**
315
327
@@ -381,10 +393,10 @@ Run `uip agent guardrails list --output json` to get the full list of available
381
393
"$parameterType": "map-enum",
382
394
"id": "harmfulContentEntityThresholds",
383
395
"value": {
384
-
"Hate": 3,
396
+
"Hate": 2,
385
397
"SelfHarm": 2,
386
398
"Sexual": 4,
387
-
"Violence": 3
399
+
"Violence": 2
388
400
}
389
401
}
390
402
],
@@ -426,7 +438,59 @@ Run `uip agent guardrails list --output json` to get the full list of available
426
438
}
427
439
```
428
440
429
-
### Example 4: Custom Word Rule — Block Forbidden Terms in Specific Tool Output
441
+
### Example 4: User Prompt Attack Detection — Block Jailbreaks
442
+
443
+
No parameters required — binary detection via Azure Prompt Shield. Llm PreExecution only.
444
+
445
+
```json
446
+
{
447
+
"$guardrailType": "builtInValidator",
448
+
"id": "f1a2b3c4-d5e6-7890-abcd-ef0123456789",
449
+
"name": "User prompt attack guardrail",
450
+
"description": "Detects jailbreak attempts and indirect prompt injection via Azure Prompt Shield",
### Example 5: Intellectual Property Detection — Block Copyrighted Text and Code
465
+
466
+
PostExecution only — no content exists to check before the LLM generates output.
467
+
468
+
```json
469
+
{
470
+
"$guardrailType": "builtInValidator",
471
+
"id": "a2b3c4d5-e6f7-8901-bcde-f01234567890",
472
+
"name": "IP detection guardrail",
473
+
"description": "Detects copyrighted text and licensed GitHub code in LLM output",
474
+
"validatorType": "intellectual_property",
475
+
"validatorParameters": [
476
+
{
477
+
"$parameterType": "enum-list",
478
+
"id": "ipEntities",
479
+
"value": ["Text", "Code"]
480
+
}
481
+
],
482
+
"action": {
483
+
"$actionType": "block",
484
+
"reason": "Protected material detected in output — execution blocked."
485
+
},
486
+
"enabledForEvals": true,
487
+
"selector": {
488
+
"scopes": ["Llm"]
489
+
}
490
+
}
491
+
```
492
+
493
+
### Example 6: Custom Word Rule — Block Forbidden Terms in Specific Tool Output
430
494
431
495
```json
432
496
{
@@ -462,7 +526,7 @@ Run `uip agent guardrails list --output json` to get the full list of available
462
526
}
463
527
```
464
528
465
-
### Example 5: Custom Word Rule — Log on All Fields
529
+
### Example 7: Custom Word Rule — Log on All Fields
466
530
467
531
```json
468
532
{
@@ -491,7 +555,7 @@ Run `uip agent guardrails list --output json` to get the full list of available
491
555
}
492
556
```
493
557
494
-
### Example 6: Escalate PII Violations to Action Center — Multiple Tool Targets
558
+
### Example 8: Escalate PII Violations to Action Center — Multiple Tool Targets
495
559
496
560
Escalates to an Action Center app when PII is detected in output from specific tools. Uses `matchNames` to target multiple tools and `escalate` action with `app` and `recipient`.
497
561
@@ -540,7 +604,7 @@ Escalates to an Action Center app when PII is detected in output from specific t
540
604
}
541
605
```
542
606
543
-
### Example 7: Custom Word Rule — Specific Fields with Titles on a Named Tool
607
+
### Example 9: Custom Word Rule — Specific Fields with Titles on a Named Tool
544
608
545
609
Inspects specific output fields (with human-readable `title`) of an Integration Service tool. Logs a violation when the field value contains a forbidden string.
546
610
@@ -584,7 +648,7 @@ Inspects specific output fields (with human-readable `title`) of an Integration
584
648
}
585
649
```
586
650
587
-
### Example 8: Filter — Redact Fields from Tool Output
651
+
### Example 10: Filter — Redact Fields from Tool Output
588
652
589
653
Redacts specific fields from a tool's output instead of blocking or logging. Use when you want the agent to continue but with sensitive data removed.
590
654
@@ -663,3 +727,5 @@ Add the `guardrails` array at the agent.json root level alongside `settings`, `m
663
727
11.**Do not forget `matchNames` when targeting a specific tool** — without it, the guardrail applies to all tools in the scope.
664
728
12.**Do not manually edit `guardrail.policies` on tool resources** — it is auto-populated by `uip agent validate` from root-level guardrails. Always configure guardrails at the agent.json root `guardrails` array.
665
729
13.**Do not reuse UUIDs across guardrails** — each guardrail needs a unique `id`.
730
+
14.**Do not use `filter` action on built-in validators** — `"$actionType": "filter"` is only supported on deterministic rules. All built-in validators (`pii_detection`, `intellectual_property`, `prompt_injection`, `user_prompt_attacks`, `harmful_content`) support only `block`, `log`, and `escalate`.
731
+
15.**Do not use odd numbers or floats for `harmfulContentEntityThresholds`** — only `0`, `2`, `4`, `6` are valid severity values. Values like `3` or `2.5` cause validation errors.
0 commit comments