Financial Compliance
The financial-compliance policy runs in the output phase. It does these actions:
- It blocks a response that contains a configured
blocked_patternssubstring. - It adds disclaimer text before a response that looks like financial advice.
This policy is a deterministic phrase and disclaimer rule. It does not determine financial accuracy, suitability, or regulatory compliance.
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 a block when found in the output. | [] |
required_disclaimers | string[] | Disclaimer lines with a newline between them. The gateway adds them before output that looks like advice. | [] |
Behavior notes
- The policy uses plain substring checks for
blocked_patterns. It does not use regex evaluation. - If
required_disclaimersis empty and the response looks like advice, the default disclaimer isThis is not financial advice. - The gateway adds the disclaimer at the start of the response.
- The gateway adds disclaimers according to 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 the response contains an entry in
blocked_patternsas a substring, the response is blocked. - If no pattern matches, the gateway checks its built-in financial-advice heuristics.
- If the response looks like advice, the gateway checks its start for the disclaimer text.
- If the text is missing, the gateway adds the disclaimers before the output.
Best practices
- List each phrase that you want to block. The policy reads regex syntax as literal text.
- Use short, unambiguous disclaimer text because it is prepended verbatim.
- Use narrow
blocked_patternsto prevent blocks on generic educational content. - Pair with
mnpi-filterorpii-detectorwhen disclosure or data-protection controls are also necessary. - Use
stream: falsewhen this output control is necessary. The active SSE path does not run this evaluator.
Next steps
- MNPI Filter — Material non-public information controls
- Human Oversight — Escalation and review
- PII Detector — Personal-data redaction
- Quality Scorer — Output evaluation