Implementation guide OWASP AISVS v1.01

Monitoring, Logging & Anomaly Detection · Request & Response Logging

Log AI interactions with context

AISVS 12.1.1 Level 1

Verify that AI interactions are logged with session context and AI-specific telemetry.

OWASP AISVS v1.01, requirement 12.1.1

In plain English

For every AI call, record enough to work out later what happened: who asked, in which session, which model and version answered, what went in, what came out and what the safety checks decided. Without this you cannot investigate an incident or answer a complaint.

What good looks like

  • Each entry has a timestamp, the user or service identity, session and request IDs, the model and version, the input and output, token counts, guardrail decisions and any tool calls.
  • Sensitive content is redacted or minimised in line with your privacy policy.
  • Logs go to a central store with access controls and a defined retention period.
  • You can rebuild a full session from the logs.

How teams usually do it

  • Log at one gateway or proxy that every model call passes through, so every application logs the same way.
  • Use a shared naming scheme for fields, for example the OpenTelemetry semantic conventions for generative AI.
  • Send the logs to your security monitoring (SIEM) so they can drive alerts (see 12.2.1).

Suggested evidence

  • Sample log entries.
  • Logging configuration, the retention period and the list of who can read the logs.
  • A walkthrough that reconstructs one real session from the logs.

Common mistakes

  • Logging errors only.
  • Logging full prompts that contain personal data, with no redaction or retention limit. The log store then becomes your most sensitive database.
  • Every team logging in its own format, so events cannot be joined across systems.

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.