Financial Compliance
The financial-compliance policy is an output-phase policy. It does two things:
- blocks when the response contains any configured
blocked_patternssubstring - prepends disclaimer text when the response looks like financial advice
Configuration
pack:
name: financial-compliance
version: 1.0.0
enabled: true
policies:
chain:
- financial-compliance
policy:
financial-compliance:
blocked_patterns:
- you should buy
- you should sell
- guaranteed return
- strong buy
- strong sell
required_disclaimers:
- This is not financial advice.
- Consult a qualified financial advisor before making investment decisions.
Fields
| Field | Type | Description | Default |
|---|---|---|---|
blocked_patterns | string[] | Case-insensitive substrings that cause an immediate block when found in the output. | [] |
required_disclaimers | string[] | Disclaimer lines joined with newlines and prepended when the response looks like advice. | [] |
Behavior notes
blocked_patternsare plain substring checks, not regex evaluation.- If
required_disclaimersis empty and the response looks like advice, the default disclaimer isThis is not financial advice. - The disclaimer is inserted at the start of the response, not appended at the end.
- Disclaimer injection is driven by built-in advice heuristics such as
buy,sell,you should invest,guaranteed returns,target price,strong buy, andstrong sell.
Use Cases
Block strong recommendations
policy:
financial-compliance:
blocked_patterns:
- you should buy
- target price
- guaranteed return
required_disclaimers:
- This is not financial advice.
Disclaimer-only mode
policy:
financial-compliance:
required_disclaimers:
- This is not financial advice.
- Review any financial decisions with a licensed advisor.
How It Works
- After the upstream model returns a response, the policy lowercases the output text.
- If any entry in
blocked_patternsis present as a substring, the response is blocked. - Otherwise, the gateway checks its built-in financial-advice heuristics.
- If the response looks like advice and does not already start with the disclaimer text, the disclaimers are prepended to the output.
Best Practices
- List every phrase you want blocked explicitly; regex syntax is treated literally here.
- Use short, unambiguous disclaimer text because it is prepended verbatim.
- Keep
blocked_patternsnarrow enough to avoid blocking generic educational content. - Pair with
mnpi-filterorpii-detectorwhen you also need disclosure or data-protection controls.
Next steps
- MNPI Filter — Material non-public information controls
- Human Oversight — Escalation and review
- PII Detector — Personal-data redaction
- Quality Scorer — Output evaluation