(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon
Artificial Intelligence: Explainable scoring in production
Inteligência Artificial

Artificial Intelligence: Explainable scoring in production

João Barros 22/09/2026 9 min

“A model that does not explain decisions is a report nobody trusts — no matter how good its ROC‑AUC is.”

Why explainable scoring is critical for BI and decision making

In a business context, a score is rarely an end in itself — it is an operator in decisions: personalization, credit approval, contact routing, retention campaigns. If your business team does not understand why a customer received a 0.8 score instead of 0.4, the result is hesitation, distrust and, frequently, manual decisions that negate the model’s value.

Artificial Intelligence: Explainable scoring in production

Explainability is not just “good for compliance”; it is operational. When users understand the reasons behind a score, actions become measurable and repeatable: you can prioritize interventions, validate business hypotheses, investigate anomalies and reduce support costs. In real projects we supported, dashboards with explanations by segment reduced the average investigation time for model incidents by about 60% — for example, from 5 hours to 2 hours per incident — and increased the acceptance rate of recommendations by business users by ~20 percentage points.

Moreover, explanations allow identifying adversarial behavior and decoding bias: in credit scoring models, for example, systematic analysis of feature contributions revealed that a proxy (e.g., postal code) was introducing socioeconomic risk signal, leading to removal or reengineering of that variable and reducing the institution’s reputational risk.

Concrete requirements: latency, granularity and auditability

Before choosing a technique or architecture, define three measurable requirements. Latency: do you need explanations in real time (e.g. <150 ms per request) or are asynchronous explanations acceptable (e.g. computed in batch, available in minutes)? Granularity: is an explanation aggregated by features per segment sufficient, or do you need per‑feature contributions per user (e.g.: 20 features per record)? Auditability: what metadata is mandatory per scoring?

I recommend a minimum set of metadata per scoring record: model id and version (semantically versioned, e.g. v1.4.2), scoring id, UTC timestamp with timezone, hash of input data (SHA‑256), features used (reduced list or pointer to feature table), raw score, normalized score, explanations (feature contribution values or reference to file), and a scoring validity field (TTL). These elements enable audits, back‑analyses and reproducibility — crucial for business reporting and governance requirements.

Examples of concrete requirements: if you need latency <150 ms for 95% of requests, size the endpoint to meet p95 = 150 ms with estimated costs; if you need full explanations for 100% of cases, prepare for substantially higher CPU costs than in a scheme where only 10% of cases require explanation. Document these trade‑offs before building.

Practical architecture in Microsoft Fabric and Power BI

A robust architecture combines three layers: (1) processing and training in the Lakehouse/Notebooks; (2) scoring and explanation service (online or batch); (3) consumption and visualization in Power BI with semantic layers. In practice, we train models in Fabric Notebooks using compatible frameworks (e.g. scikit‑learn, XGBoost, LightGBM, PyTorch) and export artifacts in portable formats (ONNX for inference, MLflow artifacts for metadata). Artifacts are versioned in the Lakehouse/OneLake as parquet files/MLflow artifacts, with retention policies and access control.

For serving, there are two pragmatic options: an online endpoint (Azure Container Apps, Azure Kubernetes Service or Azure ML real‑time) for latencies <150 ms, or a batch scoring pipeline (Spark/Notebooks in Fabric) that produces explainability tables for integration in Power BI. For example, an ONNX endpoint with ONNX Runtime in containers can serve an XGBoost model on CPU with average latencies of 30–80 ms depending on the host (1–2 vCPU). A batch pipeline running on a Spark pool with 4–8 cores per worker can process 10M records in ~20–40 minutes, depending on preprocessing.

Explanations can be computed in real time using SHAP/TreeExplainer or by approximations: a practical approach is to compute full SHAP explanations for the top‑N events (e.g. 5% of scorings with the highest score) and generate segment explanations in batch for the rest. This balances freshness and cost: in our work, a hybrid architecture reduced compute costs by ~65% compared to a service that computed SHAP for every request in real time while keeping explanations for critical cases.

Applicable explainability techniques and how to integrate them

For tree models (XGBoost, LightGBM) or linear models, SHAP is a pragmatic choice: it provides additive values that sum to the score (or to the log‑odds, depending on specification), which facilitates generating explanatory phrases like “contributed +0.12 to the risk”. For neural networks, DeepSHAP or Integrated Gradients are options; LIME is useful for local explanations of complex models, but it is more costly and less stable across runs.

Another effective approach is to complement numerical explanations with rule‑based, human‑readable explanations: for example, rules such as “age <25 and purchases in the last 30 days >3” or “average cart value >€120 and returns = 0” explain cases directly. These rules can be kept in configuration files and executed in parallel with SHAP, serving both UI (messages to the customer) and priority scales.

Practical integration: to reduce CPU cost, we computed SHAP ex‑post for the top‑N users (by score) and stored distributions by segment. In high event‑rate scenarios, it is worthwhile to precompute normalized contributions by feature bucket (e.g. age in bins 18–24, 25–34, etc.) and apply an adjustment at serving: when a request arrives, map the feature value to the bucket and sum the stored contributions, combining with contributions computed in real time for dynamic features. This technique reduced CPU time per request by ~50–70% in tests with 1M requests.

Monitoring: essential metrics and drift detection pipelines

Monitoring model performance is basic — AUC, loss, accuracy by segment — but explanations also have their own metrics. We suggest tracking: stability of contributions (standard deviation of SHAP values per feature over time), frequency of influential features (median rank per period), and correlations between input drift and explanation drift. A sudden increase in the contribution of an unsuspected feature is often the first sign of behavior change or regression in the ingestion pipeline.

Build automated pipelines in Fabric that compute daily: (a) feature distributions (KS, PSI) with reference windows (e.g. 30 days vs training period), (b) average variation of SHAP values per feature (mean delta and 95th percentile), (c) number of scorings with missing explanations or outlier values (for example, SHAP values with magnitude > 5× median). Define actionable thresholds: for example, trigger an alert if PSI > 0.25 in a critical feature, if the absolute mean of a feature’s SHAP changes more than 0.1 compared to baseline, or if the rate of scorings with missing explanations exceeds 0.5%.

Alerts should point to playbooks: who is notified (data team, model owner, business owner), triage steps (re‑run scoring on a golden sample, check transformations), and mitigation actions (rollback version, block deployment). In clients where we implemented this, alerts anticipated three model regressions in production in the first 6 months, avoiding estimated losses of €120k and reducing service downtime by 72%.

Mini practical case: e‑commerce with 80 people — from prototype to operation

Context: e‑commerce company with 80 employees, 3 million sessions/month, 200k purchases/month and a data team of 5 people. Objective: a conversion scoring model used in remarketing campaigns, with explanations to justify personalized offers.

Decisions and concrete numbers: latency requirement was 200 ms for real‑time scoring; however, only 20% of cases needed immediate explanation (for example, when the score exceeds 0.75 or when the customer is VIP). We opted for a hybrid architecture: lightweight online scoring (model in ONNX served in a container with average latency of 60 ms) and two‑tier explainability. For scorings >0.75 we computed SHAP explanations in real time (p95 = 180‑220 ms extra), and for the rest we used batch segment explanations generated in Spark every 6 hours.

Implementation and costs: the ONNX endpoint ran in containers with 2 vCPU and 4 GB RAM; approximate cost per container (infra) was ~€0.09/hour, with auto‑scaling to 3 replicas during peaks. The batch pipeline used Spark pools sized to complete nightly jobs in 45 minutes, with average cost of €0.7/hour per worker. The incremental infrastructure cost was ~€1.1k/month, including storage of explanations in parquet and compute cost.

Results measured after 3 months: campaigns that included explanations in creative (e.g.: “You received this discount because you bought X and viewed Y”) increased the average conversion rate from 1.9% to 2.17% (a relative uplift of 14%), translating into an estimated additional monthly margin of €9k. Support requests related to campaign decisions fell 38%; campaign investigation time dropped from 8 hours/week to 3 hours/week for the marketing team. In productivity terms, the data team went from spending 50% of their time on manual investigation tasks to 15%, freeing ~1.5 FTE for new projects.

Operationalize and validate: tests, governance and documentation

Explanations introduce operational complexity: library dependencies, sensitivity to versions and reproducibility needs. We implemented automated tests that verify: score reproduction for a set of golden inputs (tolerance 1e‑6), consistency of explanation values for control inputs (change < 2% between identical runs), presence of metadata for each scoring record and schema validation (parquet, JSON). These tests run in Fabric pipelines before deployment of the model and the explanation pipeline.

In the governance layer document models, responsibilities and SLAs: who approves a new business threshold? Who responds to drift alerts? We recommend a model catalog and a versions table in the Lakehouse with model artifacts, code hash, validation metrics, input/output examples and the owner. A human‑machine validation process, where the business team validates explanations for 100 sampled cases per release, ensures alignment and continuous trust. Also include playbooks and contacts for audits and rollback processes.

Well‑designed explainability turns a black‑box model into a dialogue box between data and decision — that is where real value is created.

In summary

  • Define latency, granularity and auditability requirements before choosing technique and architecture.
  • Combine online serving with batch explanations to optimize cost and freshness of explanations; prioritize top‑N and critical cases.
  • Use SHAP/TreeExplainer for tree models; complement with simple explanatory rules for critical cases and customer messages.
  • Monitor feature distributions and explanation values; automate alerts with clear thresholds and playbooks for response.
  • Document versions, metadata and responsibilities — governance is as operational as it is technical.

Conclusion and next steps

Explainable scoring is a multidisciplinary project: modeling, data engineering, BI and business stakeholders must align. The good news is that, with the Microsoft Fabric and Power BI stack, you can build a pragmatic and scalable solution that balances cost, latency and trust. Start with a pilot focused on a high‑impact case (e.g. remarketing, fraud detection or credit approval), implement explanations for the top‑N cases and evolve to broader explanations according to adoption and measured ROI.

If you wish, we can design an 8‑week pilot: we define requirements, deliver architecture, a prototype of explanations and a monitoring dashboard. Is your organization ready to move from score to reason — and to trust the decisions it recommends?

← Back to insights
Let's talk?

Ready to transform your data?

Book a free 30-minute meeting and find out how we can help your team make better decisions.

Book a Free Meeting
bConcepts