Output Controls
MNPI Filter
mnpi-filter blocks a model answer that contains a phrase your team associates with material non-public information (MNPI), such as merger not public or insider information, before your application receives it.
It matches phrases. It cannot tell whether information is actually material or non-public. It runs only with stream: false.
Configuration
Save this as policy-config.yaml:
policy-config.yaml
pack:
name: mnpi-filter
version: "1.0.0"
enabled: true
policies:
chain:
- mnpi-filter
policy:
mnpi-filter:
detect_patterns:
- "earnings before announcement"
- "merger not public"
- "insider information"
- "board decision"Verify the result
Apply it to a test agent with the config-first workflow and use controlled provider responses:
| Provider response | Result with this list |
|---|---|
This contains insider information. | Blocked with mnpi.detected |
The meeting is tomorrow. | Allowed with mnpi.clean |
This company is not publicly traded. | Allowed. The built-in list would block it, because it contains not public. |
Read the nested result in the runtime event, and adjust the list with test data from your application.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
detect_patterns | string[] | Built-in list | Substrings that block an answer. Case does not matter. |
action | block | block | The only value. A match always blocks. |
Built-in phrases
Used when detect_patterns is missing:
earnings before announcementmerger not publicinsider informationboard decisionnot public
How it works
- The gateway takes the answer text from the buffered response.
- It lowercases the text and looks for each phrase as a substring.
- It also records which context keywords appear:
earnings,merger,insider,board decision,not public,acquisition, andipo. They do not change the verdict. - A phrase match blocks with
mnpi.detected. Otherwise, the answer is allowed withmnpi.clean. - The details record the match, the number of active phrases, and the context keywords.
Phase and verdicts
| Item | Value |
|---|---|
| Input phase | Not checked |
| Output phase | The buffered response text |
| Verdicts | allow, block |
| Reason code without a match | mnpi.clean |
| Reason code for a match | mnpi.detected |
Examples
Default output block
policy-config.yaml
pack:
name: mnpi-defaults
version: "1.0.0"
enabled: true
policies:
chain:
- mnpi-filter
policy:
mnpi-filter: {}Replace the phrases
Your list replaces the defaults, so include every phrase you need.
policy-config.yaml
pack:
name: investment-banking-guardrail
version: "1.0.0"
enabled: true
policies:
chain:
- mnpi-filter
- financial-compliance
policy:
mnpi-filter:
detect_patterns:
- "earnings before announcement"
- "pending acquisition"
- "guidance revision not public"
- "board decision"
- "deal valuation confidential"Limits and failure behavior
- Only answers are checked, never requests.
- A match always blocks. There is no
warnorredactmode. - Substring matching: the built-in
not publicalso matchesnot publicly traded. - The built-in list is small. Add the phrases that your legal and compliance teams identify, and review blocked events to find false matches and misses.
- With
stream: true, the control does not run. - A
whencondition does not limit this control. Use routes.
Next steps
- Financial Compliance: finance phrases and disclaimers.
- verdictan events: the decision for a request.