Implementation Guide

Producing one audit log format across multiple LLM providers

A unified audit log format for multiple LLM providers is a versioned schema with a small required core, such as caller identity, policy context, model interaction, outcome, tool calls, and integrity metadata. Each provider payload is mapped into that core at one capture point you control. The raw payload is kept separately, and fields a provider does not supply are marked explicitly as absent.

Treat the audit log as a normalization problem

The goal is a single record shape, whichever provider handled the call. Rather than treating each provider payload as the audit record, define one versioned schema and map every payload into it. The approach rests on four decisions:

  • A small required core. Every record carries the same core fields.
  • One capture point you control. Mapping happens in one place, not separately for each provider.
  • The raw payload kept separately. The normalized record does not replace the original.
  • Explicit absence. When a provider does not supply a field, the record marks it as absent rather than leaving it silently empty.
  1. Provider payloadsRequests and responses from each LLM provider.
  2. Single capture pointMaps each payload into the versioned core schema.
  3. Audit recordNormalized record, with the raw payload stored separately.

Fields the normalized record needs

The required core groups the information an auditor needs to reconstruct a call: who made it, which policy applied, what the model did, what tools were invoked, and whether the record can be trusted.

Core of a provider-agnostic audit record
Field groupWhat it records
Event and correlation IDsUnique record ID plus a trace ID that links related calls.
Caller identityThe user, service, or agent that initiated the call.
Policy contextPolicy version, decision, and permissions in force.
Model interactionProvider, model, parameters, content or content hash, usage, outcome.
Tool callsTool, arguments, result, and approval state, linked to the parent request.
Integrity and schema versionHash chain or signature, redaction markers, and schema version.

Where a provider does not return a given value, such as a usage figure, the field stays in the record and is marked as absent.

Where to capture events: three architectural options

Whichever architecture you choose, the mapping from provider payload to core record should happen at one capture point you control. That keeps the schema consistent and gives the raw payload a single place to be stored.

Identity, policy, and tool-call attribution

Each record should identify the caller, whether a user, a service, or an agent, and the policy context in force: the policy version, the decision, and the permissions that applied.

Tool calls are recorded with the tool, its arguments, its result, and its approval state. Each is linked to the parent request, and the trace ID ties related calls together so that a multi-step interaction can be followed from the first request to the last.

Redaction, schema versioning, and log integrity

The model interaction records content or a content hash, so teams can choose how much content the audit record holds. When content is redacted, redaction markers show where and that it occurred.

Every record carries a schema version, which lets the format evolve while older records remain readable. A hash chain or signature provides integrity metadata, so changes to the log can be detected.

Where a runtime governance layer fits

Caller identity, permissions, policy decisions, and tool calls all need to appear in the same record as the model interaction. A runtime governance layer is one candidate location for the single capture point described above.

Review your audit logging design

Discuss how identity, permissions, tool calls, and policy decisions can be captured in one record across your LLM providers.

Talk to an Expert