1. Introduction
Credit risk is a central concern of financial institutions, since borrower delinquency directly affects portfolio quality, liquidity, and lender solvency (
Altman, 1968;
Basel Committee on Banking Supervision, 1999). Default prediction has been studied extensively in commercial banking, but the solidarity sector, comprising savings and credit cooperatives and microfinance institutions, has received comparatively less attention in the credit-risk literature, despite its economic and social role in emerging economies, where cooperative lending channels resources to households and small enterprises that are underserved by the commercial banking system (
Arias-Serna et al., 2025;
Lemus & Rojas, 2022).
Risk assessment in the sector is complicated by a specific data configuration that the classical literature does not directly address. Traditional credit-risk assessment relies on expert judgement, financial ratios, and parametric scoring models such as logistic regression and discriminant analysis (
Altman, 1968;
Hosmer et al., 2013). These methods are interpretable and well established in regulatory practice, but they assume linear relationships and homogeneous populations, which limits their effectiveness on heterogeneous customer bases that include informal workers, customers with limited banking history, and clients for whom relational and sociodemographic information, rather than the formal financial record, is the more informative signal of repayment behaviour. Cooperatives in the solidarity sector present this data configuration: rich relational and sociodemographic information, but scarce formal credit history.
Machine learning (ML) has become the prevailing approach in modern credit scoring (
Cavalcante et al., 2016). Benchmark studies report that nonlinear classifiers, particularly gradient boosting ensembles (XGBoost, LightGBM) and random forest, outperform classical statistical models in default prediction, with gains in AUC, Gini coefficient, and minority-class recall (
Baesens et al., 2003;
I. Brown & Mues, 2012;
Chen & Guestrin, 2016;
Ke et al., 2017;
Lessmann et al., 2015). Recent work in emerging-market contexts extends these results beyond developed economies (
Arias-Serna et al., 2025;
Machado & Karray, 2022;
Ziemba et al., 2021).
The adoption of ML in smaller solidarity institutions is nonetheless uneven. The deployment of these classifiers requires labelled datasets of sufficient size, dedicated ML expertise, training and serving infrastructure, and explainability frameworks compatible with regulatory scrutiny (
Giudici et al., 2024;
Giudici & Raffinetti, 2023;
Lundberg & Lee, 2017). For cooperatives with limited technical staff and modest data volumes, these requirements are a practical barrier. Lenders whose customer base is most heterogeneous, and who would benefit most from richer modelling approaches, are therefore also the least equipped to adopt them.
Large language models (LLMs) such as GPT-4 (
T. Brown et al., 2020;
OpenAI, 2023) offer an alternative operating point for resource-constrained institutions. Trained on large text corpora through self-supervised learning, LLMs exhibit few-shot learning: they can perform new classification tasks by conditioning on a small number of labelled examples supplied in the prompt, without weight updates or a training pipeline (
Kasneci et al., 2023;
Vaswani et al., 2017). This mode of use has been formalised for credit lending in the Informed GPT framework (
Babaei & Giudici, 2024), in which the LLM receives a stratified sample of labelled clients alongside the case to be classified. Applied to a European student-loan dataset, Informed GPT reaches AUC values comparable to logistic regression and produces per-prediction natural-language rationales (
Deldjoo, 2023;
Feng et al., 2023). Concerns about algorithmic fairness and bias in LLM-based credit decisions have also been raised (
Y. Li & Zhang, 2023).
Despite these methodological proposals, the current literature on LLMs for credit-risk assessment presents analytical gaps that limit institutional adoption.
Babaei and Giudici (
2024) introduced the use of LLMs for binary classification with few-shot learning; however, the study was validated on a single developed-market peer-to-peer lending environment (LendingClub, USA), used undersampling that removed the effect of class imbalance from the evaluation, and compared the LLM only to logistic regression. Recent studies in emerging markets, such as
Arias-Serna et al. (
2026), apply SHAP-based post hoc explanations to traditional ML classifiers in the solidarity sector but rely on a full ML pipeline that is typically not available to micro-cooperatives.
The present study addresses these gaps by extending the methodology of
Babaei and Giudici (
2024) to the Latin American solidarity sector (Colombia), a setting characterised by clients with scarce formal credit history and imbalanced sociodemographic data. gpt-4o-mini is evaluated under four Informed GPT example-pool sizes (
) across five independent runs per configuration, together with a zero-shot baseline (
). This design allows both predictive performance (mean AUC) and prediction stability (standard deviation of AUC) to be quantified. The research question, following the frame established by
Babaei and Giudici (
2024), is: given a fixed, previously published ML reference (
Arias-Serna et al., 2026), how closely can an off-the-shelf LLM approach that reference on a real cooperative-lending portfolio, and under which operating conditions? The purpose is to provide evidence for institutions that do not have the resources for a full-scale ML deployment and to identify design directions (prompt content, example selection) that may narrow the remaining gap with classical ML.
The scientific contribution of this work extends beyond the geographic transfer of an existing framework in six distinct directions:
New empirical domain: application to Colombian solidarity-sector cooperatives, regulated by the Superintendencia de Economía Solidaria (SES) under a legal framework distinct from banking supervision, with sector-specific features (equity contributions, member type, membership tenure, records update status) that are absent from developed-market datasets such as LendingClub or European peer-to-peer platforms.
Multi-model benchmark: whereas
Babaei and Giudici (
2024) compare GPT against logistic regression as the sole baseline, we contrast the LLM against five tuned classifiers spanning tree ensembles and gradient boosting families (XGBoost, LightGBM in two configurations, HistGradientBoosting, and random forest), each optimised under an internal weighting scheme that respects the entity’s native imbalance (∼17.3% default rate).
Feature and prompt leakage audit: we introduce a systematic auditing procedure for both dataset features (identifying s_intereses, reestr, and s_capital as potentially outcome-adjacent) and prompt content. The LLM system prompt is designed to exclude any supervised-analysis-derived information about the target (SHAP rankings, learned causal directions, target-distribution disclosures), so that in-context learning must operate exclusively on the few-shot examples supplied at inference time. This design ensures that reported LLM performance reflects the model’s actual few-shot capability rather than target-leaking prompt engineering.
Calibration analysis: although it is absent in
Babaei and Giudici (
2024) and in most LLM credit-scoring literature, we systematically evaluate the reliability of LLM self-reported probabilities using Brier score, log loss, expected calibration error (ECE), and reliability diagrams, and provide post hoc calibration via Platt scaling and Isotonic regression.
Enhanced statistical rigour: we complement point-estimate AUC comparisons with bootstrap 95% confidence intervals ( resamples), DeLong tests for paired AUC comparisons, and McNemar tests for paired classifications, enabling formal significance assessment.
Matched label-budget learning curves: in response to the natural concern that comparing an 80-example few-shot LLM against a 12,000-observation ML model is not like-for-like, we provide learning curves for logistic regression, XGBoost, and LightGBM trained at matched budgets , quantifying the specific regime in which the LLM offers an advantage.
Considered jointly, the empirical results position LLM-based credit classification as a tool with defined operating conditions: comparable to logistic regression across the label-scarce regime, surpassed by tuned gradient boosting once training data exceeds approximately 100 labelled defaults, and requiring calibration and threshold adjustment before operational use.
Regional and regulatory context.
While the literature contains various credit-scoring models based on machine learning and LLMs, these applications are overwhelmingly concentrated in the commercial banking sectors of developed nations. This research bias is largely sustained by the availability of open-access, purely quantitative public repositories such as LendingClub or the German Credit dataset (
Baesens et al., 2003;
Lessmann et al., 2015). In Colombia and the wider Latin American region, by contrast, the natural confidentiality of transaction-level credit data under strict banking secrecy and Habeas Data regulations (
República de Colombia, 2023) offers an exceptional opportunity to pioneer high-value empirical research within the cooperative sector: these stringent frameworks legally prohibit sharing consolidated private records, which has historically restricted academic research in this region to synthetic or aggregated data.
The present study uses a representative Colombian savings and credit cooperative as a pilot setting. The dataset, comprising 12,861 credit records collected during January–December 2025, is an empirical resource for the sector. Because all solidarity entities in Colombia manage risk under the standardised SARC (Sistema de Administración de Riesgo Crediticio) framework, collecting identical relational, sociodemographic, and credit attributes and using a uniform 90-day default definition mandated by Chapter II, Title IV of the Circular Básica Contable y Financiera (
Superintendencia de la Economía Solidaria, 2017), the methodology and prompt design used here are portable across the national cooperative network, subject to institution-specific replication of the reported numbers.
The empirical work is organised around four research questions, each answered in the section indicated:
RQ1. Does stratified few-shot prompting improve the LLM’s discriminative capacity over the zero-shot baseline on Colombian cooperative-lending data? (Answered in
Section 5.4 and formally tested in
Section 5.7.)
RQ2. Does the LLM offer a genuine label-budget advantage over classical and gradient-boosting ML classifiers when all approaches are evaluated at matched training sizes? (Answered in
Section 5.6.)
RQ3. Are LLM self-reported default probabilities sufficiently well calibrated to serve as decision-support scores without post hoc adjustment? (Answered in
Section 5.5.)
RQ4. Are LLM predictions distributionally uniform across protected demographic subgroups, and how do the disparities compare with those of the ML baselines? (Answered in
Section 5.10.)
The remainder of the paper is organised as follows.
Section 2 reviews the relevant literature, from classical credit scoring to modern computational-intelligence methods, and situates in-context learning and class-imbalance handling within it.
Section 3 describes the empirical dataset, defining the target variable under the supervisory framework of the Superintendencia de Economía Solidaria (SES) and the credit, relational, and sociodemographic features.
Section 4 describes the experimental methodology, including the tuning of tree ensemble and gradient boosting classifiers, the system prompt architecture for the LLM, and the Informed GPT configuration across example-pool sizes (
N).
Section 5 reports the empirical results: predictive performance (AUC), confusion matrices, calibration, matched-budget learning curves, paired tests, and prompt-ablation analysis.
Section 6 discusses the institutional, computational, and regulatory trade-offs of the prompt-based approach.
Section 7 summarises the conclusions and identifies directions for future research on prompt design and algorithmic complementarity.
5. Results
5.1. Overall Comparison with Bootstrap Confidence Intervals
Table 7 summarises the AUC of every model evaluated on the 644-observation test set, together with bootstrap 95% confidence intervals (
resamples). The gradient boosting family, LightGBM, XGBoost, and HistGradientBoosting, dominates with AUC values above 0.95 and tight bootstrap intervals, consistent with prior credit-scoring benchmarks (
Arias-Serna et al., 2026;
Lessmann et al., 2015). Random forest occupies an intermediate position (AUC
, CI
). The Informed GPT and zero-shot configurations cluster in the 0.67–0.74 range with wider bootstrap intervals reflecting both the smaller effective information budget and the run-to-run stability of the model.
Figure 3 visualises this separation: the solid ROC curves of the ML models form a tight upper band, while the dashed and dotted LLM curves occupy a distinct lower region.
The PR-AUC values reproduce the ranking induced by ROC-AUC (ML dominates LLM decisively), but the magnitudes make the practical operational cost of the difference more visible: gradient boosting reaches PR-AUC , while the LLM operates at PR-AUC , i.e., the LLM’s precision at any given recall level on the minority default class is roughly one third of the ML baselines’. This is the metric most directly relevant to cooperatives that must balance false approvals (missed defaults) against false rejections (rejected creditworthy members).
The AUC values reported here for the LLM are below the range reported in the seminal Informed GPT study on LendingClub peer-to-peer lending data (
Babaei & Giudici, 2024). Two structural factors account for the difference. First, our prompt is designed to exclude any supervised-analysis-derived content (
Section 4.3.1), which limits the LLM to genuine few-shot capability without target-informed hints. Second, our ML baseline comprises tuned gradient boosting models, which are substantially stronger references than the classical logistic regression used in (
Babaei & Giudici, 2024). Together, these choices produce a more conservative but methodologically cleaner estimate of the LLM’s predictive performance in credit-scoring contexts.
5.2. Effect of Example Set Size on the Informed GPT
A key question in this study is whether providing more labelled examples in the prompt improves the LLM’s discriminative capacity.
Table 8 presents the AUC statistics for each example-size configuration across five independent runs per size. Two observations stand out. First, all configurations yield standard deviations below 0.025 across runs, indicating that the model’s output is reasonably stable across different stratified example samples. Second, the relationship between
N and AUC is
flat-to-slightly-decreasing: the best mean AUC is achieved by the zero-shot baseline (
, AUC
), and the mean AUC at
hovers near 0.68 with a slight decline as
N increases. Adding more few-shot examples does not improve, and marginally degrades, the LLM’s predictive performance on this dataset.
The prediction-flip rate quantifies the stability of individual borrower decisions, complementing the aggregate-level statistic. Between 12.7% and 17.9% of the 644 test observations receive a different predicted class label in at least one of the five stratified runs, and the flip rate grows with the pool size N. This is a substantially larger figure than the small would suggest, and it clarifies a practical implication: aggregate stability of ROC-AUC is a necessary but not sufficient condition for borrower-level stability of decisions. In an operational deployment, roughly one in eight borrowers at and nearly one in five at would receive a materially different decision, depending on which stratified sample happened to populate the prompt.
Zero-shot involves no example sampling, the prompt is identical for every hypothetical run of the same test set, so it is evaluated once, following the standard practice in the LLM classification literature (
Babaei & Giudici, 2024). Under temperature = 0.0 the OpenAI API is near-deterministic but does not formally guarantee identical outputs across independent calls; consequently, the reported zero-shot AUC is a single-run estimate whose sampling variability we do not quantify and which should be interpreted as an approximate point estimate rather than a distributional summary.
The interpretation is direct: without target-informed hints in the system prompt, the LLM cannot extract useful additional signal from the labelled examples supplied in the few-shot context on this particular dataset. The evidence indicates that the LLM operates near a fixed pre-training-derived competence level on which few-shot examples act more as noise than as informative signal.
5.3. Confusion Matrices
While AUC captures discrimination capacity across all operating points, confusion matrices reveal how each approach behaves at the classification threshold actually used in practice (
).
Figure 4 presents the full picture: the two best ML models, the LLM in zero-shot mode, and the four Informed GPT configurations.
ML models. XGBoost and LightGBM show comparable precision and recall on both classes. On the default (minority) class, XGBoost attains a precision of 0.874 (87.4% of its default alerts are correct), a recall of 0.741, and an score of 0.802. LightGBM trades slightly higher precision (0.888) for lower recall (0.705), yielding on the minority class. On the non-default class, both models exceed 0.94 in precision, 0.97 in recall, and 0.96 in . The macro-averaged (equal-weight across classes) is 0.882 for XGBoost and 0.873 for LightGBM; the support-weighted is 0.934 and 0.930, respectively. This precision–recall profile is relevant in a cooperative-lending context, where a false default flag carries both reputational and relational costs.
LLM zero-shot. Without any labelled examples from the solidarity sector, the model attains a precision of 0.438 and a recall of 0.473 on the default class (): roughly half of its default alerts are false alarms and it captures less than half of the true defaulters. Performance on the non-default class remains acceptable, with a precision of 0.887, a recall of 0.872, and an of 0.880, so the support-weighted stays at 0.806. The macro-averaged , however, collapses to 0.667, approximately 0.22 points below XGBoost, quantifying the cost of the absence of in-distribution calibration. The model applies generic credit-risk heuristics derived from its pre-training that do not fully align with the local distribution of the cooperative’s customer base.
5.4. Informed GPT: Classification Behaviour Under Few-Shot Learning
The bottom row of
Figure 4 traces how the LLM’s predictions evolve as the number of labelled examples in the prompt increases from 10 to 80. Read together with
Table 8, these matrices reveal patterns that go beyond what AUC alone can convey.
From zero-shot to few-shot. Supplying labelled examples shifts the LLM’s threshold-level decisions without uniformly improving the conventional metrics. Across the four configurations, precision on the default class falls from 0.438 (zero-shot) to the 0.252–0.355 range, and recall moves from 0.473 to 0.321–0.482. The corresponding
score on the minority class therefore deteriorates from 0.455 (zero-shot) to 0.282–0.409. On the non-default class, the trajectory is similar but milder: precision slips from 0.887 to the 0.848–0.882 range, and recall from 0.872 to 0.799–0.818. Few-shot prompts therefore nudge the model toward a more aggressive default-predicting regime, but the resulting change in operating point does not translate into a coherent gain in either precision or recall at the
threshold. Notably, the discriminative capacity captured by AUC remains comparable across all configurations (
Table 8), which indicates that the examples reshape the model’s calibration rather than its underlying ranking ability.
Stability and reproducibility. Each matrix in the bottom row aggregates the majority vote across five independent runs, each drawing a different stratified sample of examples from the training set. The low standard deviations in
Table 8 (
for all configurations, and
from
onward) confirm that this stability is not an artefact of aggregation: individual runs yield similar predictions, indicating that the model’s response to the prompt is robust to variation in the example pool. This aggregate reproducibility is a necessary but not sufficient condition for auditability: the borrower-level prediction-flip rate reported in
Table 8 (12.7–17.9% across configurations) shows that a non-negligible fraction of individual decisions still varies across runs.
Non-monotone effect of example size. None of the conventional metrics increase monotonically with
N. The
score on the default class peaks at zero-shot (0.455), degrades to 0.409 at
, drops to a trough at
(0.282), and partially recovers at
(0.341). The macro-averaged
traces the same trajectory, with values of 0.667, 0.628, 0.565, 0.553, and 0.591 for
, respectively. AUC (
Table 8, ensemble values in
Table 7) describes an independent flat-to-slightly-decreasing path: the zero-shot baseline attains the highest AUC (0.7441), and the four Informed GPT configurations cluster in the 0.687–0.696 range with a shallow trough at
(0.6873). All three indicators converge on a single finding: the gross volume of in-context examples is not determinant of few-shot success. At intermediate sizes, the example set is large enough to constrain the model’s reasoning but not diverse enough to cover the feature space, producing a prompt that is informationally saturated but distributionally narrow. This echoes prior observations that prompt composition, rather than mere volume, drives few-shot performance (
Babaei & Giudici, 2024), and identifies example-selection strategies, such as similarity- or uncertainty-based sampling, as a productive direction for future work.
Gap relative to ML models. All Informed GPT configurations remain well below the trained ML baselines on every conventional metric. The AUC gap between the LLM and the best ML model is approximately 0.28, and the support-weighted falls from 0.934 (XGBoost) to the 0.60–0.75 range for the LLM. This gap is the direct consequence of the fundamental difference between the two approaches: ML models are optimised end-to-end on thousands of in-distribution examples, while the LLM adapts exclusively through structural context (variable descriptions plus few-shot examples) and cannot exploit dataset-derived risk heuristics. That limitation, however, is inseparable from the LLM’s core practical advantage; the same model can be transferred to a new lending context, or updated to reflect new regulatory guidance, by modifying the prompt alone, without a retraining pipeline.
5.5. Calibration Analysis
Beyond ranking quality (AUC), the operational usefulness of predicted probabilities requires calibration: probabilities that correspond, on average, to observed default frequencies.
Table 9 presents Brier score, log loss, and expected calibration error (ECE, 10 bins) for every model, along with the mean predicted probability and the observed default rate.
The calibration slope column of
Table 9 is a second diagnostic that complements ECE: a slope below 1.0 indicates that the model’s probabilities are too extreme (peaked toward 0 or 1 more than the outcome supports), while a slope above 1.0 indicates the opposite. The Informed GPT configurations all sit close to 1.0 in slope but exhibit strongly negative intercepts (
to
), which is the source of the systematic over-prediction: the LLM’s rank order of clients is approximately consistent with the true logit, but the location is shifted uniformly toward higher predicted probabilities.
Figure 5 shows this graphically: the reliability diagrams plot observed default frequency against predicted probability for every model, so that a perfectly calibrated classifier traces the diagonal.
Post Hoc Calibration: Platt Scaling and Isotonic Regression
To evaluate whether the LLM’s ranking-quality signal (AUC 0.67–0.74) can be rescued for direct decision use, we fit Platt scaling (univariate logistic regression on validation logits) and Isotonic regression (nonparametric monotone remapping) on a 50/50 split of the LLM test predictions and evaluate on the held-out half.
Table 10 reports the pre- and post-calibration metrics.
Both calibration methods reduce ECE by a factor of 4 to 13 across all Informed GPT configurations and bring the calibration gap into the range, i.e., the calibrated LLM’s mean predicted probability matches the observed base rate to within one percentage point. Platt scaling and Isotonic regression yield comparable results; Platt is preferable when the underlying ranking is approximately monotone in the logit (as here) because it estimates only two parameters, whereas Isotonic fits a step function that can overfit small validation sets.
The naive cutoff is systematically suboptimal on an imbalanced dataset, such as this one (base rate 17.4%). A grid search over on the validation half of the test set yields F1-optimal decision thresholds around for the ML models and for the LLM. Substituting the F1-optimal threshold for the naive default recovers approximately 2–5 F1 points on the default class for every ML model and 8–10 F1 points for the LLM configurations. In practice, cooperatives adopting either family of models should validate a decision threshold on a held-out sample before deployment; the code accompanying this paper produces this threshold as an automatic pipeline step.
Three findings stand out. First, all ML models exhibit acceptable calibration (ECE < 0.05, Brier < 0.07), with XGBoost achieving both the highest AUC and the lowest Brier score. Second, all LLM configurations are substantially miscalibrated: ECE ranges from 0.108 (zero-shot) to 0.209 (), roughly four to eight times the ML baseline, and Brier scores exceed 0.12. Third, and most importantly for operational deployment, the LLM systematically over-predicts default: the mean predicted probability lies between 0.28 and 0.38, while the true base rate is 0.174, yielding a positive calibration gap of to . Notably, this over-prediction worsens with more few-shot examples; the calibration gap grows monotonically from () to (), suggesting that in-context examples shift the model’s operating threshold without improving its ranking capacity. Reliability curves for the LLM lie systematically below the diagonal at every predicted-probability bin, indicating over-confidence in the default class. The practical deployment of the LLM therefore requires either post hoc calibration (Platt scaling or isotonic regression fitted on a validation set) or an operating threshold above the naive cutoff.
5.6. Matched Label-Budget Learning Curves
To assess whether the observed LLM-versus-ML gap reflects the modelling approach or the asymmetric label budget, we train logistic regression, XGBoost, and LightGBM at progressive stratified subsamples of the training set.
Table 11 reports the mean test AUC (over five runs per budget) on the 2573-observation hold-out partition.
The matched-budget analysis clarifies the LLM’s competitive position:
At the lowest budget (), the LLM outperforms logistic regression (0.680 vs. 0.658) and dominates the gradient boosting models, which fail to learn (AUC = 0.5) with so few examples.
At , XGBoost begins to learn a discriminative signal but remains close to the LLM (0.697 vs. 0.680). LightGBM still fails.
At , XGBoost (0.756) already surpasses the LLM (0.674).
From onward, both gradient boosting models decisively outperform the LLM: at , they reach 0.849 while the LLM stalls at 0.672, and by they reach 0.935 while the LLM cannot exceed its pre-training-derived competence level.
Logistic regression, by contrast, closes the gap with the LLM only around (0.735 vs. 0.680) and continues to improve up to 0.813 at .
The result can be stated as follows: the LLM’s “low-label advantage” holds against logistic regression across the label-scarce regime, but is reversed by tuned gradient boosting once training data reaches approximately 40–80 labelled defaults. For cooperatives with more than ≈100 labelled defaults, a tuned XGBoost or LightGBM model reaches higher AUC than any of the few-shot LLM configurations examined here. The finding narrows the population of institutions for which prompt-based classification is a defensible primary option to those operating below the ≈100-labelled-default threshold; above that threshold the recommendation of this study is unambiguously in favour of a tuned gradient-boosting pipeline.
5.7. Paired Statistical Tests
To confirm that the differences reported above exceed sampling variability, we complement the bootstrap intervals with paired DeLong tests (for AUC comparisons on the shared test set) and McNemar tests with Edwards’ continuity correction (for threshold-level classification agreement).
Table 12 reports the
p-values for the contrasts that matter for the paper’s claims; the full 45-pair matrix is available in the supplementary CSV paired_tests.csv.
Three findings follow. First, every ML-vs-LLM contrast is significant under both tests, indicating that the observed gap of approximately 0.22–0.28 AUC points is not attributable to sampling variability. Second, within the ML family, the gradient boosting variants (XGBoost, LightGBM, HistGradientBoosting) are statistically indistinguishable from each other (
in every pair); random forest is significantly lower than LightGBM (
) and HistGradientBoosting (
), consistent with its lower point estimate. Third, within the LLM family none of the six pairwise contrasts among few-shot configurations (
) reaches significance at
, consistent with the flat pattern reported in
Table 8; zero-shot is significantly better than every Informed GPT configuration (
under DeLong), so that adding stratified few-shot examples does not improve, and marginally reduces, the LLM’s discriminative capacity on this dataset.
5.8. Repeated Cross-Validation Robustness Check
To assess the stability of the ML AUC estimates beyond the single 95/5 split, we run a
repeated stratified k-fold cross-validation (25 folds total) on the full 12,861-observation dataset.
Table 13 reports the mean and standard deviation of AUC across folds for the three matched-budget models. The estimates from the single test partition are reproduced: gradient boosting models attain AUC
with cross-fold standard deviations below 0.004, and logistic regression attains AUC
with
. The tight cross-fold intervals indicate that the ML performance estimates are stable to the choice of train/test partition.
5.9. Sensitivity Analysis: LLM on Ex Ante Features Only
To evaluate the influence of the three variables flagged as potentially outcome-adjacent in
Section 3.4 (s_intereses, reestr, s_capital) on the LLM’s predictions, we re-ran the zero-shot LLM on the same test partition using only the 20 ex ante features. This complementary analysis addresses the natural concern that the LLM might be exploiting outcome-adjacent information through the few-shot examples or the variable descriptions.
Removing the three flagged variables reduces zero-shot AUC by approximately 0.05 points, indicating that these variables do contribute discriminative signal to the LLM but that their contribution is a small fraction of the total (0.74 with → 0.69 without). The LLM continues to outperform logistic regression at matched budget on the safe subset. The result validates the classification of these variables as outcome-adjacent while confirming that the qualitative conclusions of the paper, the LLM operates below tuned gradient boosting and below logistic regression trained beyond ≈100 examples, are preserved when the safe subset is used.
5.10. Subgroup Fairness Analysis
Following the concerns raised in the LLM credit-scoring literature about bias amplification across demographic groups (
Feng et al., 2023;
Y. Li & Zhang, 2023), we conduct an exploratory subgroup fairness analysis by reporting AUC on eight demographic slices of the test set: sex (female, male), socioeconomic stratum (low 1–2, mid 3, high 4–6), and age (under 35, 35–55, over 55).
Table 15 summarises the maximum absolute AUC deviation from the overall AUC across subgroups for each model.
The pattern reveals a systematic difference between the two families of models. ML classifiers exhibit maximum absolute AUC deviations below 0.03 across all subgroups, indicating relatively uniform performance across demographic slices. LLM configurations, by contrast, exhibit deviations three to five times larger (0.07–0.10), with the most pronounced disparities appearing across socioeconomic-stratum subgroups. The direction of the disparity is consistent: LLM performance is systematically higher on the higher-stratum subgroup than on the lower-stratum subgroup. This is a preliminary but concerning finding that supports the tempered claims about LLM fairness discussed in
Section 6 and motivates formal fairness audits (equal opportunity, demographic parity, calibration by group) as a prerequisite for any deployment targeting protected populations.
Table 16 extends the analysis to protected-group errors (false-positive rate FPR and false-negative rate FNR) at the operational
threshold. The LLM’s low detection rate for defaulters holds at the subgroup level: FNR exceeds 0.87 in every subgroup and reaches 1.00 among borrowers over 55. HistGradientBoosting reports FNR between 0.20 and 0.48 across subgroups; random forest between 0.11 and 0.34. The FPR profile is the reverse: the LLM has an FPR below 0.02 in every subgroup (it rarely flags a non-defaulter), while ML models trade a higher FPR for lower FNR. At the fixed
threshold the LLM therefore misses approximately nine out of ten defaulters, which is the metric relevant to a cooperative deciding whether to disburse a loan; the aggregate AUC is not the operationally binding statistic.
5.11. Three-Way Prompt Ablation: Neutral vs. Expert-Informed vs. SHAP-Informed
To directly quantify the effect of prompt-content leakage, we run a three-way prompt ablation over: (i) a neutral prompt (used throughout the main results), which contains only regulatory context and semantic feature descriptions without directional risk interpretations; (ii) an expert-informed prompt, i.e., the neutral prompt plus directional risk statements derived from regulator-published risk factors (SES SARC circular) and general credit-risk doctrine, but no supervised-analysis output; and (iii) a SHAP-informed prompt (positive-control leakage baseline), i.e., the neutral prompt plus the top-ranked SHAP predictors from prior supervised analysis of the same dataset, with their learned effect directions and an explicit target base-rate disclosure.
The SHAP-informed variant is reconstructed from the predictor rankings and directional statements published in the prior supervised analysis of this dataset (
Arias-Serna et al., 2026); no fresh SHAP attribution is fitted for the ablation, and no SHAP computation is performed on the 644-observation test partition. The variant is therefore a positive-control that mirrors a realistic “worst-case” prompt-engineering practice, in which an analyst reuses a published feature-importance ranking to draft a prompt without re-doing the leakage audit. Because the underlying attributions were produced on data drawn from the same portfolio, the variant is treated in this study as a leakage baseline for comparison and not as a candidate deployment configuration.
The ablation is restricted to the zero-shot setting because
Section 5.4 and the paired DeLong tests of
Section 5.7 establish that zero-shot is the strongest LLM configuration on this dataset—Informed GPT at
is significantly worse than zero-shot (
, DeLong). Testing leakage effects at few-shot sizes would evaluate weaker operating points and would not change the conclusion. This is a paper-specific empirical claim (the standard few-shot learning literature reports that additional examples help in many contexts); we take no position on the general question and restrict the argument to what the evidence from this dataset supports.
Table 17 reports ROC-AUC, mean predicted probability, and the fraction of test observations classified as default at the operational
threshold, for each of the three prompt variants on the shared 644-observation test partition.
Three observations follow. First, the AUC ordering matches the direction expected ex ante from the leakage-mitigation design: neutral < expert-informed < SHAP-informed. Removing the SHAP-derived content from the prompt lowers the reported AUC by 0.054 points; removing the domain-doctrine directional statements lowers it by a further 0.039. Second, the incremental gain from expert-informed to SHAP-informed is small (+0.015 AUC), which indicates that most of what SHAP-informed content contributes to the LLM’s ranking capacity is already recovered by an expert prompt grounded in regulatory doctrine; the marginal contribution of dataset-derived rankings on top of regulator-derived directions is modest. Third, and relevant for operational use, the SHAP-informed prompt shifts the operating point substantially: mean predicted default probability rises to 0.394 (vs. 0.270 neutral) and the fraction of observations classified as default at rises to 42.1%, approximately 2.4× the true base rate of 17.4%. The SHAP-informed prompt therefore yields 0.015 AUC over expert-informed at the cost of a calibration bias toward over-prediction.
The neutral prompt used throughout the main results of this paper is thus the most conservative of the three, and the LLM AUC range (0.67–0.74) reported in
Table 7 corresponds to the operating point that most cleanly separates in-context learning from target-leaking prompt engineering. The higher AUC figures reported in
Babaei and Giudici (
2024) on LendingClub peer-to-peer lending data are consistent with the SHAP-informed operating point that the present study explicitly excludes. This ablation makes explicit what the sensitivity analysis in
Section 5.9 (
Table 14) had already indicated by a different route (removing outcome-adjacent features from the neutral prompt also lowers AUC by approximately 0.05 points).
The ablation supports a specific design guideline for LLM credit-risk classification: regulator-derived directional statements (from SES SARC, GDPR Article 22, or analogous supervisory doctrine) recover most of the ranking-quality gain that a dataset-derived SHAP prompt provides (
vs.
AUC from the neutral baseline,
Table 17), and they do so without requiring an independent leakage audit of the prompt content. Prompt designs for regulated deployment should therefore prefer regulator-derived directional content over reused SHAP rankings, and any use of the latter should be accompanied by an audit demonstrating that the ranking was computed on data disjoint from the evaluation partition.
6. Discussion
The empirical results are consistent with the ranking expected from prior credit-scoring benchmarks: trained ML models reach higher discriminative performance than the LLM on this dataset. Tuned gradient boosting ensembles attain AUC values of approximately 0.96 with bootstrap confidence intervals
, whereas the LLM operates in the 0.67–0.74 range, a gap of approximately 0.22–0.28 AUC points that is significant in paired DeLong tests. This gap is wider than the difference reported in the original Informed GPT validation on LendingClub peer-to-peer lending data (
Babaei & Giudici, 2024). Two design choices account for the widening. First, the prompt used here excludes supervised-analysis-derived content, so that in-context learning must operate on the few-shot examples supplied at inference time. Second, the reference ML pipeline comprises tuned gradient boosting models (XGBoost, LightGBM), which are stronger references than the logistic-regression baseline used in
Babaei and Giudici (
2024) (
Chen & Guestrin, 2016;
Ke et al., 2017;
Lessmann et al., 2015). Together, these choices yield a more conservative estimate of the LLM’s competitive position.
The matched label-budget learning curves refine the comparison between the two families. When ML classifiers are trained at the same label budgets available to the few-shot LLM (10, 20, 40, 80 labelled examples), the LLM outperforms logistic regression across the label-scarce regime and outperforms gradient boosting at examples. Once training data reaches approximately 40–80 labelled defaults, tuned gradient boosting overtakes the LLM: at , both XGBoost and LightGBM reach AUC , while the LLM remains at 0.67. The operating condition for LLM adoption can therefore be stated concretely: the LLM offers an advantage over classical ML in the regime of fewer than approximately 100 labelled defaults and is surpassed once labels become plentiful. This regime is relevant for cooperatives in the solidarity sector, many of which operate with hundreds rather than thousands of documented default cases.
The calibration analysis introduces a further qualification. All Informed GPT configurations are miscalibrated: the expected calibration error (ECE) ranges from 0.11 to 0.21, roughly four to eight times the ML baseline of , and the mean predicted probability lies above the true default base rate (0.28–0.38 vs. 0.17), producing calibration gaps of to . The LLM therefore over-predicts default under the naive operating point. Operational use requires either post hoc calibration (Platt scaling or isotonic regression fitted on a validation partition) or a validation-derived threshold above 0.5. This qualifies claims made in the earlier LLM credit-scoring literature about the readiness of self-reported LLM probabilities for direct decision use: AUC-based ranking quality does not, on its own, imply well-calibrated decision-support scores.
The comparison between the two approaches must also account for the operational differences. The trained ensembles reach higher in-distribution accuracy, but deployment requires labelled datasets of sufficient size, dedicated ML expertise, training and serving infrastructure, and explainability frameworks compatible with regulatory scrutiny, resources that small cooperatives often lack. The LLM, in turn, adapts to a new lending context through prompt modification alone, produces per-prediction natural-language rationales, and can be updated to reflect regulatory guidance without a retraining cycle (
Babaei & Giudici, 2024;
T. Brown et al., 2020). The primary LLM campaign consumed USD 8.69 in API costs (
Section 4.8); including validation re-runs, the total experimental footprint remained under USD 15, several orders of magnitude below the fixed costs of an in-house ML pipeline (hardware provisioning, MLOps tooling, specialised personnel).
The qualitative advantages of the LLM should be interpreted with caution. The LLM produces natural-language rationales, but their status as
explanations in the auditing sense is not established: the rationales document the model’s stated basis for each prediction, and their faithfulness to the underlying transformer computation would require additional validation that this study does not attempt. The exploratory subgroup fairness analysis of
Section 5.10 raises a concern of comparable weight: LLM configurations exhibit AUC deviations across demographic subgroups that are three to five times larger than those of the ML baselines (0.07–0.10 vs. 0.02–0.03), with the largest disparities across socioeconomic-stratum subgroups. This is a preliminary signal that a formal fairness audit (equal opportunity, demographic parity, calibration by group) is a prerequisite for any deployment targeting protected populations, consistent with prior reports of bias amplification in LLM-based lending decisions (
Feng et al., 2023;
Y. Li & Zhang, 2023). Auditability, in the sense required by supervisory authorities, remains to be evaluated formally. Aggregate prediction stability across runs (
in every configuration) is a necessary but not sufficient condition; the borrower-level prediction-flip rate reported in
Table 8 (12.7% at
growing to 17.9% at
) shows that at the level of the individual credit decision, one in eight to one in six borrowers receives a materially different verdict across independent stratified runs. This is the borrower-level auditability diagnostic that the current data configuration supports, and it establishes the empirical lower bound against which a future consistency-of-explanation audit (
Rudin, 2019) would be evaluated. Fidelity assessment of the rationales, human evaluation with credit officers, cross-run consistency scoring of the reasoning itself, and comparison against SHAP attributions are the four assessments this study does not perform; all four are enumerated as item 6 of
Section 6.7.
Several further limitations should be noted. The primary evaluation was conducted on the 5% held-out partition of (
Arias-Serna et al., 2026) (644 observations) to maintain direct comparability with the baseline ML models; the wider partition used for the learning curves (2573 observations) yields narrower confidence intervals but is evaluated on a different sample. The dataset originates from a single cooperative, which constrains external validity; replication across institutions would be required for wider generalisation. Although the dataset was collected during January–December 2025, the raw records do not include row-level timestamps (per-loan disbursement or snapshot dates), which precludes out-of-time validation at the row level; this is a structural constraint of the available data rather than of the methodology. Borrower-level separation is unaffected: as stated in
Section 3.1, the unit of analysis is the credit and each credit belongs to a different client, so the split already separates borrowers. The block comparison of
Table 18 carries a limitation of its own: the ML side is measured by permutation ΔAUC and the LLM side by rate of invocation in the rationale, so the two panels are complementary views rather than a single scale, and a strictly symmetric comparison would require permuting each block in the prompt payload and re-querying the model, which is a new inference campaign rather than a re-analysis of the existing outputs; the protocol is set out as item 7 of
Section 6.7. Dependence on a closed-source commercial model (gpt-4o-mini) also introduces concerns regarding cost predictability, data confidentiality, and reproducibility over time as the underlying model is updated; evaluation of open-source alternatives (Llama, Mistral, Qwen) is a natural extension.
Considered jointly, these results position LLM-based credit classification as a tool with defined operating conditions rather than as a general substitute for ML. Gradient boosting ensembles remain the reference for institutions with the data, expertise, and infrastructure required to deploy them. Prompt-based classification, in turn, offers an assessment option for cooperatives that would otherwise lack access to data-driven scoring, particularly those operating with fewer than approximately 100 labelled defaults, provided that the deployment includes prompt-content auditing, probability calibration, and threshold optimisation. The evidence reported here can be extended as prompting techniques and language-model architectures continue to develop.
6.1. Effect of Prompt Volume Versus Prompt Content
The observation that ROC-AUC is flat or decreasing in
N (
Table 8) and that zero-shot is significantly higher than every Informed GPT configuration (
under DeLong,
Table 12) admits an operational and a theoretical reading. Operationally, once the LLM has fixed its ranking-quality signal at the pre-training-derived competence level, additional stratified examples act as noise on the decision boundary rather than as informative signal, and the calibration gap grows monotonically from
(zero-shot) to
(
). Theoretically, this decouples
prompt volume from
prompt content: it is the composition of the prompt (which variables, which regulatory context, which risk framing) rather than the number of examples that determines how the LLM’s in-context adaptation reshapes the decision boundary. This is a dataset-specific empirical claim; the standard few-shot learning literature reports that additional examples improve performance in many contexts. Similarity- or uncertainty-based example selection, active-learning-style prompt construction, and expert-informed variable prioritisation are candidate refinements not exploited by the stratified-random sampling protocol used here. This places the design question where the prompt-engineering literature locates it, in the systematic specification and iterative refinement of prompt content rather than in the accumulation of examples (
Velásquez-Henao et al., 2023).
6.2. Differential Decision Boundaries: LLM vs. ML
Three empirical signals indicate that the LLM’s decision boundary differs qualitatively from the ML models’ boundary in this cooperative-lending context. First, the LLM’s AUC clusters at 0.67–0.74 with
across all example-pool sizes (
Table 8), consistent with a boundary dominated by pre-training-derived general credit-risk heuristics rather than by the cooperative-specific signal that the ML models extract, principally from the customer–cooperative relationship block (
Table 18). Second, the systematic over-prediction of default (calibration gap
to
,
Table 9) indicates that the LLM applies a decision threshold shifted toward the positive class relative to the true base rate. Third, the learning-curve crossover (
Table 11) shows that the LLM boundary is competitive with gradient boosting only when
; with more training data the ML models converge to a different boundary that the LLM does not access without weight updates. These three signals are consistent with the interpretation that the LLM’s decision surface is a low-dimensional projection of pre-training credit-risk knowledge onto the cooperative-lending domain, whereas the ML models’ surface is fitted to the sector-specific joint distribution of features and defaults.
The three signals above describe how the boundaries differ but do not identify the variables responsible, so we measure the weight each variable block carries in each family. The 23 predictors are partitioned into the three blocks of
Section 3.2: loan variables (
Table 2), customer–cooperative relationship variables (
Table 3), and sociodemographic variables (
Table 4). For the ML models, we report group permutation importance, the mean drop in test AUC over 20 repeats when every variable in a block is permuted on the 644-observation test partition. The block is permuted jointly; that is, all of its columns are reordered by a single shared row permutation, which preserves the correlation structure within the block and removes only its association with the target and with the remaining blocks. Because the blocks group correlated predictors, a joint measurement of this kind exceeds the sum of the individual variable importances since permuting one variable at a time leaves its contribution partly recoverable from its correlates while permuting the block removes it in full; for the relationship block, the joint figure is 1.4 to 1.7 times that sum, depending on the model. The block values are therefore to be read as the weight of each block taken as a unit, not as an additive decomposition into variables. The already-fitted pipelines are scored, no model is refitted, so the baseline adopted from
Arias-Serna et al. (
2026) is unaffected. For the LLM, we report the rate at which each block is invoked in the per-prediction natural-language rationale, obtained by applying a Spanish-language lexicon of variable-referring expressions to the 644 zero-shot rationales.
Table 18 reports both.
The asymmetry is pronounced and it runs in opposite directions. For every ML model, the relationship block is the most important of the three, with permutation ΔAUC between 0.196 and 0.256, roughly twice the loan block (0.089 to 0.122) and an order of magnitude above the sociodemographic block (0.016 to 0.023). Membership tenure, equity contributions, and savings balances are what the tuned ensembles principally use to separate defaulters in this portfolio. For the LLM, the ordering is reversed: the relationship block is the least invoked of the three, appearing in 57.0% of rationales, while sociodemographic content appears in every one. Within the relationship block, the LLM concentrates on the two variables with everyday financial meaning, savings balance (30.4% of rationales) and membership tenure (21.6%), and almost never invokes the two that are specific to cooperative membership, member type (0.0%) and membership status (0.3%). At the level of individual variables, monthly income, monthly expenses, and the external credit score are each cited in more than 99% of rationales. The last of these is worth isolating, because it separates two notions of importance that are easily conflated. The external credit score puntaje_data has high univariate discriminative power, comparable to that of s_intereses (
Section 3.4), yet its individual permutation importance is negligible for every ML model, between 0.001 and 0.006 ΔAUC, because the relational block already carries the information it contributes. The LLM invokes it in 99.4% of its rationales. A variable that a language model treats as the central piece of evidence is thus one the tuned ensembles can discard without measurable loss, which is a concrete instance of the boundary divergence this subsection describes.
This gives the qualitative claim of this subsection an empirical basis. The ML models place most of their discriminative weight on precisely the block the LLM refers to least, which is the block that encodes the borrower’s accumulated history with the cooperative and is therefore the least represented in the general credit-risk knowledge a language model acquires during pre-training. The LLM instead anchors on the income, expense, and credit-score triad that is standard in consumer lending worldwide. The relationship block is the sector-specific signal, and it is the part of the boundary that prompt-based adaptation does not recover.
6.3. Financial Inclusion Considerations
The results bear on the inclusion mandate of the solidarity sector. Cooperatives regulated by the SES serve populations underserved by commercial banking; their members are often informal-sector workers, first-time borrowers, and clients with limited external credit history. This intermediation role is documented across the region: credit unions extend access to segments that commercial banks do not reach (
Lemus & Rojas, 2022), and financial inclusion is associated with poverty reduction and lower inequality in Latin American economies (
Rubio & León, 2025). For a cooperative operating with fewer than approximately 100 documented default cases, the alternative to LLM-based classification is not a tuned gradient boosting model but no data-driven scoring at all. In that regime, the LLM lowers the fixed-cost barrier that has restricted the smallest institutions from computational credit-risk assessment. This is the specific inclusion-relevant contribution of prompt-based classification. The lower predictive ceiling (AUC 0.67–0.74 vs. 0.96 for gradient boosting) and, as documented in
Section 5.10, the larger subgroup AUC dispersion should be weighed against this contribution by each deploying institution.
6.4. Ethics and Regulatory Considerations
The credit-scoring context in which this study is situated is subject to overlapping regulatory frameworks, and the LLM approach interacts non-trivially with each of them. We structure the discussion along six pillars.
Under GDPR Article 22(3), data subjects have the right to obtain
meaningful information about the logic involved in an automated decision that produces legal effects concerning them; the scope of that right has been the subject of substantial academic debate (
Wachter et al., 2017). Whether the LLM’s natural-language rationale satisfies this standard is not settled: the rationale documents the model’s stated basis for each prediction, but its faithfulness to the transformer’s actual computation is not established (
Section 6 above). Colombian Ley 1266 de 2008 and Ley 1581 de 2012 impose analogous transparency obligations for credit-reporting and personal-data processing.
The preliminary evidence in
Section 5.10 (
Table 15 and
Table 16) documents substantially larger subgroup AUC dispersion for the LLM than for the ML models, with the most pronounced disparities across socioeconomic-stratum subgroups. We recommend a formal fairness audit (
Hardt et al., 2016) (equal opportunity, demographic parity, calibration by group, disparate-impact ratio) as a deployment prerequisite. The finding is consistent with the LLM bias-amplification risks documented in (
Feng et al., 2023;
Y. Li & Zhang, 2023).
Using a third-party API for classification implies transmitting 23 personal financial variables per client to OpenAI’s infrastructure. We recommend three data-minimisation measures for any deployment: (i) pseudonymize n_credito before transmission; (ii) coarsen ciudad and departamento to a broader geographic unit when the finer granularity is not decision-relevant; (iii) bracket edad into five-year bins. The OpenAI API data-retention policy for the account tier used in this study should be reviewed against the Ley 2300 de 2023 (habeas data financiero) obligations (
República de Colombia, 2023) before any production deployment. An explicit data-processing agreement is a prerequisite.
Credit scoring is classified as a high-risk AI system under Annex III of the EU AI Act (
European Commission, 2024). Deployments of the LLM approach in EU jurisdictions inherit the full obligations of Article 9 (risk management), Article 10 (data governance), Article 11 (technical documentation), Article 13 (transparency and information to users), Article 14 (human oversight), and Article 15 (accuracy, robustness, cybersecurity). The leakage audit (
Section 3.4 and
Section 4.3.1), calibration analysis (
Section 5.5), subgroup fairness analysis (
Section 5.10), and prompt-composition disclosure (
Table 6) can serve as building blocks for the technical documentation required under Article 11, but they do not by themselves discharge the human-oversight and accuracy-monitoring obligations.
An LLM-derived classification decision is the joint product of the cooperative (which frames the prompt, provides the data, and applies the decision) and the model provider (which trains and hosts the LLM). We recommend that any deployment contract explicitly allocate responsibility for each of the failure modes documented in this paper: leakage exploitation, calibration drift, subgroup fairness degradation, and prediction-flip instability. Ambiguous allocation is a legal and reputational risk that the current commercial-API contracts do not automatically resolve.
The protocol adopted in this paper, leakage-free prompt design, calibration analysis, matched-budget comparison, subgroup fairness audit, prediction-flip disclosure, and tempered qualitative claims, is offered as a template for responsible LLM deployment in credit contexts. The template is not exhaustive: formal fairness audits, human-in-the-loop explanation evaluation, and out-of-time validation are outside the scope of the present study but remain prerequisites for full Responsible-AI compliance.
6.5. Practical Deployment Considerations
Beyond model performance and regulatory compliance, deploying the LLM approach in a real cooperative involves practical constraints that the token-only cost figure (USD 8.69 for the experimental campaign) does not capture.
Individual LLM calls in the campaign took on the order of 1–3 seconds each (dominated by the JSON parsing round-trip); a five-run ensemble multiplies this by 5. At batch-scoring loads (e.g., end-of-month credit committee), the per-decision latency is negligible; at real-time application scoring, the latency budget should be planned explicitly.
The observed rate of 12,308 calls over the full campaign fits comfortably within the OpenAI rate limits for the tier used in this study. Peak scoring loads (e.g., a promotional lending campaign) should be pre-provisioned against the rate-limit ceiling to avoid queuing delays; the retry-with-backoff logic (
Section 4.8) provides graceful degradation but does not remove the ceiling.
The data-minimisation measures listed in the Ethics subsection above (pseudonymize n_credito, coarsen ciudad/departamento, bracket edad) also reduce the surface for a re-identification attack against the API-transmitted payload.
The commercial-API dependency creates three specific risks: (i) reproducibility over time as the model provider updates the underlying snapshot, which we mitigate by pinning gpt-4o-mini-2024-07-18; (ii) cost predictability under contract renegotiation; (iii) service continuity under provider outages. Open-source alternatives (Llama, Mistral, Qwen) can be self-hosted at a higher fixed cost and remove all three risks; frontier commercial models raise cost by one to two orders of magnitude but reduce the ranking-quality gap somewhat.
Prompt-injection is a live risk whenever any part of the input can be manipulated by an adversarial actor. In the cooperative context, most variables are cooperative-controlled fields (plazo, v_prestamo, aportes, etc.), which limits the surface substantially; the higher-risk variables are free-text fields (actividadeconomica, ciudad), where a bad-faith actor could in principle inject instructions. We recommend input sanitisation (strip control characters, cap length, escape delimiters) as a deployment prerequisite.
A typical cooperative IT profile (Windows workstations, limited devops capacity, no MLOps stack) supports a lightweight Prefect-based pipeline of the type used in this study; a full retraining/serving infrastructure is generally not feasible. This is the setting the LLM approach targets.
Ongoing operations require: (i) calibration-drift monitoring (calibration-gap tracking week over week); (ii) prompt-content re-validation after any provider snapshot update; (iii) periodic subgroup-fairness re-audit; (iv) prediction-flip drift monitoring across independent runs. A cooperative deploying this approach should budget for these monitoring activities as part of the total cost of ownership.
The USD 8.69 experimental figure captures API costs at experimental scale only. A rough projection for a mid-sized cooperative processing 1000 credit decisions per month is: API cost approximately USD 1–2 per 1000 single-run decisions (USD 5–10 for a five-run ensemble); part-time personnel for prompt maintenance, calibration re-audit, and fairness re-audit approximately 0.1 FTE annually; integration cost with the cooperative’s core-banking system estimated at one-time USD 3000–8000; monitoring infrastructure approximately USD 500–1500 annually. This total is orders of magnitude below the fixed cost of an in-house ML pipeline (hardware, MLOps tooling, specialised ML personnel), but it is not zero.
6.6. Transferability to Other Institutional Contexts
The empirical evidence in this study derives from a single Colombian cooperative. The transferability of the specific numerical results is subject to structural qualifications that vary across institutional contexts:
Commercial banks. Typically operate with tens of thousands of labelled defaults per portfolio, placing them well beyond the regime where the LLM is competitive. The paper’s findings support the opposite recommendation for commercial banks: tuned gradient boosting is the appropriate choice. The LLM approach is not intended to substitute for a well-resourced bank pipeline.
Other Latin American countries. Cooperative-lending sectors in Ecuador (SEPS), Peru (SBS-supervised COOPACs), Brazil (Bacen-supervised cooperatives), and Mexico (LRASCAP-regulated) share the SES-style regulatory structure. The methodology of leakage audit, calibration analysis, matched-budget curves, and subgroup fairness audit is transferable to those settings; the specific AUC numbers should not be assumed to hold and require country-specific replication.
Online lending organisations (BNPL, digital lenders) typically have thousands of labelled outcomes and rely heavily on behavioural and transactional features (device fingerprints, transaction history, click patterns) absent from the cooperative dataset. The LLM’s competitive position is unlikely to hold in this setting: the discriminative signal is elsewhere, and the LLM cannot access it through the prompt.
Microfinance institutions. Closest analogue to the cooperative case: small labelled portfolios, heterogeneous informal-sector clientele, limited technical infrastructure. The LLM’s competitive position at –80 likely transfers, subject to language and regulatory-context adaptation of the prompt.
6.7. Future Directions
Seven research directions arise directly from the empirical evidence of this study:
Out-of-time validation on time-stamped cooperative data, once available, would substantiate the prospective-validation claim that the current cross-sectional dataset cannot support.
Multi-institution replication across cooperatives, ideally spanning multiple Latin American regulatory frameworks, is the natural next step for external-validity claims.
Open-source LLM benchmarks (Llama, Mistral, Qwen) would test whether the observed LLM competence level is specific to the OpenAI family or generalises across provider families, and would also remove the commercial-API dependency risks described in
Section 6.5.
Similarity- or uncertainty-based example selection for the prompt, replacing the stratified-random sampling protocol of this study, may narrow the gap between the flat few-shot curve and the pre-training-derived competence ceiling identified in
Section 6.1.
Formal fairness audits (equal opportunity, demographic parity, group-calibrated) would extend the exploratory subgroup analysis of
Section 5.10 into a full compliance framework suitable for regulated deployment.
Explanation-quality evaluation of the LLM rationales. This study reports the rationales but does not evaluate them, and four distinct assessments are required before they can be treated as explanations in the auditing sense.
Fidelity assessment would measure whether the stated rationale is faithful to the computation that produced the prediction, through counterfactual perturbation of the cited variables or comparison against attention-based and gradient-based attributions.
Human evaluation would apply a structured protocol with credit officers, covering annotation guidelines, inter-rater agreement instrumentation, and measured officer time, to test whether the rationales are usable and actionable in a real credit committee.
Consistency in reasoning would score the rationales across independent runs, extending the borrower-level prediction-flip rate of
Table 8 from the predicted label to the stated justification, so that a borrower who receives the same verdict can also be shown to receive the same reason.
SHAP comparison would contrast the variables invoked in the LLM rationale against SHAP attributions computed on the ML models for the same observations, establishing whether the two explanation families converge on the same drivers or diverge systematically. None of the four is attempted here, and each is a prerequisite for the transparency obligations discussed in
Section 6.4.
A common feature-attribution protocol across model families. The block comparison of
Table 18 measures the ML side by permutation and the LLM side by rate of invocation in the rationale, which are complementary but not commensurable. Permuting a variable block in the prompt payload and re-querying the model would place both families on a single permutation scale, at the cost of a new inference campaign, and would also supply the attribution baseline that the SHAP comparison of the previous item requires.
7. Conclusions
This study extends the Informed GPT methodology of
Babaei and Giudici (
2024) to the Colombian solidarity sector, evaluates it against a fixed reference ML pipeline (
Arias-Serna et al., 2026) on data from a savings and credit cooperative, and reports six methodological additions relative to the seminal reference: (i) a new empirical domain (Colombian solidarity-sector cooperatives regulated by the SES under the SARC framework); (ii) a multi-model comparison against five tuned tree ensemble and gradient boosting classifiers; (iii) a feature and prompt leakage audit, including a three-way prompt ablation (neutral/expert-informed/SHAP-informed); (iv) a calibration analysis using Brier score, log loss, ECE, reliability diagrams, calibration slope and intercept, and post hoc Platt and isotonic remapping; (v) bootstrap 95% confidence intervals and paired DeLong/McNemar tests, complemented by borrower-level prediction-flip rates; and (vi) matched label-budget learning curves against logistic regression, XGBoost, and LightGBM.
Three empirical findings follow. First, tuned gradient boosting ensembles (LightGBM, XGBoost, HistGradientBoosting) reach AUC
(bootstrap CI
), whereas the LLM operates in the AUC 0.67–0.74 range across example-pool sizes
; the gap of approximately 0.22–0.28 AUC points is significant under paired DeLong tests. Second, the LLM performance reported here reflects a prompt design that excludes supervised-analysis-derived information about the target, so that in-context learning must rely on pre-trained knowledge and the few-shot examples supplied at inference time; the three-way prompt ablation (
Section 5.11) quantifies the associated AUC differential (approximately
from neutral to SHAP-informed at the cost of a calibration bias toward over-prediction). Third, matched label-budget learning curves indicate that the LLM outperforms logistic regression across the label-scarce regime and outperforms gradient boosting at
, but is surpassed by both XGBoost and LightGBM from approximately
–80 onward.
All LLM configurations are miscalibrated (ECE 0.11–0.21 vs. ≈0.03 for ML) and over-predict default (mean predicted probability 0.28–0.38 vs. observed rate 0.17). Operational use therefore requires either post hoc calibration (Platt scaling or isotonic regression) or a validation-derived threshold above the naive cutoff. The LLM’s aggregate predictions are stable across independent runs ( in every configuration), which is a necessary but not sufficient condition for auditability in regulated environments; the borrower-level prediction-flip rate (12.7–17.9%) qualifies this stability.
The operational implication can be stated concisely. The LLM does not match the ML reference in raw discriminative performance, and its “few-shot advantage” holds only against a logistic regression baseline, or in the regime of fewer than approximately 40–80 labelled defaults. For institutions in the solidarity sector operating in that label-scarce regime, prompt-based classification offers an assessment option, provided that the deployment incorporates prompt-content auditing, probability calibration, threshold optimisation, and a formal fairness audit; none of these can be treated as automatic properties of the LLM. The primary LLM campaign of this study consumed USD 8.69 in API costs and, including validation re-runs, the total experimental footprint remained under USD 15.
The evidence reported here does not support treating LLM-based and ML-based credit classification as mutually exclusive alternatives, and it does not support the strongest form of the claim that LLMs can replace ML in credit scoring. The two approaches occupy complementary operating conditions: tuned gradient boosting remains the reference for institutions with the data, expertise, and infrastructure to deploy it; LLM-based classification, when audited and calibrated, extends credit modelling to institutions that cannot sustain a conventional pipeline. The contribution of this study is to characterise this trade-off on Colombian solidarity-sector data and to provide the audit, calibration, and matched-budget evaluation framework that subsequent work may extend as prompting techniques and language-model architectures develop.