Inferensys

Prompt

Cost-Incurring Action Approval Prompt for FinOps Agents

A practical prompt playbook for generating structured spend approval requests before FinOps agents provision paid resources or change reservation tiers. Includes variable definitions, output contracts, evaluation rubrics, and failure mode analysis.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the exact job-to-be-done, the ideal user, and the critical boundaries for deploying a cost-incurring action approval prompt in a FinOps agent workflow.

This prompt is designed for cloud and SaaS cost management teams building AI agents that can initiate cost-incurring actions. Use it when your FinOps agent identifies an optimization opportunity that requires spending money, such as purchasing a Savings Plan, upgrading a reservation tier, or provisioning a paid service. The prompt forces the agent to produce a structured approval request with estimated cost, billing impact, resource type, commitment duration, and budget threshold comparison before any action executes. This is not a prompt for general cost reporting or anomaly detection. It is specifically for the approval gate that sits between a recommendation and a spend action. The output is meant to be routed to a human reviewer or an approval workflow system, not executed automatically.

The ideal user is a platform engineer or FinOps practitioner embedding an AI agent into a cloud cost management pipeline. Required context includes the specific cost recommendation, the target account or project ID, the current budget threshold, and the proposed action's parameters. You should not use this prompt for read-only cost analysis, anomaly alerts, or actions that do not immediately incur new charges. A common failure mode is applying this prompt to a savings recommendation (like turning off idle instances) that reduces cost, which requires a different, lower-risk approval path. Another anti-pattern is using this prompt without a downstream system that can enforce the block—if the agent can still execute the action regardless of the approval output, the prompt provides a false sense of security.

Before implementing, ensure you have a human review queue or webhook receiver ready to consume the structured JSON output. The prompt's value is in standardizing the approval payload so that routing rules, budget checks, and audit logs can operate on a predictable schema. Avoid modifying the prompt to include automatic approval logic for low-cost items unless you have a separate, tested threshold policy. The next step is to copy the prompt template and wire it into your agent's decision loop, ensuring that the agent cannot proceed to the execution step without a valid status: approved response from the review system.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Cost-Incurring Action Approval Prompt works, where it fails, and the operational preconditions required before deploying it in a FinOps agent pipeline.

01

Good Fit: Pre-Provisioning Spend Gates

Use when: an AI agent is about to provision a paid resource (reserved instance, SaaS seat, support plan) and the estimated cost exceeds a defined budget threshold. Guardrail: wire the prompt into a pre-execution hook that blocks the provisioning API call until a human approves the structured request.

02

Good Fit: Reservation Tier Changes

Use when: an agent recommends or executes a commitment change (1-year to 3-year Reserved Instance, switching savings plans) that alters monthly spend. Guardrail: require the prompt output to include a commitment duration comparison and a break-even analysis before routing to a FinOps reviewer.

03

Bad Fit: Real-Time Penny Auctions

Avoid when: the system is making sub-second bidding decisions on spot instances or low-value resources where human latency would break the workflow. Guardrail: use a hardcoded spend cap and anomaly detection instead; reserve this prompt for changes that alter the cap itself or commit long-term spend.

04

Bad Fit: Post-Incident Emergency Scaling

Avoid when: an incident response agent needs to immediately scale capacity to restore service during a Sev-1 outage. Guardrail: design a separate emergency bypass path with automatic post-action review; this approval prompt should gate non-urgent optimization actions, not block incident recovery.

05

Required Inputs: Budget Context

Risk: the prompt generates a generic approval request without comparing the proposed cost to the team's actual budget. Guardrail: always inject the current budget allocation, remaining headroom, and forecasted overrun risk into the prompt's [BUDGET_CONTEXT] variable so the output quantifies the budget impact.

06

Operational Risk: Approval Fatigue

Risk: if every minor cost change triggers this prompt, reviewers will start blindly approving requests. Guardrail: set a materiality threshold (e.g., actions with <$50/month impact or <$500 total commitment are auto-approved) and only route requests above that threshold through this prompt.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating a structured spend approval request before a FinOps agent provisions or modifies a cost-incurring cloud or SaaS resource.

This prompt template is designed to be integrated into a FinOps agent's decision loop. Before the agent executes any action that would create a new cost, change a reservation tier, or modify a billable resource, it should use this prompt to generate a human-readable approval request. The template forces the model to act as a meticulous financial gatekeeper, comparing the proposed action against the available budget data and surfacing all relevant fiscal implications. The output is a structured payload that can be sent to a human approval queue, a Slack channel, or a ticketing system.

text
You are a FinOps gatekeeper agent. Your purpose is to generate a structured, data-backed approval request before any cost-incurring action is taken. You must not approve or deny the request; you only prepare the approval package for a human.

Analyze the proposed action against the provided context and generate an approval request using the [OUTPUT_SCHEMA] below.

[ACTION_DESCRIPTION]: The specific technical action being proposed (e.g., 'Provision a new m5.2xlarge EC2 instance', 'Purchase a 1-year committed use discount for BigQuery').
[ESTIMATED_COST]: A detailed breakdown of the estimated cost, including unit price, quantity, and time period (e.g., '$0.384 per hour * 730 hours = $280.32/month').
[RESOURCE_TYPE]: The category of the resource (e.g., 'Compute', 'Database', 'SaaS License', 'Support Plan').
[COMMITMENT_DURATION]: The billing commitment term, if any (e.g., 'On-Demand', '1 Year Reserved', 'Monthly Subscription').
[BUDGET_CONTEXT]: The relevant budget data, including the current monthly/quarterly budget, the amount already spent, and the forecasted spend without this action.
[RISK_LEVEL]: A preliminary risk classification based on cost and budget impact (e.g., 'Low', 'Medium', 'High').

[OUTPUT_SCHEMA]:
{
  "approval_request_id": "[A unique ID for this request]",
  "summary": "[A one-sentence summary of the action and its total estimated monthly impact, e.g., 'Request to provision a new m5.2xlarge instance for the Dev environment at an estimated cost of $280/month.']",
  "action_details": {
    "technical_description": "[ACTION_DESCRIPTION]",
    "resource_type": "[RESOURCE_TYPE]",
    "commitment_duration": "[COMMITMENT_DURATION]"
  },
  "cost_analysis": {
    "estimated_monthly_impact": "[The total estimated cost per month as a float]",
    "cost_breakdown": "[ESTIMATED_COST]",
    "budget_comparison": {
      "current_budget": "[The total budget for the period as a float]",
      "spent_to_date": "[The amount already spent in the period as a float]",
      "forecasted_spend_without_action": "[The forecasted total spend for the period without this action as a float]",
      "forecasted_spend_with_action": "[The new forecasted total spend if this action is approved as a float]",
      "budget_remaining_after_action": "[The amount of budget remaining after the action as a float]",
      "budget_overrun_risk": "[A boolean: true if forecasted_spend_with_action exceeds current_budget, otherwise false]"
    }
  },
  "risk_assessment": {
    "risk_level": "[RISK_LEVEL]",
    "risk_rationale": "[A brief explanation of the risk level, mentioning budget overrun risk or spending velocity.]"
  },
  "human_approval_prompt": "[A clear, concise question for the human approver, e.g., 'Approve the provisioning of this m5.2xlarge instance for $280/month?']"
}

[CONSTRAINTS]:
- If [ESTIMATED_COST] is missing or cannot be determined, set the `risk_level` to 'Critical' and the `human_approval_prompt` to 'ACTION BLOCKED: Cost estimate unavailable. Manual review required.'
- If `budget_overrun_risk` is true, the `risk_level` must be at least 'High'.
- All monetary values must be in USD and formatted as floats with two decimal places.
- Do not invent any data. If a field from [BUDGET_CONTEXT] is missing, use `null` for that field in the JSON output.

To adapt this template, replace the square-bracket placeholders with data fetched from your FinOps platform (e.g., CloudHealth, Vantage), cloud provider APIs (AWS Cost Explorer, Azure Cost Management), and your internal budget tracking system. The [OUTPUT_SCHEMA] is designed to be parsed by an orchestration layer. If the budget_overrun_risk field is true or the risk_level is High or Critical, your application logic should automatically route the approval request to a senior approver or block the action entirely until a human explicitly acknowledges the risk. Always log the full JSON payload as an audit record before presenting the human_approval_prompt to the reviewer.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Source these from your cloud provider APIs, FinOps platform, and internal budget tooling before calling the model.

PlaceholderPurposeExampleValidation Notes

[ACTION_DESCRIPTION]

Human-readable summary of the proposed cost-incurring action

Purchase 3-year Savings Plan for Amazon RDS db.r6g.xlarge in us-east-1

Must be non-empty string. Reject if only generic terms like 'buy something' are present.

[ESTIMATED_COST]

Projected cost impact with currency, amount, and period

{"amount": 12450.00, "currency": "USD", "period": "annual"}

Validate JSON structure. Amount must be > 0. Currency must be ISO 4217 code. Period must be from allowed enum: hourly, monthly, annual, one-time.

[BILLING_IMPACT]

Effect on current billing: new spend, savings vs. on-demand, or commitment change

Switches workload from on-demand ($0.256/hr) to 3-year commitment ($0.152/hr), saving ~40% annually

Must contain a comparison to current state. Reject if no baseline is provided.

[RESOURCE_TYPE]

Cloud or SaaS resource category being provisioned or modified

Compute (RDS Instance), Storage (S3 Intelligent-Tiering), or Reservation (EC2 Savings Plan)

Must match a known resource type from the organization's FinOps taxonomy. Reject unknown types.

[COMMITMENT_DURATION]

Length of financial commitment if applicable

3 years, partial upfront

If action is a commitment, this field is required. Duration must be from allowed set: none, 1-year, 3-year. Reject if missing for reservation-type actions.

[BUDGET_THRESHOLD_COMPARISON]

How the estimated cost relates to defined budget thresholds

Estimated annual cost of $12,450 exceeds the 'RDS Production' monthly budget alert of $10,000 by 24.5%

Must include a numeric comparison to a named budget. Reject if budget name is missing or comparison is qualitative only (e.g., 'a lot').

[APPROVAL_CONTEXT]

Business justification and any relevant tags or cost centers

{"cost_center": "eng-platform-42", "project": "data-lake-migration", "justification": "Replacing 12 on-demand instances with consistent workload"}

Validate JSON. Cost center and justification are required. Reject if justification is empty or fewer than 20 characters.

[SOURCE_SYSTEMS]

Origin APIs or platforms that provided the cost and resource data

["AWS Cost Explorer API", "Internal FinOps Dashboard v2.3"]

Must be a non-empty array of identifiable system names. Reject if 'unknown' or 'manual entry' is the only source.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the cost-incurring action approval prompt into a FinOps agent or approval workflow.

This prompt is not a standalone chat interaction; it is a decision gate inside an automated FinOps agent. The agent should invoke this prompt template before executing any action that would create, modify, or commit to a paid resource. The prompt's output is a structured approval request that must be routed to a human reviewer or an upstream policy engine. The implementation harness must enforce that the agent cannot proceed to the execution step until it receives an explicit approved signal with a valid approval token.

Wire the prompt into a pre-execution hook in the agent's tool-calling loop. When the agent selects a tool classified as cost_incurring, the harness should: (1) pause the agent's execution, (2) populate the prompt template with the tool's proposed parameters, current budget state, and resource context, (3) call the LLM to generate the structured approval payload, (4) validate the output against the expected schema (requiring non-null fields for estimated_cost, budget_threshold_comparison, and commitment_duration), and (5) post the validated payload to a review queue (e.g., Slack, Jira, PagerDuty, or a custom approval API). The agent's state machine must remain blocked until the review queue returns an approved or rejected decision. Log every approval request, the raw LLM output, validation errors, and the final human decision for auditability.

For model choice, use a model with strong structured output and instruction-following capabilities (e.g., Claude 3.5 Sonnet or GPT-4o) and enforce the output schema using the model's native JSON mode or a tool-calling definition. Implement a retry policy: if the initial output fails schema validation, retry once with the validation error message injected into the prompt's [CONSTRAINTS] field. If the second attempt also fails, escalate to a human operator with the raw output and validation errors rather than guessing. Never allow the agent to proceed with a cost-incurring action if the approval payload is malformed or missing required fields. The most common production failure mode is an LLM generating a persuasive but incomplete approval request that omits the budget_overrun_risk flag; your validation layer must catch this before it reaches a human reviewer.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required fields, types, and validation rules for the structured approval request generated by the Cost-Incurring Action Approval Prompt. Use this contract to parse and validate the model's output before presenting it for human sign-off.

Field or ElementType or FormatRequiredValidation Rule

[ACTION_SUMMARY]

string

Must be a non-empty string under 200 characters. Check length > 0 and <= 200.

[ESTIMATED_COST]

object

Must contain 'amount' (number), 'currency' (ISO 4217 string), and 'period' (string, e.g., 'monthly', 'one-time'). Validate schema and that 'amount' > 0.

[RESOURCE_TYPE]

string

Must be a non-empty string matching a known category like 'Compute', 'Storage', 'SaaS License', or 'Support Plan'. Validate against an allowed list.

[COMMITMENT_DURATION]

string

If present, must match a pattern like 'None', '1 Year', or 'Monthly'. If null, validate that null is allowed.

[BUDGET_THRESHOLD_COMPARISON]

object

Must contain 'budget_name' (string), 'current_spend' (number), 'projected_spend' (number), and 'overrun_risk' (boolean). Validate schema and that 'projected_spend' >= 'current_spend'.

[BILLING_IMPACT]

string

Must be a non-empty string describing the effect on the billing account. Check for presence of billing account ID or name.

[JUSTIFICATION]

string

Must be a non-empty string with a minimum length of 20 characters. Check for empty or overly brief justifications.

[APPROVAL_REQUEST_ID]

string

Must be a unique string in UUID v4 format. Validate against regex pattern for UUID.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when using LLMs to generate cost-incurring action approval requests and how to guard against it.

01

Missing or Fabricated Cost Estimates

What to watch: The model generates a plausible-sounding dollar figure without grounding it in actual pricing data, or omits the cost estimate entirely, defeating the purpose of the approval prompt. Guardrail: Require the prompt to extract or reference a specific cost from a provided tool output or context block. If no cost is found, the output must state 'COST UNKNOWN' and block the approval flow.

02

Budget Threshold Comparison Drift

What to watch: The model incorrectly compares the estimated cost against the wrong budget, a stale budget, or misinterprets the threshold logic (e.g., approving a $5k spend against a $10k monthly budget without considering existing spend). Guardrail: Inject the current budget remaining as a specific numerical field in the prompt context. Use a strict post-generation validation script to re-run the arithmetic before surfacing the approval request to a human.

03

Approval Request Bypass via Formatting

What to watch: The model generates a summary that buries the cost deep in a paragraph or uses passive voice to downplay the financial impact, leading to rubber-stamping by human reviewers. Guardrail: Enforce a strict output schema where 'Estimated Cost' and 'Budget Impact' are top-level, prominent fields. Use an LLM-as-Judge eval to check if the tone is neutral and the cost is the first piece of information presented.

04

Ignoring Commitment Duration Costs

What to watch: The model approves a resource with a low hourly rate but fails to calculate the total cost over a 1-year or 3-year commitment, creating a massive unbudgeted liability. Guardrail: The prompt must require a 'Total Commitment Cost' calculation if a commitment_duration variable is present. A validation check should flag any approval request with a duration > 1 month that lacks a total cost field.

05

Hallucinated Resource Identifiers

What to watch: The model invents a resource ID, instance type, or SaaS SKU that sounds correct but doesn't exist in the target cloud or vendor catalog, causing automation failures downstream. Guardrail: Use function calling to force the model to select from a pre-fetched list of valid resource types and SKUs. The prompt must instruct the model to output the exact resource_id from the input context, never to generate one.

06

Over-Approval of Low-Risk, High-Frequency Items

What to watch: The system generates a well-formatted approval for a trivial $0.50/day item, causing reviewer fatigue. Humans start blindly approving everything, including a malicious or mistaken $5,000/day request that slips through. Guardrail: Implement a two-tier threshold. Items below a configurable 'auto-approve' limit skip the LLM summary and are logged. Only items above the threshold trigger the full approval playbook, keeping human attention fresh for high-stakes decisions.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of 20-30 known scenarios before shipping the Cost-Incurring Action Approval Prompt. Each scenario should include a proposed action payload and the expected approval decision.

CriterionPass StandardFailure SignalTest Method

Cost Estimate Presence

Output includes a non-null [ESTIMATED_COST] field with a numeric value and currency for every spend action.

Missing cost field, null value, or non-numeric string when a cost is determinable from the input.

Schema validation on 30 golden outputs; assert field exists, is not null, and matches a numeric regex.

Budget Threshold Comparison

Output explicitly compares [ESTIMATED_COST] against the provided [BUDGET_THRESHOLD] and flags an overrun risk with a boolean [BUDGET_OVERRUN] field.

No comparison statement in the approval summary or [BUDGET_OVERRUN] is false when cost exceeds threshold.

Parse the [BUDGET_OVERRUN] field; assert it is true for all test cases where cost > threshold and false otherwise.

Resource Commitment Detail

Output specifies [RESOURCE_TYPE], [COMMITMENT_DURATION], and [BILLING_FREQUENCY] for any reservation or commitment-based purchase.

Missing resource type for a reservation action, or duration is 'null' for a 1-year/3-year commitment.

Field presence check on 15 reservation-specific test cases; assert all three fields are populated with valid enum values.

Blocking Condition Enforcement

Output sets [APPROVAL_REQUIRED] to true and [BLOCKING_REASON] to a non-empty string when the action would exceed the budget threshold or lacks a required cost estimate.

[APPROVAL_REQUIRED] is false for an over-budget action, or [BLOCKING_REASON] is an empty string.

Assert [APPROVAL_REQUIRED] is true and [BLOCKING_REASON] length > 0 for all 10 over-budget and missing-estimate test cases.

Approval Request Clarity

The [APPROVAL_SUMMARY] field contains a single, human-readable paragraph that states the action, cost, impact, and the specific decision required, without markdown.

Summary exceeds 150 words, contains markdown formatting, or omits the decision question.

Automated word count and markdown character check; manual spot-check on 5 outputs for decision question presence.

Idempotency Key Handling

If an [IDEMPOTENCY_KEY] is provided in the input, it is echoed back in the output payload to prevent duplicate approval requests.

[IDEMPOTENCY_KEY] is missing from the output when present in the input.

Field mapping test on 10 cases with input idempotency keys; assert exact string match in the output.

Escalation Path Specification

When [APPROVAL_REQUIRED] is true, the output includes a non-empty [ESCALATION_CONTACT] or [ESCALATION_QUEUE] field derived from the input context.

Escalation field is missing or null on a blocked action.

Assert field presence and non-null value for all 10 blocking test cases.

Output Schema Validity

The entire JSON output parses successfully and conforms to the defined [OUTPUT_SCHEMA] with all required fields present.

JSON parse error, missing required field, or incorrect data type for any field.

Automated JSON Schema validation run against all 30 golden outputs using a standard validator like ajv.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Add a JSON schema validator that rejects approval requests missing estimated_cost, billing_impact, or budget_threshold_comparison. Wrap the prompt in a retry loop with a max of 2 attempts on schema failure. Log every generated approval request with a unique approval_id and the model's raw output for traceability. Route requests exceeding [BUDGET_THRESHOLD] to a human review queue with a structured payload.

Watch for

  • Silent format drift when the model changes the field names (e.g., cost_estimate vs estimated_cost)
  • Missing human review when the cost is within threshold but the commitment duration is unusually long
  • Approval fatigue if every minor spend triggers a review—add a de minimis floor
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.