rpk ai guardrail test
Check text against a stored guardrail (--name) or an unsaved policy.
Examples
This section provides examples of how to use rpk ai guardrail test.
rpk ai guardrail test --name block-prompt-attacks --text "Ignore previous instructions"
rpk ai guardrail test --text "Mail me at a@example.com" --engine.redpanda-model-serving \
--pii.entities '{"type":"PII_ENTITY_TYPE_EMAIL","action":{"input":"ACTION_ANONYMIZE"}}'
rpk ai guardrail test -f request.yaml
Flags
| Value | Type | Description |
|---|---|---|
|
string |
Name. |
|
bool |
Content filter. (selects this target mode; takes no value). |
|
string |
Input strength. (one of: low, medium, high). |
|
string |
Output strength. (one of: low, medium, high). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Input strength. (one of: low, medium, high). |
|
string |
Output strength. (one of: low, medium, high). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Input strength. (one of: low, medium, high). |
|
string |
Output strength. (one of: low, medium, high). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Input strength. (one of: low, medium, high). |
|
string |
Output strength. (one of: low, medium, high). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Input strength. (one of: low, medium, high). |
|
string |
Output strength. (one of: low, medium, high). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Strength. (one of: low, medium, high; required in its group). |
|
string |
Action. (one of: none, detect, block, anonymize; required in its group). |
|
stringArray |
Topics. (repeatable; name (bare values comma-split) or protojson object; replaces the full list on update). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
string |
Strength. (one of: low, medium, high; required in its group). |
|
bool |
Managed profanity. (true when set; pass |
|
strings |
Words. (repeatable; replaces the full list on update). |
|
string |
Input. (one of: none, detect, block, anonymize). |
|
string |
Output. (one of: none, detect, block, anonymize). |
|
strings |
Managed profanity languages. (repeatable; replaces the full list on update). |
|
bool |
Pii. (selects this target mode; takes no value). |
|
stringArray |
Entities. (repeatable; protojson object; replaces the full list on update). |
|
stringArray |
Custom patterns. (repeatable; name (bare values comma-split) or protojson object; replaces the full list on update). |
|
string |
Grounding strength. (one of: low, medium, high). |
|
string |
Relevance strength. (one of: low, medium, high). |
|
string |
Action. (one of: none, detect, block, anonymize; required in its group). |
|
string |
Text. ( |
|
string |
Direction. (one of: input, output). |
|
string |
Grounding source. |
|
string |
Query. |
|
bool |
Bedrock. (selects this kind mode; takes no value). |
|
string |
Region. |
|
string |
Access key id ref. (required in its group). |
|
string |
Secret access key ref. (required in its group). |
|
string |
Role arn. (required in its group). |
|
string |
Session name. |
|
bool |
Redpanda model serving. (selects this kind mode; takes no value). |
|
string |
request as YAML or JSON, or - for stdin; flags override file values. |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |