Level 3 · Building LLM systemsStage 11

Lesson 35 of 38 · Written learning

Deploy safely and observe the system

Move from a local prototype to a service that handles failures and protects secrets.

7 min read Free course lessonWeeks 29–31

Separate development, testing, and production configuration. Store secrets in the deployment environment, rotate them when exposed, and restrict who can access them. Add timeouts, bounded retries, rate limits, and input-size limits. Use fallbacks only when they preserve acceptable behavior; a silent fallback can conceal a broken model or return stale information.

Log enough, not everything

Observability uses logs, metrics, and traces to understand system behavior. Useful measures include request counts, error rates, latency, token usage, and selected quality signals. Prompts and outputs may contain private data, so avoid storing full content by default. Decide what is retained, why, who can see it, and when it is deleted.

  • Validate configuration at startup and fail clearly when required secrets are missing.
  • Use request IDs to connect events without exposing personal content.
  • Monitor timeouts, provider errors, and rate-limit responses.
  • Document data retention and deletion behavior for the deployed application.

Return to the Deployment, inference, and optimization stage · Suggested timing is flexible; move at your own pace.