Skip to main content
On LLM projects, you can redact personally identifiable information from trace data before it is stored. PII redaction lives in the Privacy section on Project settings → General. This setting is not the same as the Contains PII test, which detects PII in your data, or gateway guardrails, which block or redact PII on requests and responses in real time.

Turn on PII redaction

PII redaction is available on LLM projects only.
  1. Open the LLM project.
  2. Go to Settings → General.
  3. Find the Privacy section: “Control how sensitive data is handled in this project.”
  4. Turn on PII redaction: “Redact personally identifiable information from trace data before it is stored.”
When you enable it, Openlayer shows PII redaction enabled with “Trace data will be redacted for the selected entity types.” When you disable it, Openlayer shows PII redaction disabled.

Choose entity types

With PII redaction on, Entity types to redact appears. Use the Select entity types… control to choose the entity types to redact. You can search with Search entity types… and select all types at once.

Set languages

The Languages setting applies to both PII redaction and the Contains PII test, even when redaction is off. English is the default; an empty selection also uses English. Add Dutch for Dutch or mixed English and Dutch traces. With Dutch selected, names, locations, and nationalities are flagged only when English and Dutch detection agree. This reduces false positives in mixed-language text, but can miss a name that only one language recognizes. Pattern-based entities such as email addresses, credit cards, and IDs are unaffected.

What gets redacted

Openlayer redacts personally identifiable information from trace data before it is stored, for the entity types you select. For object and array outputs, and JSON encoded inside message content, Openlayer redacts the string values while preserving the JSON structure. Redacted stored text cannot be recovered. Set Languages to match your traces before or when you turn on redaction for names, locations, or nationalities. Use this setting when you want stored traces to omit PII. Use the Contains PII test when you want to measure whether PII is present. Use gateway guardrails when you want to block or redact PII on traffic before it reaches a provider or a user.