Case Privacy
The case-privacy policy detects and redacts legal case identifiers — case numbers, docket numbers, and party names — to protect the privacy of individuals involved in sensitive court proceedings.
Use this page when
- You need the exact command, config, API, or integration details for Case Privacy.
- You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
- If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.
Primary audience
- Primary: AI Agents, Technical Engineers
- Secondary: Technical Leaders
Configuration
policy:
case-privacy:
detect_patterns:
- case_number
- docket_number
- party_name
action: redact
pack:
name: case-privacy-example-1
version: 1.0.0
enabled: true
policies:
chain:
- case-privacy
Fields
| Field | Type | Default | Description |
|---|---|---|---|
detect_patterns | string[] | ["case_number"] | Pattern categories to detect. Supported values: case_number, docket_number, party_name |
action | string | "redact" | Action on detection. Only redact is supported |
Use Cases
Family Court Privacy
Redact all case identifiers in family court AI assistants to prevent disclosure of custody and divorce proceedings.
pack:
name: "family-court"
version: "0.1.0"
enabled: true
policies:
chain:
- prompt-injection
- case-privacy
- pii-detector
- audit-logger
policy:
prompt-injection:
threshold: 0.8
action: "block"
case-privacy:
detect_patterns:
- "case_number"
- "docket_number"
- "party_name"
action: "redact"
pii-detector:
action: "redact"
audit-logger:
retention_days: 2555
Immigration Case Protection
Protect immigration case numbers and applicant names from appearing in AI responses.
policy:
case-privacy:
detect_patterns:
- case_number
- party_name
action: redact
pack:
name: case-privacy-example-3
version: 1.0.0
enabled: true
policies:
chain:
- case-privacy
Input:
Summarize the ruling in case A123-456-789 involving Maria Garcia
Redacted output:
Summarize the ruling in case [CASE_NUMBER_REDACTED] involving [PARTY_NAME_REDACTED]
Juvenile Case Redaction
Block case numbers and docket references for juvenile proceedings where privacy is legally mandated.
pack:
name: "juvenile-court"
version: "0.1.0"
enabled: true
policies:
chain:
- case-privacy
- pii-detector
- audit-logger
policy:
case-privacy:
detect_patterns:
- "case_number"
- "docket_number"
action: "redact"
pii-detector:
action: "redact"
healthcare_mode: false
audit-logger:
retention_days: 2555
How It Works
The case-privacy policy scans both inbound requests and outbound responses for patterns matching legal case identifiers. It uses regex-based detection for structured formats (e.g., 2024-CV-00123, 1:24-cv-01234) and contextual analysis for party names that appear alongside legal terminology. When a match is found, the identified content is replaced with a redaction marker (e.g., [CASE_NUMBER_REDACTED]). The original content is never forwarded to the AI provider.
Best Practices
- Combine with
pii-detector: Case documents often contain personal information beyond case identifiers. Layercase-privacywithpii-detectorfor comprehensive protection. - Enable all pattern categories for sensitive jurisdictions: Family, juvenile, and immigration courts typically require redaction of case numbers, docket numbers, and party names.
- Use
audit-loggerfor compliance evidence: Many jurisdictions require proof that case privacy was maintained in AI interactions. Audit logs capture policy verdicts without storing redacted content. - Place early in the policy chain: Position
case-privacybefore policies that analyze content semantics to ensure identifiers are redacted before further processing.
For AI systems
- Canonical terms: Keeptrusts,
case-privacy, policy-config.yaml, detect_patterns, case_number, docket_number, party_name, action (redact). - Input/output scanning: applies to both inbound requests and outbound responses.
- Best next pages: CJIS Mode policy, PII Detector policy, Compliance Policies Configuration.
For engineers
- Place
case-privacyearly in the chain (before content-analysis policies) so identifiers are redacted before further processing. - Enable all three pattern categories (
case_number,docket_number,party_name) for family, juvenile, and immigration courts. - Combine with
pii-detectorfor comprehensive protection — case documents often contain personal information beyond case identifiers. - Validate by sending a prompt containing a case number format (e.g.,
2024-CV-00123) and confirming[CASE_NUMBER_REDACTED]appears in the output.
For leaders
- Case privacy protects individuals involved in sensitive court proceedings (family, juvenile, immigration) from having their case details exposed through AI interactions.
- Many jurisdictions legally mandate case-identifier redaction — this policy automates that requirement.
- Pair with
audit-loggerto prove case privacy was maintained for compliance evidence without storing redacted content. - The policy uses both regex-based detection for structured formats and contextual analysis for party names alongside legal terminology.
Next steps
- CJIS Mode policy — CJIS authentication and access logging
- PII Detector policy — broader personal data protection
- Compliance Policies Configuration — regulatory composition patterns
- Policies overview — policy chain architecture