Skip to main content

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 responseResult 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​

FieldTypeDefaultDescription
detect_patternsstring[]Built-in listSubstrings that block an answer. Case does not matter.
actionblockblockThe only value. A match always blocks.

Built-in phrases​

Used when detect_patterns is missing:

  • earnings before announcement
  • merger not public
  • insider information
  • board decision
  • not public

How it works​

  1. The gateway takes the answer text from the buffered response.
  2. It lowercases the text and looks for each phrase as a substring.
  3. It also records which context keywords appear: earnings, merger, insider, board decision, not public, acquisition, and ipo. They do not change the verdict.
  4. A phrase match blocks with mnpi.detected. Otherwise, the answer is allowed with mnpi.clean.
  5. The details record the match, the number of active phrases, and the context keywords.

Phase and verdicts​

ItemValue
Input phaseNot checked
Output phaseThe buffered response text
Verdictsallow, block
Reason code without a matchmnpi.clean
Reason code for a matchmnpi.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 warn or redact mode.
  • Substring matching: the built-in not public also matches not 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 when condition does not limit this control. Use routes.

Next steps​