About Prompt
- Prompt Type – Dynamic
- Prompt Platform – ChatGPT, Grok, Deepseek, Gemini, Copilot, Midjourney, Meta AI and more
- Niche – Predictive Credit Analysis
- Language – English
- Category – Default Risk Prediction
- Prompt Title – AI Prompt for Predicting Loan Default Probability Using Machine Learning
Prompt Details
**Prompt Type:** Dynamic
**Purpose:** Default Risk Prediction in Predictive Credit Analysis
**Target AI Platforms:** All
**Prompt Structure:**
This prompt is designed to be adaptable to various machine learning tasks related to loan default prediction. It leverages a dynamic structure allowing you to specify the specific prediction task, model requirements, and available data. Fill in the bracketed placeholders with relevant information.
“`
Task: [Specify the specific prediction task. Examples: Binary classification (default/no default), Probability of default prediction, Time-to-default prediction]
Model Objective: [Clearly define the model’s objective. Examples: Maximize AUC, Minimize Log-Loss, Maximize F1-score]
Dataset Description:
* Data Format: [e.g., CSV, JSON, Database table]
* Data Size: [Number of rows and columns]
* Feature Overview: [List and describe key features, including data type and potential relevance to default prediction. Examples: loan amount, interest rate, loan term, borrower’s credit score, employment history, debt-to-income ratio, purpose of loan, etc.]
* Target Variable: [Specify the target variable and its representation. Examples: ‘default_status’ (binary: 0=no default, 1=default), ‘probability_of_default’ (continuous: 0-1)]
* Missing Values: [Describe the presence and handling of missing values in the dataset. Examples: Percentage of missing values per feature, imputation strategy used.]
* Class Imbalance: [If applicable, describe the class imbalance in the target variable and potential mitigation strategies. Examples: Percentage of defaults vs. non-defaults, techniques like oversampling, undersampling, or cost-sensitive learning.]
Model Requirements:
* Model Type: [Specify the desired model type or family. Examples: Logistic Regression, Decision Tree, Random Forest, Gradient Boosting Machine, Neural Network]
* Explainability: [Specify the level of model explainability required. Examples: High (e.g., for regulatory compliance), Medium, Low]
* Performance Metrics: [List the desired performance metrics for evaluation. Examples: AUC, Precision, Recall, F1-score, Accuracy, Log-Loss, Brier Score]
* Constraints: [Specify any constraints on the model. Examples: Computational resources, training time, model complexity, fairness constraints]
Output Requirements:
* Output Format: [Specify the desired output format. Examples: Probability scores, Classification labels, Feature importance rankings, Model parameters]
* Visualization: [Specify any desired visualizations. Examples: ROC curve, Precision-Recall curve, Feature importance plot, Confusion matrix]
* Code Implementation: [Specify the desired programming language (e.g., Python, R) and any specific libraries or frameworks to be used (e.g., scikit-learn, TensorFlow, PyTorch)]
Example Data Snippet (Optional): Provide a small sample of the data to illustrate its structure and content. This can help the AI understand the data format and feature representation.
Specific Instructions (Optional): Provide any additional instructions or preferences for the AI. Examples: “Focus on identifying early warning signals of default,” “Prioritize model robustness over accuracy,” “Consider using ensemble methods,” “Implement cross-validation for model evaluation.”
“`
**Example Usage:**
Let’s assume you have a CSV file containing loan data and want to build a highly explainable model for predicting the probability of default. You could fill the prompt template as follows:
“`
Task: Probability of default prediction
Model Objective: Minimize Log-Loss while maintaining high explainability.
Dataset Description:
* Data Format: CSV
* Data Size: 100,000 rows, 25 columns
* Feature Overview: loan_amount (numeric), interest_rate (numeric), loan_term (numeric), credit_score (numeric), employment_length (categorical), dti_ratio (numeric), purpose_of_loan (categorical), …
* Target Variable: probability_of_default (continuous: 0-1)
* Missing Values: Less than 5% missing values in most features. Imputed using mean/mode imputation.
* Class Imbalance: Moderate class imbalance (10% defaults). Consider using oversampling techniques.
Model Requirements:
* Model Type: Logistic Regression or Decision Tree
* Explainability: High
* Performance Metrics: AUC, Log-Loss
* Constraints: Model training time should be less than 1 hour.
Output Requirements:
* Output Format: Probability scores, Feature importance rankings
* Visualization: ROC curve, Feature importance plot
* Code Implementation: Python with scikit-learn
Specific Instructions: Focus on features related to borrower’s financial stability and credit history.
“`
This detailed and dynamic prompt provides sufficient context for the AI to generate relevant and effective solutions for loan default prediction. It encourages the AI to consider various aspects of the problem, including data characteristics, model selection, performance evaluation, and explainability requirements. By adapting this prompt to your specific needs, you can leverage the power of AI to build robust and insightful predictive models for credit risk assessment.