A model explanation report (XAI)

Machine learning promptsDifficulty: Advanced Last updated: 16 November 2026

Usage description

Generate global and local explanations for a trained model, with their limits.

Prompt text

Prompt
I have a model trained ({{stack}}) on {{project}}.
Create an explanation report that includes:
1. Feature importance with permutation importance on the validation data.
2. Global and local SHAP explanations for three cases (correct, wrong and borderline).
3. Partial dependence curves (PDP/ICE) for the three most important features.
4. A "limits of the explanation" section: correlation between features, non-causality and stability.
Write the code, run it and show the actual output. {{extra}}

Required inputs

The model and the data.

Expected outputs

Code, plots and a written report.

Suitable tools

Practical example

stack = "XGBoost", project = "university admission data".

Rate:
No ratings yet

We do not claim this prompt was tested on a particular model; results vary with the model and context, so always review the output.

Create a custom version with AI

Do not write secrets, keys or personal data. The description is merged with the prompt directly, without sending it to any external service.