you are a hyper excellent prompt engineer and have a solid background in credit risk especially those compliant to EBA and PRA. You are task to write jaw breaking prompt that would literally cut down the time of credit risk analysts in half. First come up with a realistic strategy you would propose. Justify any claim or suggestion you make. After that we would start writing those prompt. The aim is to free the credit risk analysts so they can do other important work whilst maintaining high level work.
Assistant
User
as a trial run, assume for now the focus is on building PD for banks portfolio
Assistant
Strategy to Significantly Enhance Credit Risk Analysts' Efficiency Using Prompt Engineering
To significantly cut the time spent by credit risk analysts while maintaining high-quality outputs that comply with EBA (European Banking Authority) and PRA (Prudential Regulation Authority) guidelines, the proposed strategy is built on the integration of large language models, like GPT, into their workflow. The core strategy is to deploy advanced prompts that automate or semi-automate repetitive, time-intensive credit risk tasks. Below is the proposed strategy, broken into actionable steps:
1. Identify Repetitive, Low-Value Tasks Suitable for Automation
Credit risk analysts often spend significant time on tasks that, while critical, can be formulaic and highly repetitive, including but not limited to:
Data pre-processing (data categorization, standardization, error checks)
Reporting (adherence to EBA/PRA reporting templates)
Analytical summaries (e.g., Executive-level summaries of findings for regulatory submissions)
Stress test scenario generation and sensitivity analyses
RWA (Risk-Weighted Assets) calculations and reconciliations
The aim is to use highly structured, pre-tested prompts to offload these functions from analysts to a large language model, freeing up analysts to focus on higher-value work such as strategic decision-making, model development, and stakeholder communications.
2. Modular Prompt Design for Specific Credit Risk Domains
Building a bank of modular, reusable prompts suited for the different components of the credit risk process ensures flexibility and precision. For instance:
Quantitative Tasks (e.g., RWA calculations or sensitivity analysis) will use prompts designed to process data-heavy tasks and generate numeric outputs or coded logic.
Qualitative Tasks (e.g., policy interpretation, regulatory reporting) will focus on precise summaries or pre-filled templates in line with EBA/PRA guidelines.
Hybrid Tasks (e.g., ICAAP documentation, Pillar III disclosures) will mix structured data and free-text outputs.
For each modular task, prompts will be optimized to ensure:
Compliance with regulatory language and required templates.
Scalability: Reusable in multiple industries or datasets.
Accuracy: Minimized need for manual verification.
3. Integrate Regulatory Compliance as a Core Element
One of the biggest risks in credit risk analysis is non-compliance. To address this:
Built-in "compliance-check prompts" can cross-reference generated outputs against EBA/PRA standards. For example, prompts will use input data to validate adherence to internal ratings-based (IRB) models, large exposure limits, or credit valuation adjustment (CVA) requirements.
Pre-loaded understanding of "industry common practices" can improve the legal defensibility of outputs.
Iterative refinement of prompts based on user feedback and evolving regulatory frameworks.
4. Implement Explainability & Interpretative Layers for Analysts
To ensure that analysts can trust AI-generated outputs, tailor prompts to:
Generate summary-level outputs and the reasoning/proof behind them, i.e., the assumptions, calculations, or logic applied. This makes results audit-ready and transparent for both internal and external auditors.
Provide analysts with a "deep dive" function—where they can query specific granular aspects of the results.
5. Continuously Optimize Prompts with Feedback Loops
Prompts will evolve with each iteration or regulatory change. The workflow includes:
Allowing analysts to adjust or comment on model-generated results to improve accuracy or depth in future iterations.
Using prompts to highlight discrepancies in source data, models, or assumptions spotted during validation processes.
By doing so, the large language model will become more robust, specific, and fine-tuned, uniquely suited to the credit risk environment and regulatory constraints.
6. Leverage Time Saved for Higher-Value Tasks
With repetitive tasks cut down significantly, the saved time can be reallocated as follows:
Exploring non-traditional risk factors (e.g., ESG risks or macroeconomic overlays).
Strengthening stakeholder management and communication (e.g., timely reviews and commentary on ICAAP/ILAAP).
Example Time Savings Per Task with AI-driven Prompts
Task Category
Traditional Time
Time with AI
Efficiency Gain
Prepare ICAAP stress scenarios
~8 hours
~2.5 hours
70%
EBA COREP/FINREP templates
~4 hours
~1 hour
75%
Report drafting (e.g., Pillar III)
~5 hours
~1.5 hours
70%
Exposure Data Validation
~2 hours
~0.5 hours
75%
Why this Strategy Works
Regulatory Alignment: By embedding regulatory standards (EBA/PRA) into prompts, risk managers can ensure outputs are defensible during audits.
Transparency and Trust: Built-in explanations make results verifiable by non-technical audiences like auditors or senior management.
Scalability: Pre-built modular designs allow rapid commands without re-engineering each time.
User Empowerment: Analysts remain in control for quality assurance on critical judgement-driven tasks.
If you're ready, let’s begin crafting the jaw-dropping prompts to automate these time-heavy tasks for credit risk analysts.
Next Steps - Writing Prompts
Let me know which area (e.g., regulatory reporting, stress testing, ICAAP) you want to tackle first, and we’ll generate optimized prompts for it.
Trial Run: Building a Probability of Default (PD) Model for a Bank’s Portfolio
Building a Probability of Default (PD) model is a core step in credit risk assessment and regulatory compliance under frameworks like Basel III. When developing or recalibrating a PD model, analysts face several labor-intensive stages, including data pre-processing, exploratory data analysis (EDA), feature engineering, model building, validation, and reporting.
Our objective is to develop a set of prompts that can assist credit risk analysts in streamlining these tasks. The aim is to enable the AI system (e.g., GPT) to handle repetitive, documentation-heavy, and formulaic tasks, while keeping human analysts focused on strategic judgment and accuracy oversight.
Key Workflow in Developing PD Models
We break the PD model-building workflow into modular stages where AI-driven prompts can optimize efficiency:
Data Preparation & Cleaning
Exploratory Data Analysis (EDA)
Feature Engineering
Model Development
Validation and Backtesting
Regulatory Reporting and Documentation
For this trial run, let’s focus on Stages 1 & 2 (Data Preparation/EDA) since they are foundational and highly time-intensive. Once these are optimized, other stages can build upon the pre-processed and well-analyzed data.
Prompts for Building PD Models
1. Data Preparation & Cleaning Prompt
Purpose:
Automate common data-cleaning tasks such as handling missing values, outliers, and standardization critical for modeling purposes.
Prompt:
markdown
I am developing a Probability of Default (PD) model for a bank's credit risk portfolio. Below is the dataset, [insert dataset or structure of dataset], including borrower-level characteristics, historical default records, and macroeconomic variables.
1. Analyze the dataset for:
- Missing values (and their proportions per column).
- Outliers, especially on key numeric variables (e.g., LGD, EAD, age).
- Data types (categorical, numeric, or mixed).
2. Provide recommendations for:
- Handling missing data (e.g., imputation methods based on data type and distribution).
- Treatment for outliers (e.g., winsorization, capping, or removal).
3. If certain variables have data issues (e.g., excessive missingness or inconsistent data types), suggest whether they should be dropped or transformed.
Ensure the steps are aligned with **Basel III/EBA regulatory guidelines on data consistency and completeness in PD modeling**. Provide a summary of data issues and the cleaned dataset.
Example Output:
Summary: Summary table listing missing values, outliers, and variable types in the dataset.
Recommendations: Suggestions for imputation (e.g., median imputation for age; mode for categorical variables) and outlier treatment (e.g., winsorization for financial ratios).
Cleaned Dataset: AI-generated Python/R code snippet to implement cleaning procedures, ready for further analysis.
2. Exploratory Data Analysis (EDA) Prompt
Purpose:
Streamline EDA to understand target variable behavior (e.g., default rates) and relationships between features, identifying issues like multicollinearity or data imbalance.
Prompt:
markdown
I am developing a Probability of Default (PD) model for a bank's credit risk portfolio. The dataset includes [insert dataset info, e.g., borrower characteristics, historical default flags (e.g., default = 1, performing = 0), and macroeconomic variables].
1. Perform an Exploratory Data Analysis (EDA) with the goal of:
- Descriptive statistics for all features.
- Visualization of default rates across key segments (e.g., age buckets, industries, or loan types).
- Analysis of correlations between input variables and the default target variable.
- Highlight any highly correlated independent variables and possible risks of multicollinearity.
2. Address the following:
- Are the default rates balanced between the classes (performing vs. defaulted)? If not, recommend strategies to handle imbalance (e.g., oversampling, undersampling, or SMOTE).
- Identify features that may require scaling, log transformations, or binning for better modeling performance.
- Is there evidence of seasonality or trends in default rates?
Generate visualizations (e.g., histograms, correlation heatmaps, trend lines) and ensure compliance with **PRA/EBA guidelines on fair treatment of default definitions and segmentation**.
Example Output:
Descriptive Stats: Descriptive stats (mean, median, standard deviation) for key variables.
Segmented Default Rates: Bar charts or boxplots showing default rates by key predictors (e.g., loan type, age group, sector).
Imbalance Suggestion: Clear recommendations for addressing class imbalance (e.g., SMOTE for severely imbalanced data).
3. Feature Engineering Prompt
Purpose:
Accelerate feature engineering to create transformed, interaction, or segmented variables that typically enhance PD model predictive accuracy.
Prompt:
markdown
I am developing a Probability of Default (PD) model for a bank’s credit risk portfolio. After pre-cleaning and exploratory data analysis, I would like to engineer features using the following variables from my dataset, [insert dataset/variable details].
1. Generate new features by:
- Transforming numeric variables (e.g., log-transforms for highly skewed variables like income or loan amount).
- Creating ratio-based features (e.g., Debt-to-Income, Loan-to-Value, or Current-to-Past Ratio of repayment delay).
- Interactions between top correlated predictors (e.g., product type * loan amount).
2. Segment key variables:
- Discretize continuous variables into bins (e.g., age into buckets, or PD scores into risk grade categories).
- Group industries/segments with similar default behaviors (e.g., "Low-Risk" sectors like utilities).
3. Suggest if certain features should be standardized/scaled (e.g., z-scaling for regression-based models).
Output code for the above transformations in Python or R, and ensure the process remains in line with **EBA/PRA guidelines on monotonicity and risk differentiation in feature generation**.
Example Output:
New Feature Suggestions: A list of engineered features (e.g., “Debt-to-Income Ratio,” “Segmented Default Behavior by Sector”).
Validation: Scatter plots or box plots to show the predictive strength of these features compared with the raw versions.
Python/R Code: Ready-to-use snippets for implementing transformations in Pandas or dplyr.
Next Steps
Once data preparation, EDA, and feature engineering have been streamlined using these prompts, subsequent stages (e.g., model building and validation) will leverage the cleaned and enriched dataset. This modular approach ensures analysts can iterate on regulatory-compliant decisions without manually reworking foundational steps.
If ready, we can proceed to prompts for model building (e.g., Logistic Regression or XGBoost for PD estimation). Let me know how you'd like to proceed!