Deploying an LLM application requires more than confirming that an API call works. This reusable checklist covers the path from local prototype to production, including environment separation, secrets, model and prompt configuration, dependency validation, limits, observability, failure handling, security, and rollback planning.
Overview
An LLM application combines ordinary software components with variable external dependencies: model providers, prompts, retrieval systems, tool calls, token limits, and safety controls. A deployment can appear healthy while still failing under realistic traffic, unfamiliar inputs, provider errors, or a changed model response.
Use this AI app deployment guide at three points: when moving from a local prototype to staging, when promoting staging to production, and after a meaningful infrastructure, model, prompt, or provider change. Treat each item as evidence to collect, not merely a box to tick. For example, “rate limits configured” is weaker than a tested limit, a documented response path, and an alert when the limit is approached.
The precise commands and settings depend on your framework, cloud platform, container runtime, and model provider. Keep those implementation details in your repository or deployment documentation. The controls below are deliberately provider-neutral so the checklist remains useful as tools change.
Environment comparison
| Area | Local | Staging | Production |
|---|---|---|---|
| Purpose | Fast iteration and debugging | Release validation with production-like settings | Reliable service for real users |
| Data | Synthetic or approved samples | Controlled test data | Minimized, authorized, and governed data |
| Secrets | Local environment or developer secret store | Isolated deployment secrets | Managed secret store with restricted access |
| Model access | Low-volume development credentials | Separate project, account, or quota where possible | Production credentials and explicit usage limits |
| Observability | Logs and interactive debugging | Dashboards, traces, and alert rehearsal | Alerts, audit trails, and on-call ownership |
| Change control | Frequent local changes | Versioned release candidate | Reviewed, repeatable, and reversible release |
Checklist by scenario
1. Moving from local prototype to staging
- Separate configuration from application code. Define environment variables or configuration objects for the model identifier, provider endpoint, temperature or equivalent generation settings, maximum output size, timeouts, retry policy, and feature flags.
- Replace hard-coded credentials, tokens, database URLs, and webhook secrets. Confirm that secrets are not present in source files, images, build logs, notebooks, or client-side bundles.
- Lock and review dependencies. Record the runtime version, SDK versions, container base image, system packages, and any document parsers or embedding libraries used by the application.
- Define a reproducible build. The same commit should produce the same application artifact, subject to expected dependency resolution and external model behavior.
- Use a small, representative evaluation set covering normal requests, edge cases, refusals, malformed inputs, long inputs, and expected structured outputs. Run it before promotion rather than relying only on manual examples.
- Confirm that prompts are versioned and that the deployed application identifies the prompt version used for each request. The Prompt Engineering Playbook provides a useful framework for production prompt QA.
- Test the complete request path, including authentication, retrieval, tool calls, output parsing, persistence, and user-facing error handling.
2. Promoting staging to production
- Verify that production points to the intended model, provider project, region or endpoint, prompt version, retrieval index, and database. Avoid relying on defaults that can change silently.
- Set request, connection, and downstream timeouts. A timeout should produce a controlled response and useful logs rather than leaving workers occupied indefinitely.
- Configure rate limits at the application boundary and, where appropriate, per user, tenant, API key, or workflow. Add backpressure so spikes do not exhaust worker pools or provider quotas.
- Make retries selective. Retry transient transport failures when safe, but do not blindly retry validation errors, authentication failures, or non-idempotent tool actions. Use bounded exponential backoff and prevent retry storms.
- Check structured-output validation. If a model response must conform to JSON or a schema, validate it before use and define a repair, fallback, or human-review path.
- Confirm that sensitive content is excluded from unnecessary logs. Log request identifiers, timing, status, model and prompt versions, token or usage metadata when available, and failure categories without copying full user content by default.
- Review access controls for model credentials, vector stores, databases, queues, object storage, dashboards, and deployment systems. Grant services only the permissions they require.
- Exercise the rollback procedure in staging. Know whether rollback means restoring an application image, switching a feature flag, reverting a prompt, selecting a prior model configuration, or restoring data.
3. Adding retrieval or tools
- Version the indexing or retrieval configuration, including chunking rules, metadata fields, filters, embedding configuration, and source permissions.
- Test empty retrieval results, conflicting documents, stale content, unauthorized documents, oversized context, and provider failures. Review the RAG chunking and retrieval guide for an evaluation structure.
- Define tool schemas, argument validation, authorization checks, execution timeouts, and audit events. Treat model-generated tool arguments as untrusted input.
- Set limits on tool calls, chain length, retrieved context, and total request duration. A useful workflow must also have a clear stopping condition.
- Test prompt-injection and indirect-instruction cases before release. Application permissions should not expand merely because a retrieved document or user message asks the model to do so. See the prompt injection defense checklist.
What to double-check before release
Health checks and observability
Use a lightweight liveness check to determine whether the process is running and a readiness check to determine whether it can accept traffic. Do not make a health endpoint depend on an expensive generation request unless that is an intentional, controlled probe. If a dependency is unavailable, report enough information for the orchestrator and operator to distinguish “process alive” from “service ready.”
Track request volume, success and failure categories, latency by stage, timeout counts, retry counts, output-validation failures, provider errors, and resource saturation. For LLM workflows, also monitor prompt and completion usage where the provider exposes it, retrieval quality signals, tool-call failures, and fallback rates. Connect alerts to an owner and a runbook; an alert without an action path is easy to ignore.
Security and data handling
Document what data enters prompts, where it is stored, which services can access it, and how long operational records are retained. Redact secrets and unnecessary personal or confidential information before logging or sending data to an external dependency. Enforce authorization before retrieval and before tool execution, not only in the system prompt.
Include adversarial cases in release testing: prompt injection, attempts to extract hidden instructions, malicious files, oversized inputs, unexpected encodings, and requests to access another user’s data. The model is one component in the security boundary, not the security boundary itself.
Cost, capacity, and failure behavior
Estimate workload using realistic request sizes and concurrency rather than average interactive tests. Set input and output limits, queue or worker limits, and per-tenant controls. Review the LLM cost and latency audit checklist before launch, especially when prompts include retrieved context or multi-step chains.
Write down the behavior for provider timeouts, quota exhaustion, invalid model output, unavailable retrieval, failed tool execution, and partial data writes. A graceful fallback may be a concise error, a cached result, a reduced-capability mode, or a human-review queue. It should not imply that an unverified answer is authoritative.
Common mistakes
- Using one environment for everything: Shared credentials and data make testing risky and make incidents difficult to reproduce.
- Testing only the happy path: A successful short prompt says little about long context, malformed input, provider errors, or schema failures.
- Treating prompts as unversioned text: A small wording change can alter output structure, refusal behavior, cost, or retrieval use. Store prompt versions alongside code and evaluation results.
- Retrying every failure: Unbounded retries increase latency, cost, and provider pressure. Classify errors before deciding whether to retry.
- Logging complete requests by default: Full prompts and responses can contain sensitive data and inflate operational costs. Prefer metadata and controlled sampling.
- Skipping rollback rehearsal: During an incident, an undocumented rollback is likely to be slow or incomplete. Test it before the first real release.
- Assuming model output is a contract: Parse, validate, and constrain output before passing it to business logic, a database, or a tool.
- Ignoring migration risk: Provider and SDK changes can affect identifiers, parameters, limits, response formats, or error handling. Use a migration checklist and rerun evaluations before switching models or providers.
When to revisit this checklist
Run the full checklist before the initial production launch, after a major model or provider change, after modifying prompts or retrieval behavior, and after changing authentication, data flows, infrastructure, or tool permissions. Revisit it after a production incident, a material cost or latency change, or the introduction of a new tenant or workload.
For routine maintenance, review deployment commands, SDK configuration patterns, provider limits, container guidance, and security controls at least quarterly. A shorter review is appropriate whenever your cloud platform, model provider, runtime, or orchestration system publishes a breaking change. Keep a dated record of the review and link the result to the release.
Before the next deployment, copy this final action list into the release ticket:
- Record the commit, artifact, model, prompt, retrieval, and configuration versions.
- Run the evaluation set and review changes in quality, latency, cost, and failure behavior.
- Confirm secrets, permissions, rate limits, timeouts, retries, and data-redaction settings.
- Verify health checks, dashboards, alerts, owners, and incident runbooks.
- Test the rollback path and define the promotion window and decision owner.
- After release, watch initial traffic, compare it with the expected baseline, and document any follow-up work.
Production readiness is not a one-time certification. It is a repeatable habit of checking the inputs that can change: code, dependencies, prompts, models, data, traffic, permissions, and provider behavior.