Loom AI Labs

Security investigation Implemented prototype

Privacy-Aware Context Preparation for RAG

This investigation treats privacy preparation as an application-visible stage with configurable direction, storage posture and audit evidence.

Status
Implemented prototype
Contributor
Loom AI Labs maintainers
Updated
2026-07-25
Reading time
6 min

Abstract

Research question

Where should detection, redaction and encrypted-original handling occur before retrieval or generation?

Context

A prompt instruction to ignore personal data does not remove that data from provider requests or logs. Context should be prepared before it enters retrieval and generation paths.

Proposed approach

  • Detect candidate personal information at explicit input and output boundaries.
  • Redact provider-facing context according to application policy.
  • Store encrypted originals only when the use case requires them.

Implementation

  • Configurable local PII preparation in a Spring Boot demo
  • Redacted context and audit output visible side by side
  • A no-remote-model mode for deterministic inspection

Observations

  1. 01

    Visible preparation stages are easier to test than prompt-only privacy claims.

  2. 02

    Local processing supports useful demonstrations without sending sample identifiers to a model provider.

Limitations

This work reports an implementation-linked investigation. It is not a peer-reviewed paper, certification or customer case study.
  • Pattern-based detection does not cover every identifier.
  • The implementation is a technical control, not a compliance determination.

Reproduce or inspect

Revision note and next questions

Last revised 2026-07-25 against AI Fabric 0.4.0 and the linked public artifacts.

  • How should organization-specific detectors be composed and evaluated?
  • What retention policies should apply to encrypted originals?

Linked live proof

live Privacy and security

Privacy Shield

A support message containing synthetic personal data is detected, redacted and audited before downstream processing.

  • PII handling
  • Redaction
  • Audit
  • Local processing

Input and output detection direction is configurable.

Continue

Read the evidence, then challenge the boundary.

Use the linked implementation and experiment to reproduce the observation or open a focused counterexample.

LoomAI

Let's connect your AI to your business.

Meet your AI integration engineer.

Mo.Elgammal

Mo.Elgammal

Founder / AI Enablement Engineer

United Kingdom

I'll help you set up Smart Brains for your business, create branded AI engagement channels, and connect LoomAI Desk so your team can take over AI conversations when needed.

Give your customers the AI experience they deserve.

  • Website & AI workspace
  • Data, tools & integrations

Choose a time that works for you.

Message me on WhatsApp +44 7729 946319