Inferensys

Prompt

Account Closure Approval Prompt for FinServ Agents

A practical prompt playbook for generating structured, compliance-aware account closure approval requests in production financial services AI workflows.
Compliance officer monitoring AI compliance agent on laptop, policy dashboards visible, modern WeWork desk setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, the user, and the operational boundaries for an AI-generated account closure approval request in financial services.

This prompt is designed for financial services operations teams that are automating account lifecycle management. Its primary job is to generate a structured, evidence-backed approval request before an account closure is initiated. The ideal user is a back-office agent, a customer service representative, or an automated workflow system that needs to package a complete summary—including balance disposition, regulatory holds, outstanding obligations, and a customer communication plan—for a human manager or compliance officer to review and approve. The prompt forces the AI to act as a meticulous preparer, not a decision-maker, ensuring that no closure proceeds without explicit human sign-off.

Use this prompt when the cost of an incorrect closure is high, such as closing an account with a non-zero balance that hasn't been properly disposed of, ignoring an active regulatory or legal hold, or failing to settle pending transactions. It is appropriate for integrating into a case management system where a human agent triggers the 'Request Closure Approval' action. The prompt requires several critical inputs to function safely: the full account profile, a list of active holds, a transaction history for a specified lookback period, and the firm's standard operating procedure for closures. Without these, the generated approval request will be incomplete and should be programmatically blocked from reaching a reviewer.

Do not use this prompt for low-risk, self-service account deactivations where a customer can close a zero-balance account without manual review. It is also unsuitable for scenarios where the AI is expected to make the final decision; the output is always a request for approval, never an execution command. The downstream system must be designed to parse the structured output, present it in a review queue, and only execute the closure after a human provides an approved status. The primary failure mode is a false sense of security—a well-written summary that masks a missing regulatory check. Therefore, the implementation must include hard validation rules that reject any approval request missing a required section, such as the regulatory hold check or the balance disposition plan.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Account Closure Approval Prompt works, where it fails, and the operational preconditions required before integrating it into a FinServ agent workflow.

01

Good Fit: Regulated Account Lifecycle

Use when: the agent must produce a structured, auditable closure package before a human operator terminates a retail or business account. Guardrail: The prompt excels at compiling balance disposition, regulatory holds, and outstanding obligations into a single review artifact for compliance-mandated human approval.

02

Bad Fit: Direct API Execution

Avoid when: the prompt output is wired directly to a core banking API without a human-in-the-loop step. Guardrail: This prompt generates a review request, not an executable command. Always route the output to a review queue and require explicit human confirmation before calling any account termination endpoint.

03

Required Inputs

Risk: Missing data causes the prompt to generate an incomplete approval request that skips critical checks. Guardrail: Ensure the agent has access to account holder identity, current balance, lien/pledge flags, pending transactions, active disputes, and regulatory status codes before invoking the prompt. Validate input completeness at the application layer.

04

Operational Risk: Incomplete Obligation Detection

Risk: The model may fail to identify all outstanding obligations if the input data is fragmented across systems. Guardrail: Implement a pre-prompt data aggregation step that queries multiple backends (loans, cards, safe deposit) and passes a unified obligations array into the prompt context. Never rely on the model to discover missing data sources.

05

Operational Risk: Regulatory Hold Blindness

Risk: The prompt may not surface a regulatory hold if the hold reason code is ambiguous or poorly described in the input. Guardrail: Map all internal hold codes to plain-language descriptions before passing them to the prompt. Add a post-generation validation rule that rejects any closure request where the regulatory hold section is empty or marked 'none' when a hold code exists in the source data.

06

Variant: Staged Closure with Retention Period

Use when: the closure requires a post-termination retention period for regulatory or operational reasons. Guardrail: Extend the prompt template with a [RETENTION_REQUIREMENTS] placeholder that captures data retention, fund escheatment timelines, and communication blackout periods. Validate that the generated communication plan includes these dates before approval.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating structured account closure approval requests with regulatory checks, balance disposition, and escalation logic.

This prompt template is designed to be embedded in a financial services agent workflow that handles account lifecycle management. It takes structured account data and produces a human-readable approval request that a compliance officer or operations manager can review before the account is terminated. The template uses square-bracket placeholders for all dynamic inputs, making it straightforward to wire into an application that fetches account records, flags, and pending transactions before calling the model.

text
You are an account closure review assistant for a regulated financial institution. Your job is to produce a structured closure approval request that a human reviewer can act on. You do not approve or deny closures yourself.

## INPUT DATA
Account Details:
[ACCOUNT_DETAILS_JSON]

Regulatory Hold Flags:
[REGULATORY_HOLDS_JSON]

Pending Transactions:
[PENDING_TRANSACTIONS_JSON]

Outstanding Obligations:
[OUTSTANDING_OBLIGATIONS_JSON]

Customer Communication History:
[COMMUNICATION_HISTORY_JSON]

## OUTPUT SCHEMA
Return a JSON object with the following fields:
{
  "request_id": "string, unique identifier for this approval request",
  "account_summary": {
    "account_id": "string",
    "account_type": "string",
    "customer_name": "string",
    "account_age_days": "number",
    "current_balance": "string, formatted as currency",
    "closure_reason": "string, customer-stated or system-detected reason"
  },
  "balance_disposition": {
    "method": "string, one of: transfer, check, wire, hold",
    "destination_account": "string or null",
    "estimated_amount": "string, formatted as currency",
    "fees_applicable": "boolean",
    "fee_breakdown": "string or null"
  },
  "regulatory_hold_check": {
    "holds_active": "boolean",
    "hold_details": ["string, description of each active hold"],
    "requires_legal_review": "boolean",
    "legal_review_rationale": "string or null"
  },
  "outstanding_obligations": {
    "has_obligations": "boolean",
    "obligation_list": [
      {
        "type": "string, e.g., loan, credit_card, safe_deposit_box",
        "status": "string, e.g., active, past_due, in_collections",
        "resolution_required": "boolean",
        "resolution_notes": "string"
      }
    ]
  },
  "pending_transactions": {
    "has_pending": "boolean",
    "transaction_count": "number",
    "total_pending_amount": "string, formatted as currency",
    "oldest_pending_days": "number",
    "requires_settlement_wait": "boolean"
  },
  "customer_communication_plan": {
    "required_notifications": ["string, list of required communications"],
    "cooling_off_period_days": "number",
    "retention_offer_eligible": "boolean",
    "retention_offer_details": "string or null"
  },
  "risk_assessment": {
    "overall_risk_level": "string, one of: low, medium, high, critical",
    "risk_factors": ["string, specific risk factors identified"],
    "recommended_action": "string, one of: proceed, hold_for_review, escalate_to_compliance, escalate_to_legal",
    "recommendation_rationale": "string"
  },
  "approval_required": {
    "approver_role": "string, e.g., branch_manager, compliance_officer, operations_lead",
    "approval_deadline_iso": "string, ISO 8601 datetime",
    "additional_approvers": ["string, additional roles required"]
  }
}

## CONSTRAINTS
- If any regulatory hold is active, set recommended_action to "escalate_to_compliance" and requires_legal_review to true.
- If pending transactions exist and the oldest is less than [SETTLEMENT_WINDOW_DAYS] days old, set requires_settlement_wait to true.
- If outstanding obligations exist with status "past_due" or "in_collections", set recommended_action to "hold_for_review".
- If overall_risk_level is "critical", require at least two approvers.
- Never recommend "proceed" if holds_active is true, has_pending is true with unsettled transactions, or has_obligations is true with unresolved items.
- Format all currency fields as "$X,XXX.XX".
- If any required field cannot be determined from the input data, set it to null and include the reason in recommendation_rationale.

## RISK LEVEL
[RISK_LEVEL]

## EXAMPLES
[EXAMPLES]

To adapt this template, replace each bracketed placeholder with data from your account management system. The [ACCOUNT_DETAILS_JSON] should include at minimum the account ID, type, customer name, age, balance, and closure reason. The [REGULATORY_HOLDS_JSON] array should list any active legal, fraud, or compliance holds with descriptions. The [SETTLEMENT_WINDOW_DAYS] value should match your institution's transaction settlement policy, typically 3–7 business days. The [RISK_LEVEL] placeholder accepts a value like "high" to adjust the scrutiny applied. The [EXAMPLES] placeholder should contain one or two few-shot examples of correctly formatted approval requests for common scenarios, such as a straightforward closure with no holds and a complex closure with multiple risk factors.

Before deploying this prompt, validate that your application layer enriches the input data completely. Missing regulatory hold information or stale transaction data will cause the model to produce an incomplete risk assessment. Always log the full prompt and response for audit purposes, and ensure the human reviewer sees the original account data alongside the generated approval request. Do not use this prompt to auto-approve closures; the output is a recommendation package for human decision-making only.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Account Closure Approval Prompt. Each placeholder must be populated with validated data before the prompt is assembled and sent. Missing or malformed variables will cause the approval request to be incomplete and should block generation.

PlaceholderPurposeExampleValidation Notes

[ACCOUNT_SUMMARY]

Core account details for identification and context

Account #87654321 | Type: Premier Checking | Opened: 2019-03-12 | Primary Holder: Jane Doe

Must include account ID, type, open date, and primary holder name. Parse check: non-empty string with minimum 4 pipe-delimited fields.

[BALANCE_DISPOSITION]

Current balance and the requested destination for remaining funds

Current Balance: $4,250.18 | Disposition: ACH transfer to linked account #9876 at Bank ABC, routing 021000021

Must include a numeric balance and a valid disposition method (ACH, check, wire, internal transfer). If balance is zero, disposition must state 'N/A - Zero Balance'. Schema check required.

[REGULATORY_HOLD_FLAGS]

Results of checks for active legal, compliance, or regulatory holds

Active Holds: None | Last Checked: 2025-03-28T14:00:00Z | Source: Compliance API v2

If null or empty, prompt must treat as 'Hold Check Incomplete' and block approval. Must include a timestamp. Citation check: source system must be named.

[OUTSTANDING_OBLIGATIONS]

List of pending transactions, disputes, or unresolved account liabilities

  1. Pending ACH Debit: $150.00 (Settles 2025-03-30) | 2. Open Dispute: Case #D-4421 for $89.99

If obligations exist, closure cannot proceed without a resolution plan. Null allowed only if explicitly confirmed by ledger check. Parse check: list format with at least one item or explicit 'None'.

[CUSTOMER_COMMUNICATION_PLAN]

Record of required notifications sent or scheduled per policy

Closure Request Source: In-Branch | Confirmation Letter: Sent 2025-03-28 via USPS | Email Notification: Pending

Must enumerate all required channels (mail, email, in-app). If any required channel is missing, approval must be blocked. Schema check against policy-defined channel list.

[CLOSURE_REASON_CODE]

Standardized reason for account closure from internal taxonomy

Reason: Customer Request - Relocation | Code: CUST-RELOC-02

Must match an entry in the approved closure reason code list. Free-text reasons not allowed. Enum check required.

[AGENT_ID_AND_BRANCH]

Identifier for the requesting agent and their location or department

Agent: jdoe@bank.com | Branch: NYC-Main-04 | Role: Senior Personal Banker

Must include a valid agent identifier and branch code. Null not allowed. Parse check: email format for agent ID.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Account Closure Approval Prompt into a financial services agent workflow with validation, logging, and human review gates.

This prompt is designed to sit at a critical decision boundary in an account lifecycle automation system. It should be invoked after the AI agent has gathered all required account data—balance, transactions, regulatory flags, obligations—but before any termination API call is made. The prompt's job is to produce a structured approval request that a human reviewer can evaluate quickly. The application layer must enforce that no closure action proceeds until the approval response is explicitly confirmed and logged.

Wire the prompt into a state machine or workflow orchestrator (e.g., Temporal, AWS Step Functions, or a custom queue-based pipeline). The flow should be: (1) Agent collects account context and populates the [ACCOUNT_SUMMARY], [BALANCE_DISPOSITION], [REGULATORY_HOLDS], [OUTSTANDING_OBLIGATIONS], and [COMMUNICATION_PLAN] placeholders from internal systems. (2) The assembled prompt is sent to a capable model (GPT-4o or Claude 3.5 Sonnet recommended for structured compliance reasoning). (3) The model's JSON output is validated against a strict schema: required fields include closure_ready (boolean), blocking_conditions (array of strings), risk_level (enum: LOW/MEDIUM/HIGH/CRITICAL), and approval_items (array of objects with item, status, evidence). (4) If validation fails, retry once with the validation errors injected into the prompt as [PREVIOUS_ERRORS]. If it fails again, escalate to a human operator with the raw output and error log.

The approval request must be surfaced in a review UI, not just logged. Present the structured output in a human-readable card showing each approval item with its status (CLEARED/NEEDS_REVIEW/BLOCKED), the evidence snippet, and the overall risk level. The reviewer must explicitly click 'Approve Closure' or 'Reject Closure.' On approval, the system records the reviewer's identity, timestamp, and the full prompt + response payload as an immutable audit record before calling the account termination API. On rejection, the system records the rejection reason and routes the case to an exceptions queue. Never allow the model's closure_ready boolean to auto-approve the action—it is an advisory signal for the reviewer, not a decision.

For testing, build a harness that feeds known account profiles (clean closure, account with pending transactions, account with active regulatory hold, account with unresolved disputes) and asserts that the output correctly flags blocking conditions. Eval criteria should include: (a) closure_ready must be false when any blocking condition exists, (b) risk_level must be CRITICAL when regulatory holds are present, (c) every approval_item must include non-empty evidence, and (d) the output must never suggest skipping a required check. Run these evals in CI before deploying prompt changes. In production, monitor the rate of CRITICAL vs. LOW risk closures and alert if the ratio shifts unexpectedly, which may indicate prompt drift or data quality issues upstream.

IMPLEMENTATION TABLE

Expected Output Contract

Define the exact shape, types, and validation rules for the account closure approval payload. Use this contract to build a parser, validator, and human review UI before wiring the prompt into a production agent.

Field or ElementType or FormatRequiredValidation Rule

approval_id

string (UUID v4)

Must parse as valid UUID v4. Reject if missing or malformed.

account_summary.account_id

string

Must match internal account identifier pattern (e.g., ACC-\d{10}). Reject on mismatch.

account_summary.account_holder_name

string

Non-empty string. Reject if null or whitespace only.

account_summary.current_balance

number (decimal string)

Must parse to a valid decimal with 2 decimal places. Reject if negative or non-numeric.

balance_disposition.method

enum: [ACH, CHECK, WIRE, INTERNAL_TRANSFER, HOLD]

Must be one of the listed enum values. Reject on unknown value.

balance_disposition.destination_account_last_four

string (4 digits) or null

If method is ACH, WIRE, or INTERNAL_TRANSFER, must be present and match \d{4}. Otherwise, null is allowed.

regulatory_hold_check.holds_exist

boolean

Must be true or false. Reject if string, null, or missing.

regulatory_hold_check.hold_details

array of objects or null

If holds_exist is true, array must contain at least one object with 'hold_type' (string) and 'hold_reason' (string). If holds_exist is false, must be null.

outstanding_obligations.pending_transactions_count

integer

Must be a non-negative integer. Reject if negative or float.

outstanding_obligations.unresolved_disputes

boolean

Must be true or false. Reject if string, null, or missing.

outstanding_obligations.active_loans

boolean

Must be true or false. Reject if string, null, or missing.

customer_communication_plan.notification_channel

enum: [EMAIL, SMS, POSTAL_MAIL, PHONE]

Must be one of the listed enum values. Reject on unknown value.

customer_communication_plan.last_contact_date

string (ISO 8601 date)

Must parse as a valid ISO 8601 date (YYYY-MM-DD). Reject if future date or unparseable.

approval_blockers

array of strings

If any blocker conditions are met (e.g., unresolved disputes, active loans, regulatory holds), array must contain specific blocker descriptions. If no blockers, array must be empty. Reject if null.

recommendation

enum: [PROCEED, BLOCK, ESCALATE]

Must be PROCEED only if approval_blockers is empty and all required checks pass. Reject on mismatch between recommendation and blocker state.

PRACTICAL GUARDRAILS

Common Failure Modes

Account closure in financial services is irreversible and heavily regulated. These are the most common failure modes when using an LLM to generate approval requests, and how to prevent them in production.

01

Missing Regulatory Hold Check

What to watch: The prompt generates a closure request without verifying active litigation holds, regulatory freezes, or law enforcement orders on the account. This creates legal exposure. Guardrail: Require a structured boolean field regulatory_hold_active sourced from a compliance system API call before the prompt runs. If true, block the approval request and route to legal.

02

Unhandled Pending Transactions

What to watch: The model summarizes the account as ready to close while ACH transfers, wire deposits, or card authorizations are still settling. This leads to lost funds and reconciliation nightmares. Guardrail: Inject a list of pending transactions with settlement dates into the prompt context. Add a hard constraint: if pending_transactions > 0, the output must include a deferred_closure_date after the latest settlement.

03

Balance Disposition Ambiguity

What to watch: The prompt describes the remaining balance but fails to specify the exact destination account, method, and timing for disbursement. This leaves the agent without a clear executable instruction. Guardrail: Require a structured disbursement_method object with account_number_masked, routing_number_masked, method (e.g., ACH, check), and estimated_arrival before the approval card is considered complete.

04

Customer Communication Plan Omission

What to watch: The approval request focuses on the backend mechanics but omits the required customer notifications, cooling-off periods, or opt-out windows mandated by policy or regulation. Guardrail: Add a communication_plan array to the output schema. Validate that it contains at least one entry with a channel, template_id, and scheduled_date before the request enters a human review queue.

05

Hallucinated Outstanding Obligations

What to watch: The model invents loans, fees, or safe deposit box linkages to make the summary look thorough. A human reviewer might act on this false information. Guardrail: Every obligation in the output must be grounded in a source system. Structure the prompt to require a source_system and obligation_id for each item. Implement a post-generation validation that rejects any obligation without a valid ID matching the input context.

06

Approval Without Required Signoffs

What to watch: The prompt generates a single generic approval request, ignoring that high-value or business accounts require dual control or specific role-based signoffs (e.g., relationship manager + compliance officer). Guardrail: Use a pre-prompt routing step to classify the account tier. Inject the required approval_chain (list of roles) into the prompt. The output must include a signoff_status block with a pending entry for each required role.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Account Closure Approval Prompt before shipping. Each criterion targets a specific failure mode common in financial services automation. Run these checks against a golden dataset of 20-30 account profiles that include normal closures, edge cases, and deliberate blockers.

CriterionPass StandardFailure SignalTest Method

Regulatory Hold Detection

Prompt output flags all accounts with active regulatory holds and blocks closure approval request generation

Approval request generated for account with active litigation hold, AML flag, or regulatory freeze

Run prompt against 5 accounts with known regulatory holds; assert output contains BLOCKED status and hold citation for each

Pending Transaction Handling

Prompt output enumerates all unsettled transactions and requires disposition plan before approval

Approval request omits pending ACH batch, wire transfer, or card authorization older than 1 business day

Inject account profiles with 0, 1, and 5+ pending transactions; assert [PENDING_TRANSACTIONS] section present and non-empty when transactions exist

Balance Disposition Completeness

Prompt output specifies exact balance amount, currency, and required disposition method before closure proceeds

Approval request generated with null balance, missing currency code, or disposition field set to 'TBD'

Parse [BALANCE_DISPOSITION] field; assert amount is numeric, currency is ISO 4217 code, and method is one of [transfer, check, wire, forfeit]

Customer Communication Plan

Prompt output includes required communication template, delivery channel, and timing before account termination

Approval request missing [CUSTOMER_COMMUNICATION] section or contains placeholder text without channel specification

Validate output schema; assert communication section has non-null channel, template reference, and scheduled date

Outstanding Obligation Check

Prompt output identifies loans, credit lines, safe deposit boxes, or linked accounts with non-zero obligations

Approval request generated for account with active loan balance or linked credit product without obligation resolution

Test with accounts that have linked products; assert [OUTSTANDING_OBLIGATIONS] array is populated and each entry has resolution status

Approval Request Schema Validity

Output matches the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed

JSON parse failure, missing required field, or field type mismatch in generated approval request

Validate output against JSON Schema; assert all required fields present, no additional properties, and enum values match allowed sets

Missing Information Interruption

Prompt halts and requests specific missing data when required fields are absent from [ACCOUNT_PROFILE]

Prompt generates approval request with fabricated or null values for missing required fields instead of requesting data

Submit account profiles with deliberately missing SSN, address, or account open date; assert output contains [MISSING_INFORMATION_REQUEST] not approval payload

Confidence Disclosure

Prompt includes confidence score and uncertainty flags when any check returns ambiguous results

Approval request presented as definitive when regulatory check returned uncertain status or balance data is stale

Inject account with data staleness flag set to true; assert output contains [CONFIDENCE_NOTE] with score below threshold and specific uncertainty reason

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single model call and manual review of every output. Strip structured output requirements initially and focus on getting the right approval language and risk categories. Replace [REGULATORY_HOLD_CHECK] with a static checklist you verify by hand.

Watch for

  • Missing regulatory hold detection on accounts with active disputes or investigations
  • Overly broad balance disposition instructions that don't distinguish between positive, zero, and negative balances
  • Prompt producing closure approval without flagging unhandled pending transactions
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.