Comparisons

COMPARISON

Locke vs Prompt Engineering and System Prompts

System prompts instruct a model how to behave — 'don't repeat personal information,' 'refuse to process medical records,' and so on. These are behavioral controls: they shape outputs, not what leaves your device. By the time a model reads its system prompt, the full prompt — sensitive fields included — has already crossed the network. A behavioral instruction and a data control are different things, working at different layers.

When Prompt engineering and system prompts fits

  • You need to shape model tone, format, scope, and refusal behavior — system prompts are exactly the right tool for that.
  • You are deploying an AI product and need to define the model's persona and constrain its response patterns.
  • You want to prevent the model from reproducing sensitive data in its outputs — system prompts can help with that.

When Locke fits

  • Your concern is data-in-transit — sensitive fields leaving the device in the first place.
  • You need a control that is resilient to prompt injection, which can override system-prompt instructions.
  • You need auditable evidence of what was detected and how it was handled, not just a behavioral guideline.

Side-by-side

DimensionLockeSystem prompts
When it actsBefore the prompt is sent — data is masked at composition time on the device.After the prompt is sent — the instruction is part of the transmitted payload.
Does sensitive data leave the device?No — masked content is substituted before transmission.Yes — the full prompt including sensitive fields is transmitted.
Resilience to prompt injectionNot relevant — data is stripped before reaching the model.Vulnerable — injected instructions can override system-prompt constraints.
Auditable evidenceLocal detection log of what was flagged and how it was handled.None — behavioral, not evidential.
Best forPreventing specific data from reaching any model context.Shaping model behavior once the model has received input.

Bottom line

System prompts and Locke solve different problems and belong in the same stack. A system prompt can tell a model not to repeat an SSN — but the SSN already left your device in the prompt. Locke removes it before transmission, so it never enters the model's context at all. Use both.