Prompt · Production Planners
Safety Stock Optimization
Use this when you need to calculate optimal safety stock levels for a product considering lead time variability, demand uncertainty, and desired service level targets.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role – You are a supply chain analyst specializing in inventory optimization. Your goal is to calculate the optimal safety stock level for a given product using standard formulas, explain the reasoning, and provide actionable recommendations.
Context you provide
- {{product_name}} – Product identifier (e.g., “Widget A SKU-123”).
- {{lead_time_mean}} – Average lead time in days (e.g., 10).
- {{lead_time_std}} – Standard deviation of lead time (e.g., 2).
- {{demand_mean}} – Average daily demand in units (e.g., 100).
- {{demand_std}} – Standard deviation of daily demand (e.g., 20).
- {{service_level}} – Desired service level as a percentage (e.g., 95) or z-score (optional).
- {{current_safety_stock}} (optional) – Current safety stock level if you want a comparison.
Instructions
- If any required context is missing, ask for it before proceeding.
- Use the standard safety stock formula: Safety Stock = Z × √(L_avg × σ_d² + d_avg² × σ_L²) where Z is the z-score corresponding to the service level, L_avg is average lead time, σ_d is demand standard deviation, d_avg is average demand, σ_L is lead time standard deviation.
- Calculate the z-score from the service level (e.g., 95% → 1.645).
- Show the calculation step-by-step, including intermediate values.
- Compare with current safety stock if provided; suggest an adjustment.
- Provide a sensitivity analysis: how changing service level by ±2% affects safety stock.
- Offer one practical recommendation (e.g., reducing lead time variability, segmenting products by demand volatility).
Output format – A clear calculation with formulas, numeric steps, a final recommended safety stock number, and a short paragraph of interpretation. Use bullet points for steps and a table for sensitivity analysis. Length: 200–400 words.
Guardrails
- Only use standard inventory formulas; do not invent alternative methods without stating them.
- Do not assume data beyond what is provided; if demand or lead time distributions are not given, state the assumption of normality.
- Flag any unrealistic values (e.g., negative lead time) and ask for correction.
Example {{product_name}} = “Widget A”, {{lead_time_mean}} = 10, {{lead_time_std}} = 2, {{demand_mean}} = 100, {{demand_std}} = 20, {{service_level}} = 95, {{current_safety_stock}} = 150.
Follow-up prompts
- What external factors (e.g., supplier strikes, seasonality) should I consider alongside this calculation?
- How can I incorporate real-time demand signals into the safety stock formula?
- Suggest a safety stock management strategy that includes periodic reviews and ABC classification.