Subscribe to the Non-Human & AI Identity Journal

How should security teams audit LLM usage without missing sensitive input data?

They should log at the interaction layer, not only the application layer. That means capturing prompt content, pasted files, session IDs, tool identity, account type, and data lineage from source file to AI destination. If the control only records login events or outputs, it will miss the exposure point where sensitive data entered the conversation.

Why This Matters for Security Teams

Auditing LLM usage is not just about proving that a chatbot was opened. The security risk sits in the moment sensitive text, files, or system context are introduced into the model conversation, then copied into logs, memory, retrieval stores, or downstream tools. If telemetry starts too late, teams can miss the actual exposure path and only see a harmless-looking output record. That leaves investigation, legal review, and containment incomplete. The NIST Cybersecurity Framework 2.0 is useful here because it pushes teams to connect governance, detection, and response instead of treating logging as a standalone task.

The practical challenge is that LLM usage often spans browser sessions, SaaS copilots, internal chat tools, API calls, and agent workflows. Each layer can hide a different part of the data trail. Security teams usually get into trouble when they depend on application logs that show only prompt timestamps or final completions, because the evidence of sensitive input may already have been lost, transformed, or routed into another service. In practice, many security teams encounter the exposure only after an incident review, rather than through intentional monitoring of the interaction itself.

How It Works in Practice

Effective auditing starts by defining the interaction boundary. That means logging the event where a user, agent, or system submits content to an LLM, not only the event where the model returns a response. A usable audit record should tie together user identity, session ID, application or agent identity, tool invocation, prompt content or a secure hash of it, attached files, retrieval references, and data lineage markers that show where the content came from and where it was sent.

For many organisations, the minimum useful design is a layered record:

  • Identity layer: who initiated the request, from which account type, and under what privilege.
  • Interaction layer: prompt, pasted text, uploaded file metadata, and conversation state.
  • Tool layer: which connector, plugin, or agent action accessed external systems.
  • Data layer: classification, source system, retention rule, and destination endpoint.

That approach aligns with current guidance in the NIST AI 600-1 Generative AI Profile and the NIST AI Risk Management Framework, both of which stress traceability, measurement, and governance for AI risk. For agentic deployments, the OWASP Agentic AI Top 10 is also relevant because autonomous actions can move sensitive data across tools without a user explicitly retyping it. Organisations should prefer structured logs and redaction controls over raw transcript dumping, since auditability and privacy must be balanced. These controls tend to break down when shadow AI tools bypass the approved proxy, because the interaction never enters the logging path at all.

Common Variations and Edge Cases

Tighter interaction logging often increases privacy, storage, and legal-review overhead, requiring organisations to balance forensic value against data minimisation. Best practice is evolving on how much prompt content should be retained in full versus tokenised, hashed, or selectively redacted, and there is no universal standard for this yet. The right answer depends on sensitivity, jurisdiction, and whether the system is used for customer data, source code, or regulated records.

Edge cases matter most when LLMs are embedded inside office suites, IDEs, contact-centre systems, or browser extensions. In those environments, the true source of the sensitive data may be a pasted fragment, an uploaded attachment, or a retrieval result rather than a typed prompt. Teams also need to separate human usage from agent usage, because an agent can fetch, summarise, and transmit sensitive information without a fresh user action. That is where frameworks like MITRE ATLAS adversarial AI threat matrix and CSA MAESTRO agentic AI threat modeling framework help teams think about abuse paths, tool misuse, and traceability. Organisations using regulated data should also align retention and evidentiary handling with broader control expectations in NIST SP 800-53 Rev 5 Security and Privacy Controls. The guidance becomes unreliable when LLM access is mediated by unmanaged plugins or personal accounts, because audit records become fragmented across systems the security team does not control.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 DE.CM Continuous monitoring is needed to see prompt-level exposure, not just logins.
NIST AI RMF AI RMF governance and measurement support traceable, accountable AI logging.
NIST AI 600-1 GenAI profile emphasizes traceability and risk treatment for AI interactions.
OWASP Agentic AI Top 10 Agentic systems need visibility into tool use and autonomous data movement.
MITRE ATLAS AML.TA0002 ATLAS helps model prompt injection and other AI abuse paths affecting logs.

Build monitoring that captures interaction events and feeds them into detection and response workflows.