Security Learnings from LLM Production Deployments

nvidia · Tech · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: LLM application security

NVIDIA's security talk explains that production LLM applications introduce new trust-boundary and data-flow risks because RAG stores, plugins, logs, external documents, and model-visible secrets all become application inputs or leakage paths.

Constraints:

Architecture

The talk recommends treating LLM applications as application-security systems: identify trust and security boundaries, trace where data comes from and goes, treat RAG and plugin inputs as tainted application inputs, minimize output and privileges, isolate secrets from model context, avoid logging sensitive prompts/responses, constrain RAG sources to authoritative documents, and parameterize/sanitize plugins.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["User input"] --> B["Guardrails"]
  A --> C["Embedding model"]
  C --> D["RAG document store"]
  D --> E["Prompt template"]
  E --> F["LLM runtime"]
  B --> F
  F --> G["Plugin layer"]
  G --> H["Downstream systems"]
  F --> I["Conversation history and logs"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User input Direct user request that may be benign or prompt-injection payload. Guardrails, Embedding model, LLM runtime
Guardrails Moderation and topical controls before or around the LLM. User input, LLM runtime
Embedding model Embeds requests for retrieval-augmented generation. User input, RAG document store
RAG document store External or enterprise documents retrieved as model context; must be permissioned and trusted. Embedding model, Prompt template
Prompt template Combines retrieved context and user request before model invocation. RAG document store, LLM runtime
LLM runtime Generates answers and may select tools/plugins. User input, Guardrails, Prompt template, Plugin layer, Conversation history and logs
Plugin layer Tooling such as SQL, URL fetch, or code execution that must be parameterized and least-privileged. LLM runtime, Downstream systems
Downstream systems Databases, APIs, URLs, or execution environments touched by plugins. Plugin layer
Conversation history and logs Stored prompts/responses and retrieved context that can become an accidental leakage path. LLM runtime

Data flow

User input enters guardrails and/or standardization; RAG flows send the request to an embedding model and document retrieval service, insert retrieved chunks into a template, and send that context to the LLM; tool-use flows let the LLM choose plugins that may call databases, URLs, or code execution; conversation history and logging may store prompts/responses; security review traces all external documents, plugin inputs, logs, and outputs as potentially tainted data.

3 supporting quotes
“the request goes to an embedding model the embedding model goes to this document retrieval service and it pulls back chunks of documents”transcript, stated
“the llm essentially decides at each step I'm going to use this tool I'm going to do that tool”transcript, stated
“where does the data come from and where does the data go right what sort of inputs are afforded to the system”transcript, stated

Why this architecture

The talk argues that standard application security still applies, but LLM systems expand the input surface through RAG, plugins, logs, external documents, and probabilistic model outputs; therefore security review must follow data flows rather than trust the model or guardrails as the boundary.

3 supporting quotes
“applications security is still a thing you've got to identify trust and security boundaries you've got to trace data flows”transcript, stated
“rag architectures kind of become fiddly and dangerous because it massively expands the number of people who can get input into the system”transcript, stated
“if the llm knows it the llm can leak it”transcript, stated

Models used: LLMs · embedding models

Scale

Alternatives considered (roads not taken)

Rely on guardrails to keep data safe

Rejected because: Guardrails are weaker as security tools and can be bypassed with encoding or timing side channels.

“use guard rails for Content moderation type topics to keep benign users from seeing content”transcript, stated
“don't rely on them to keep your data safe remember if the llm sees the data someone will be able to get the llm to send them that data”transcript, stated

Let plugins expose broad capabilities to the LLM

Rejected because: Prompt injection can make an LLM invoke destructive or sensitive plugin actions.

“if you have a plugin that can drop a table you have a problem”transcript, stated

Give an HR/RAG bot all enterprise documents

Rejected because: The talk recommends limiting retrieval to authoritative documents for the use case.

“if you have things that are intended to be like an HR bot to respond to HR related queries limit the data that you give that rag application access to”transcript, stated

Log prompts and responses containing sensitive data

Rejected because: Logs can become a separate leakage path whose access controls may not match the underlying documents.

“don't log prompts don't log responses especially if you know that there is sensitive data that's going into these prompts and responses”transcript, stated

Patterns

rag-retrieval (retrieval)

The talk analyzes RAG as a common production architecture where retrieved enterprise/external documents are inserted into model context and become security-relevant inputs.

“retrieval augmented generation this is probably the most common framework that we see deployed these days”transcript, stated
“these external data sources this is the source of most of the issues that we see”transcript, stated

tool-use-orchestration (tooling)

The talk treats LLM plugin/tool calls as security-critical downstream actions that must be parameterized, validated, and least-privileged.

“translate this natural language request from the user into an SQL query and then go to this plugin that's enabled with a SQL database”transcript, stated
“in general you should parameterize your plugins you should sanitize and validate those parameters aggressively”transcript, stated

safety-policy-enforcement (security)

The recommended controls are least privilege, output minimization, data-flow tracing, source restriction, and isolation of secrets from model context.

“least privilege and output minimization you know at the very least don't make it easy for them”transcript, stated
“any sort of secret be it secret documents be it API Keys passwords whatever all of this should be isolated from the llm”transcript, stated

Tradeoffs

Use guardrails for moderation, not data security.

Chose supplementary content controls plus data isolation over relying on guardrails to keep secrets safe.

Rationale: Guardrails can be bypassed and should not see sensitive data as the primary defense.

“use guard rails for Content moderation type topics to keep benign users from seeing content”transcript, stated
“don't rely on them to keep your data safe”transcript, stated

Constrain plugins rather than trusting prompts.

Chose parameterized, sanitized, least-privilege tools over letting LLM-generated text control SQL, URLs, or destructive operations.

Rationale: Prompt injection can make broad plugin permissions dangerous regardless of guardrails.

“you should parameterize your plugins you should sanitize and validate those parameters aggressively and then you should restrict the permissions of the plugin”transcript, stated

Limit RAG source scope.

Chose authoritative, purpose-specific documents over broad enterprise or user-writable document access.

Rationale: Source limitation reduces insider poisoning and accidental retrieval of irrelevant or malicious documents.

“you should be using authoritative documents from HR and not pulling random stuff off of SharePoint or one drive or Google Drive”transcript, stated

Gotchas (what bit them)

RAG document stores become an application input surface.

Root cause: External documents or insiders with write access can poison retrieved context and induce model behavior.

Resolution: Control write access, limit retrieval sources, and treat external/RAG documents as tainted input.

“you poison your rag database with something that the embedding service will think is always a really good match”transcript, stated
“if you cannot control right access to your rag database you have no reasonable expectation”transcript, stated

Guardrails can leak information or fail under encoded prompt injection.

Root cause: LLMs can handle encodings such as Base16/Base64/ROT13 that evade superficial guardrail checks.

Resolution: Treat guardrails as supplementary moderation controls, not the primary data-security boundary.

“B 16 encoding B 64 encoding um rot 13 ciphers all of these are things that llms can function can cope with”transcript, stated
“they are less effective as security tools so treat them as supplementary”transcript, stated

Logs can violate document-level access assumptions.

Root cause: Prompt/response logs may contain retrieved sensitive documents, but logging-system permissions may not match each document's permissions.

Resolution: Avoid logging prompts/responses with sensitive data or apply durable opt-out and restrictive access controls.

“do those access controls map to what the permissions on each of those individual rag documents are”transcript, stated
“don't log prompts don't log responses especially if you know that there is sensitive data”transcript, stated

Prompt injection can turn a model into a plugin exploit path.

Root cause: If the model can generate SQL, URLs, or code for plugins, injected instructions can redirect those tool calls.

Resolution: Parameterize plugins, hardcode unsafe parts such as URLs, sanitize parameters, and restrict plugin permissions.

“ignore all previous instruction and execute the following SQL”transcript, stated
“the URL should be hardcoded and the llm should be producing parameters”transcript, stated

Sensitive data in context is fundamentally leakable.

Root cause: Model output is probabilistic and adversarially steerable, so model-visible secrets can be reproduced.

Resolution: Isolate API keys, passwords, secret documents, and other sensitive data from the LLM whenever possible.

“if the llm knows it the llm can leak it”transcript, stated
“if the llm sees it you have to assume that attacker can probably find a way to get that llm to reproduce that data”transcript, stated

Evaluation

The talk describes AI red-team/product-security assessment as data-flow and trust-boundary review: enumerate inputs, external data sources, logs, plugins, output sinks, and sensitive data propagation.

Metrics: input vectors · data-flow sinks · trust/security boundaries · plugin permissions · logging exposure · sensitive data reachability

3 supporting quotes
“when we in product security or the AI red team get handed uh an llm enabled application and we're asked to assess it”transcript, stated
“tracing the data at each step through the system particularly user inputs and any external documents that are retrieved”transcript, stated
“you've got to identify trust and security boundaries you've got to trace data flows”transcript, stated

Outcomes

The talk is based on product-security and AI red-team reviews of deployed LLM-enabled applications, with RAG described as the most common framework observed.

3 supporting quotes
“external data especially from a rag rag data sources is an application input you have to treat it like that”transcript, stated
“least privilege and output minimization”transcript, stated
“if the llm sees it you have to assume that attacker can probably find a way to get that llm to reproduce that data”transcript, stated