Skip to main content
Back to Prompt Library
implementation

Setup OpenAI Credit Risk Intervention Agent

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Credit Card Default Risk & Intervention Agent with OpenAI Agents SDK

Format
Code-aware
Lines
10
Sections
4
Linked challenge
Credit Card Default Risk & Intervention Agent with OpenAI Agents SDK

Prompt source

Original prompt text with formatting preserved for inspection.

10 lines
4 sections
No variables
0 checklist items
from openai import OpenAI

client = OpenAI()

def get_borrower_metrics(account_id: str):
    # Tool function returning credit telemetry
    return {"utilization": 0.92, "delinquencies": 2}

agent_instructions = """
You are a credit risk intervention specialist for a UK retail bank.
Analyze borrower credit metrics, assess default risk under current UK economic pressures, 
and recommend appropriate forbearance options complying with FCA guidelines.
"""

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.