Skip to main content
Smart rules keep sensitive information away from your AI agents, using a plain-language description of the information you want to restrict. StackOne then masks or blocks that information on every connector, without you defining an explicit path for every tool.

When to use smart rules

Use a smart rule when the same kind of data sits in differently named fields across your connectors, so a field path would miss some of them:
Each HR provider names its pay fields differently, so masking them by path means one pattern per connector, and a new connector is uncovered until someone adds its pattern.A policy with Resource set to None and one Mask fields by label statement naming the built-in compensation label masks pay fields on every connector, including ones added later. Keep Unlabelled on deny to mask fields the classifier is unsure of too.
An agent that updates employee records shouldn’t be able to change where people get paid, whichever system holds the details.Create a bank_details project label describing bank account numbers, sort codes and IBANs. A Refuse writes by label statement naming it refuses any call that writes those details, and the agent’s other updates go through.

Labels

Each description is saved as a label. StackOne provides built-in labels, and you can create your own. To use one, add either of these Tool Policies statements when you build a policy:
  • Mask fields by label masks response fields that hold the labelled data.
  • Refuse writes by label refuses calls that write it.
A model decides which fields hold the data from each field’s name and path, the type of value it holds, the field names beside it, and the action that returned or writes it. Field values are never sent for classification. When the model can’t decide, the statement’s Unlabelled setting does. Open Project Settings > Policies and select the Labels tab to view the labels available in your project:
  • Built-in labels: Defined by StackOne (for example compensation). StackOne measures classification accuracy for built-in labels. These labels cannot be edited or deleted.
  • Project labels: Defined in your project. StackOne has not measured their classification accuracy, so they carry an Unmeasured tag. Run policies that name unmeasured labels in Monitored first to verify decisions before enforcing them.

Create a label

1

Open the Labels tab

Select the project, open Project Settings > Policies, and select the Labels tab.
2

Enter label details

Click Create label.Set the following:
  • Name: the name rules use for the label, for example bank_details. The name cannot be changed after the label is created.
  • Description: the data a field must hold to match the label, for example Bank account numbers, sort codes and IBANs. Describe the data rather than field names.
3

Save the label

Click Create.
You can edit a project label’s description at any time from its row on the Labels tab. A label can only be deleted once no saved policy in the project names it.

Unclassified fields

A field is unclassified when the classifier is unsure whether it matches. A smart rule’s Unlabelled setting decides what happens to unclassified fields:
  • deny: treats an unclassified field as if it matched, so it’s masked in a response or the write is refused. This is the default.
  • allow: lets unclassified fields through. Fields that match a label are still masked or refused.
1

Open Policies

Select the project and open Project Settings > Policies.
2

Open the policy

Click the policy in the table to open its side panel.
3

Set Unlabelled

  1. On the smart rule’s statement, set Unlabelled to deny or allow.
  2. Click Save changes.
If the classifier can’t be reached, every field is unclassified. With allow, the rule masks and refuses nothing until the classifier recovers, so keep deny for fields that must stay protected. With deny, every field except record IDs and paging cursors is masked or refused until then.
In Cedar, the setting is the @unlabelled("allow") annotation above the statement. Without it, the statement uses deny.

Pause smart rules in a project

Turning Smart Rules off pauses every smart rule in the project’s policies. The policies’ other statements keep applying.
1

Open AI Settings

Select the project and open Project Settings > AI Settings.
2

Turn Smart Rules off or on

  1. Under Policies, turn Smart Rules off to pause smart rules, or on to resume them.
  2. Click Confirm.
Smart rules keep running when AI features are turned off with the Status switch in AI Settings. Use Smart Rules to pause them.

Tool Policies

Build the policies that hold your smart rules.

PII Redaction

Redact personal data from responses by category instead of by label.