Locke vs Prompt Engineering and System Prompts

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 on the device at composition time.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, sensitive fields included, 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.

Further reading