Skip to content

feat: masking of PII - #71

Merged
schiwekM merged 50 commits into
mainfrom
feat/masking
Sep 23, 2026
Merged

schiwekM merged 50 commits into
mainfrom
feat/masking

Conversation

@schiwekM

@schiwekM schiwekM commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Mask PII properties returned from queries, actions and functions so the LLM works with hashes and not the actual PII.
Masked values are shown in traces, actual values are injected for the hashes when the message is returned to the user.

The hashing is seeded for each conversation, to ensure that LLMs cannot infer relations between PII across sessions.

Masking of AI Core is not enabled because it has larger performance impact and when we mask the initial user input and tool results we do not need the AI Core masking, thus leading to a better performance.

Have you...

  • Added relevant entry to the change log?

@schiwekM
schiwekM marked this pull request as ready for review September 8, 2026 14:56
@schiwekM
schiwekM requested review from a team as code owners September 8, 2026 14:56
@schiwekM
schiwekM requested a review from Akatuoro September 8, 2026 14:56
@schiwekM
schiwekM added this pull request to stack #115 September 12, 2026 12:14

@Akatuoro Akatuoro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a first pass:

  • The masking map should not be managed in its own table...
  • There are way too many scrubForTrace, we should have the tool call result always directly in the usable form

Two ideas:

  • Since this is about masking for the LLM, only do masking in wrapModelCall, or
  • Mask directly in the tool result and resolve only when calling another tool or when sending something to the user

The first one seems much cleaner to me while still fulfilling the core goal.

Comment thread package.json Outdated
Comment thread srv/entities.cds Outdated
Comment thread .docs/data-privacy.md
@schiwekM
schiwekM requested a review from Akatuoro September 18, 2026 11:29
@schiwekM
schiwekM merged commit 6a557d0 into main Sep 23, 2026
11 checks passed
@schiwekM
schiwekM deleted the feat/masking branch September 23, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants