Implementation guide OWASP AISVS v1.01

Memory, Embeddings & Vector Database Security · Embedding Sanitization & Validation

Flag contradictions in stored memory

AISVS 8.2.5 Level 3

Verify that new content written to memory is checked for contradictions with what is already stored and that conflicts trigger alerts.

OWASP AISVS v1.01, requirement 8.2.5

In plain English

When something new is written to memory, check whether it contradicts what is already there and raise an alert if it does. A sudden "the user's bank details have changed" or "the refund limit is now unlimited" is either a real update or an attack, and someone should decide which. This is a Level 3 control.

What good looks like

  • A new memory entry is compared with existing entries on the same subject before it is accepted.
  • A contradiction raises an alert or needs confirmation from the user or an operator.
  • The earlier entry is kept until the conflict is settled.
  • Alerts are reviewed and the outcomes recorded.

How teams usually do it

  • On write, a similarity search for related entries, then a contradiction check using a natural language inference model or a model prompt.
  • Stricter handling for high-value facts such as identity, payment details, permissions and policy.
  • Versioned memory, so an accepted change can be reversed.

Suggested evidence

  • Configuration of the contradiction check.
  • Sample alerts and how they were resolved.
  • A test where a conflicting fact is held for confirmation.

Common mistakes

  • Silently overwriting earlier facts with the newest one.
  • Alerting on every small difference until people stop reading the alerts.

Not sure which requirements apply to your system? Take the assessment, or browse every guide in this chapter.

Requirement text from the OWASP AI Security Verification Standard, licensed under CC BY-SA 4.0. This guidance is shared under the same licence.