TL;DR: LLM observability gives teams visibility into hallucinations, drift, prompt injection, PII leakage, latency, and cost across traces, spans, and metrics, while Openlayer says more than 100 automated tests and real-time guardrails can bridge development and production monitoring. The governance lesson is that evaluation and live observability are complementary, not interchangeable, and both now sit inside AI risk management, security, and compliance work.
At a glance
What this is: This guide argues that LLM observability must extend beyond application logs to monitor model quality, safety, retrieval behaviour, cost, and runtime guardrails across production AI workflows.
Why it matters: IAM, security, and AI governance teams need shared telemetry on live model behaviour because prompt injection, sensitive-data leakage, and drift are operational controls issues, not just model-quality issues.
By the numbers:
- Over 80% of enterprises are expected to deploy generative AI applications or APIs by 2026, up from less than 5% in 2023.
- Nearly 60% of engineering teams report struggling with alert fatigue.
Context
LLM observability is the control layer that turns model behaviour into something teams can measure, investigate, and govern. In practice, it closes the gap between development-time evaluation and live production monitoring, which is where most AI risk shows up first.
For identity and security teams, the important shift is that AI systems now behave like governed production services, not static software components. That means telemetry must cover prompt handling, retrieval paths, guardrail decisions, and any point where an AI system can expose data or be steered off course.
Key questions
Q: How should security teams implement AI observability for production LLM applications?
A: Start by tracing prompts, responses, tool calls, and downstream actions so you can evaluate quality, not just uptime. Pair live production telemetry with reusable test datasets and automated scoring in CI/CD. The goal is to turn real failures into repeatable checks, catch regressions before release, and keep improving behavior as new prompts, models, and workflows are introduced.
Q: Why do prompt injection and PII leakage require runtime controls as well as testing?
A: Because pre-release tests cannot cover every live prompt, user behaviour, or retrieval path. Runtime controls are needed to stop unsafe inputs before they reach the model, while monitoring shows which attack patterns keep reappearing in production. Together they reduce both exposure and blind spots.
Q: What breaks when RAG systems are monitored only for output quality?
A: Teams miss whether the model used the right evidence in the first place. A RAG system can produce fluent answers while drawing from irrelevant or weakly grounded context, which means output-only checks can hide retrieval failure, policy drift, and silent exposure to unsafe documents.
Q: How should organisations compare evaluation and observability for AI governance?
A: Evaluation is the pre-release gate for known scenarios, while observability is the live control for real traffic and emerging failure modes. Organisations should use both, because evaluation prevents avoidable releases and observability catches issues that only appear under production load, adversarial input, or changing context.
Technical breakdown
Traces, spans, and metrics in LLM observability
LLM observability instruments the full request lifecycle so teams can reconstruct what happened from input to output. A trace shows the end-to-end journey, spans break it into model calls, retrieval lookups, and completion steps, and metrics aggregate behaviour over time. That matters because the failure is often semantic, not syntactic: the model can answer, but answer badly, leak data, or drift from intended behaviour without throwing an application error. The core architecture therefore combines runtime telemetry with post-inference analysis, giving teams a way to see both the path and the outcome.
Practical implication: instrument traces and spans early so production incidents can be tied back to the exact prompt, retrieval, or model step that caused them.
Why RAG observability needs context relevancy and groundedness
Retrieval-augmented generation adds a second control plane: the model is no longer only generating text, it is also selecting and using external context. Observability has to measure whether the retrieved documents were relevant, whether the model actually used them, and whether the final answer stayed grounded in source material. Without those signals, a RAG system can look healthy while quietly improvising around bad retrieval results. This is especially important in enterprise settings where data access, document scope, and context quality shape both accuracy and exposure risk.
Practical implication: track retrieval precision and groundedness together, not just output quality, or you will miss upstream failures that drive bad answers.
Real-time guardrails versus post-inference monitoring
Guardrails and observability solve different problems. Guardrails are preventive controls that inspect the request before the model or downstream system processes it, blocking prompt injection, PII exposure, jailbreak attempts, and other unsafe inputs. Observability is the detective layer that records what was blocked, what passed, and how the system behaved under real traffic. That division matters because some risks are only visible after the fact, while others must be stopped before execution. Teams that collapse the two usually underinvest in one of them and lose either prevention or forensic visibility.
Practical implication: separate prevention logic from telemetry so blocked requests still generate enough evidence for investigation and tuning.
Threat narrative
Attacker objective: The attacker aims to steer model behaviour, extract sensitive data, or cause unsafe downstream decisions without triggering a conventional application failure.
- Entry occurs when a user or external input supplies a crafted prompt, malicious retrieval content, or other adversarial text into the LLM request path.
- Credential_harvested is replaced here by control abuse: the model consumes unsafe context or injected instructions and begins following attacker intent instead of policy.
- Escalation happens when the compromised interaction reaches retrieval systems, internal data, or downstream actions, expanding the blast radius beyond a single response.
- Impact is PII leakage, hallucinated decisions, or manipulated outputs that degrade trust, compliance, and business operations.
Breaches seen in the wild
- ForcedLeak (Salesforce Agentforce) 2025: A critical Agentforce flaw let attackers steer an AI agent through a Web-to-Lead form to leak CRM data via an expired allowlisted domain.
- Meta Muse agent hijack 2026: An undocumented Muse setting let local malware hijack Meta's personal AI agent, steal its authentication material and abuse user access.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
LLM observability has become an AI governance control, not a debugging feature. Once models influence customer journeys, document retrieval, and internal actions, telemetry becomes part of the control environment. That shifts observability out of the engineering convenience bucket and into the governance layer where risk, compliance, and operational resilience meet. Practitioners should treat it as a core control for production AI, not a post-incident luxury.
Evaluation and monitoring are complementary controls with different failure windows. Evaluation tells you whether a model behaves acceptably on known scenarios before release, while observability shows how it behaves under real traffic, real data, and real attack patterns. One does not replace the other because model failures often appear only after deployment, especially when prompts, retrieval sources, or user behaviour change. Teams that rely on one control will miss the other half of the risk surface.
RAG creates a context governance problem as much as a model governance problem. Once retrieval is in the request path, the question is not only whether the model is accurate, but whether the model is using the right evidence and staying within approved context boundaries. Retrieval trust gap: the system can appear reliable while quietly drawing from irrelevant or unsafe context. That makes context relevancy and groundedness citable governance signals, not optional quality metrics. Practitioners should govern the retrieval layer as tightly as the model layer.
Security teams need guardrail telemetry because AI abuse is often invisible to conventional logs. Prompt injection, PII leakage, and jailbreak attempts may never produce the kinds of errors that traditional monitoring expects. The control question becomes whether blocked attempts are being observed, counted, and fed back into policy tuning. That is how AI security starts to resemble identity and access governance: not every bad request succeeds, but every attempt should leave a trace.
From our research library:
- 96% of security operations teams report critical blind spots, most commonly in cloud infrastructure (74%) and identity and access behaviour (67%).
- Read next: AI Agent Observability, Audit and Incident Response Guide
What this signals
Retrieval trust gap: the real control issue in LLM observability is not whether the model can answer, but whether the model is answering from approved context. As AI systems move deeper into production workflows, governance needs visibility into the retrieval layer, guardrail outcomes, and the relationship between blocked inputs and live risk.
Openlayer's focus on compliance mapping is directionally right for the market even when the tooling discussion is vendor-specific. Teams should expect AI governance to converge with security operations, because runtime telemetry, audit evidence, and policy enforcement are increasingly the same operational problem.
For practitioners
- Instrument the full request lifecycle Capture inputs, retrieved context, model outputs, and guardrail events in one trace so investigations can reconstruct AI behaviour end to end.
- Separate evaluation from live monitoring Use offline tests to validate known scenarios before release, then monitor production traffic for drift, prompt injection, and PII exposure.
- Set thresholds tied to user impact Define alert thresholds for latency, hallucination rate, groundedness, and cost per session so operational alerts map to business risk.
- Feed blocked attempts back into controls Review repeated guardrail triggers, refine policy logic, and add the observed attack patterns to regression test suites.
Key takeaways
- LLM observability is now a governance requirement because model failures, data leakage, and retrieval errors often do not appear in standard application logs.
- The article distinguishes between offline evaluation and live monitoring, with each covering a different failure window in production AI.
- Practitioners should instrument traces, guardrails, and retrieval signals together so AI quality and security can be governed as one operational control surface.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST AI RMF, NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | GOVERN — AI Governance and Accountability | The article centres on production AI governance and observability as a control. |
| MEASURE — AI Measurement and Evaluation | Evaluation, drift, hallucination, and groundedness are measurement problems in the article. | |
| MANAGE — AI Risk Treatment and Response | Runtime guardrails and monitoring translate directly into AI risk treatment. | |
| Recommendation — Define AI observability ownership and evidence requirements under GOVERN for production models. Use MEASURE to track hallucination, groundedness, and drift as operational AI risk signals. Apply MANAGE to link guardrail actions to incident response and policy tuning. | ||
| NIST SP 800-53 Rev 5 | AU-6 — Audit Record Review, Analysis, and Reporting | LLM traces and guardrail events function as audit evidence for AI behaviour. |
| Recommendation — Review AI telemetry under AU-6 so blocked prompts and anomalies are actionable audit records. | ||
| NIST CSF 2.0 | DE.CM-01 — The network and system infrastructure is monitored to find potential cybersecurity events | The article is fundamentally about continuous monitoring of production AI systems. |
| PR.DS-01 — Data-at-rest is protected | The article repeatedly raises PII leakage and data governance in AI observability. | |
| PR.AA-05 — Access Permissions, Entitlements and Authorizations | Prompt injection and model tool access are governed through authorisation boundaries. | |
| Recommendation — Extend DE.CM-01 monitoring to AI request paths, guardrails, and retrieval workflows. Use PR.DS-01 to ensure sensitive prompts, retrieved context, and outputs are protected appropriately. Apply PR.AA-05 to restrict which AI actions, tools, and data paths a production system can invoke. | ||
Key terms
- LLM observability: LLM observability is the discipline of tracing, testing, and monitoring language model behaviour in production. It goes beyond uptime metrics by examining prompts, outputs, retrievals, tool calls, and policy outcomes so teams can see whether an AI system is safe, useful, and compliant.
- Groundedness: Groundedness is the degree to which an AI response can be supported by verifiable source material. In practice, it measures whether the model answered from evidence rather than inference, memory, or fabrication, which is critical for RAG systems and any workflow that drives decisions from model output.
- Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads, causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
- Retrieval-augmented Generation: Retrieval-augmented generation is a pattern where an AI model pulls external information before generating output. The security challenge is that access rules can weaken when data is chunked, embedded, cached, or reused, so source permissions may not automatically follow the content into the model's context.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management. It gives security and identity practitioners a structured way to connect control design to production risk.
Published by the NHIMG editorial team on September 6, 2026.
Updated on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org