You don't need to be a mathematician to lead AI product development — but six concepts will give you genuine intuition for what models actually do, why they fail, and what the numbers mean. Each module takes 15–25 minutes.
Every AI model is, at its core, a machine for making predictions under uncertainty. To use one well, you need a working understanding of what probability actually is — not the formula, but the concept.
Probability is a number between 0 and 1 that describes how likely something is. A probability of 0 means impossible. A probability of 1 means certain. A probability of 0.7 means "if you ran this situation 100 times, you'd expect this outcome about 70 times."
Crucially, probability is about your state of knowledge, not about some fixed property of the world. Two people with different information about the same borrower might assign different probabilities to default — and both can be rational.
When an LLM generates a response, it doesn't "know" the answer and retrieve it. At every position in the output, it assigns a probability to every possible next word (token), then samples from those probabilities. That's why the same prompt can produce different outputs each time — and why asking a model to "be certain" doesn't make it so.
A credit model outputs P(default) = 0.08 for a borrower. This doesn't mean "this borrower will definitely repay" — it means "based on all the patterns in our training data, borrowers with this profile default about 8% of the time." Out of 1,000 such borrowers, roughly 80 will default. The model cannot tell you which 80.
Conditional probability is the probability of something happening given that something else is already true. Written as P(A | B) — "probability of A, given B."
Before seeing a mobile money statement, you might estimate P(default) = 0.15 for a new applicant. Then you see the statement shows consistent salary deposits for 24 months and a growing savings balance. You update: P(default | 24 months regular income) = 0.04.
That updating process — starting with a prior belief, seeing evidence, arriving at an updated belief — is what Bayesian thinking is. Every machine learning model is doing a version of this, just with millions of examples instead of one.
Drag the threshold to see how changing the cutoff affects approved loans, expected defaults, and expected good loans. This is the core tradeoff in every credit AI system.
A credit model outputs a default probability of 0.22 for an applicant. Your approval threshold is 0.20 (decline anyone above this). What happens?
A distribution describes how often different values occur. Understanding distributions is essential for understanding what a model learned, what data it expects, and why it degrades when the world changes.
The bell curve. Values cluster around a mean (average), and get rarer as you move further away. Described by two numbers: the mean (where the centre is) and the standard deviation (how spread out the bell is). About 68% of values fall within 1 standard deviation of the mean; 95% within 2.
Many real-world measurements approximate a normal distribution: loan amounts, income levels, transaction counts. Machine learning models often assume their training data looks roughly normal — if your production data has a different shape, performance degrades.
Adjust mean and spread to see how a distribution changes. Think of this as "monthly income distribution of loan applicants."
A model trained on data from one distribution will struggle when production data comes from a different distribution. This is called distribution shift or drift. It's the single most common cause of AI model degradation in the field.
Blue = training data distribution. Orange = what production data looks like now. When they diverge, the model is operating outside what it learned. Slide to simulate an economic shock.
PSI measures how much a distribution has shifted from a reference baseline. In credit: if the income distribution of your applicants today looks materially different from when you trained your model, PSI will be high. A PSI under 0.1 means stable. 0.1–0.2 means monitor. Above 0.2 means the model likely needs retraining. PSI is just a formula that quantifies the area between two distributions — you don't need to compute it by hand, but knowing what it measures tells you when to trust the alert.
When an LLM generates the next token, it produces a probability distribution over the entire vocabulary. Temperature is a parameter that reshapes that distribution before sampling.
The model is choosing the next word after "The applicant's income is..." The bars show the probability assigned to each possible next token. Temperature reshapes the distribution.
An embedding is a list of numbers that represents the meaning of something — a word, a sentence, a loan application, a customer profile. The reason AI systems can find semantically similar documents (not just keyword matches) is that similar meanings produce similar number-lists, and "similar number-lists" is something we can compute precisely.
A vector is simply a list of numbers. In 2D: [3, 4]. In 3D: [1, 0, 7]. Embedding models produce vectors with hundreds or thousands of dimensions — but the intuition is the same as 2D. Each dimension captures some aspect of meaning.
Think of it this way: if you described a loan applicant using just two numbers — "income stability" (0–10) and "repayment history" (0–10) — you could plot them on a graph. Applicants with similar profiles would cluster together. That's all an embedding is doing, but with 1,536 dimensions instead of 2.
Each dot represents a concept embedded in a simplified 2D space. Similar concepts cluster together. Click a concept to see which others are closest to it (highest similarity).
If two vectors point in the same direction, they are similar. If they point in perpendicular directions, they are unrelated. If they point in opposite directions, they are antonyms. Cosine similarity measures the angle between two vectors — returning a number from -1 (opposite) to 1 (identical).
When you build a RAG system over your lending policy documents, a loan officer types: "What happens if a borrower misses two payments?" The system embeds that query and finds the policy chunks whose embeddings are closest — which will include the "payment arrears" section, the "restructuring policy" section, and the "collections procedure" — even if none of those contain the exact words "misses two payments." That's semantic search: finding by meaning, not by keyword.
Drag the sliders to set two 2D vectors. Watch the angle between them and the similarity score update.
The single most important skill in AI product leadership is knowing how to ask "how good is this model?" in a way that maps to business outcomes — not just technical metrics. Different metrics measure different things, and optimising for the wrong one produces models that look good in presentations and fail in production.
Every binary prediction (default / not-default, fraud / legitimate, approve / decline) produces four possible outcomes:
| Model predicted | |||
|---|---|---|---|
| Repaid (Negative) | Defaulted (Positive) | ||
| Actual | Repaid | True Negative (TN) Correctly declined a good borrower? Wait — no. Correctly identified a repayer. |
False Positive (FP) Predicted default, but they repaid. A missed opportunity. |
| Defaulted | False Negative (FN) Predicted repayment, but they defaulted. A bad loan. |
True Positive (TP) Correctly predicted default. Avoided a bad loan. |
|
Accuracy = (TP + TN) / total. The percentage of all predictions that were correct. Misleading when classes are imbalanced — a model that says "everyone repays" is 92% accurate if 92% of borrowers repay.
Precision = TP / (TP + FP). Of all the defaults the model predicted, what fraction actually defaulted? High precision = when the model flags a default, it's usually right.
Recall = TP / (TP + FN). Of all the actual defaults, what fraction did the model catch? High recall = the model misses few actual defaults.
AUC (Area Under the ROC Curve) = a single number (0–1) measuring the model's ability to distinguish between the two classes regardless of threshold. 0.5 = no better than random. 0.9 = excellent. This is the standard summary metric for credit models.
Move the decision threshold to see how precision and recall change. Notice that improving one comes at the cost of the other. Which matters more depends on your business — bad loans vs. missed good customers.
A colleague shows you a model with 94% accuracy. Before celebrating, ask: what is the base rate of default in your portfolio? If it's 5%, a model that approves everyone has 95% accuracy. Your colleague's model may be worse than doing nothing. The right question is: what is the AUC? And then: at the threshold you'd actually use in production, what is the precision and recall, and what do those translate to in KES of bad debt avoided vs. good loans lost?
A model with good overall AUC can still be biased if it performs significantly worse on a subgroup. This requires computing the same metrics separately for different groups.
Statistical thinking is the discipline of asking "how much data do I need before I can trust this result?" and "how wide is the range of outcomes that are consistent with what I've observed?" These questions come up constantly in AI product development: evaluating model performance, interpreting A/B tests, deciding whether a model is degrading.
The average of many observations tends to the true mean as sample size increases. With 10 coin flips, you might see 8 heads — that doesn't mean the coin is biased. With 10,000 flips, if you see 8,000 heads, the coin is almost certainly biased.
In AI evaluation: measuring model accuracy on 20 test examples tells you almost nothing. Measuring on 1,000 examples gives you a reliable estimate. The larger the sample, the narrower the range of uncertainty around your estimate.
A confidence interval (CI) is a range that, with high probability, contains the true value you're trying to measure. "The model's accuracy is 87% ± 3%" (at 95% confidence) means: if you ran this evaluation many times, 95% of the intervals produced would contain the true accuracy.
The width of a CI depends on sample size. Smaller sample = wider interval = more uncertainty. An evaluation on 50 examples might give you "accuracy = 84%, 95% CI: 72%–92%". That range is so wide that 84% is almost meaningless — the true accuracy could be anywhere in that range.
You've observed that your model correctly classifies X% of test cases. How wide is your confidence interval? Slide to change sample size and see how certainty changes.
Machine learning models find correlations in data. They cannot, on their own, tell you whether those correlations reflect causation. This distinction matters enormously in credit:
A model discovers that applicants who apply for loans on Sunday mornings have 40% lower default rates. This is a correlation. The causal story might be: people with stable employment and regular weekend routines apply on Sunday mornings; it's the employment stability that predicts repayment, not the time of application. If you deploy a policy that gives preferential rates to Sunday morning applicants, you're acting on a spurious correlation that will break as soon as application patterns change.
AI product economics requires building a simple cost model before you commit to a technical approach. The math involved is straightforward arithmetic — but the failure to do it at all, before deployment, is one of the most common causes of "we built the wrong thing" discoveries at scale.
LLM providers charge per token. A token is roughly 3–4 characters or 0.75 words in English — African languages typically use more tokens per word because of morphological richness. Frontier models charge separately for input tokens (your prompt) and output tokens (the model's response). Input is usually cheaper.
The cost of a single API call = (input tokens × input price) + (output tokens × output price).
Estimate monthly AI costs for your use case. Adjust parameters to see how volume and prompt length drive costs.
Adjust revenue lift and cost per application to find your break-even point and payback period.
| Concept | What it is | Why it matters for AI product leaders | Key session |
|---|---|---|---|
| Probability | A number 0–1 describing how likely something is | LLM outputs are probability distributions, not facts. Confidence ≠ correctness. | S2 |
| Conditional probability | P(A | B) — likelihood of A given B is already true | How models update beliefs given evidence; foundation of all credit scoring | S2, S3 |
| Distribution | How often different values occur in a dataset | Models learn the training distribution. When production data shifts, performance degrades. | S2, S8 |
| Mean & std deviation | Centre and spread of a distribution | Describes your data; alerts you when it changes (drift monitoring) | S3, S8 |
| Temperature | A parameter that sharpens or flattens an LLM's output distribution | Low temp = deterministic. High temp = creative but inconsistent. Use low temp in production. | S2 |
| Vector | A list of numbers representing a point in multi-dimensional space | Embeddings are vectors. Meaning is distance in vector space. | S2, S5 |
| Cosine similarity | Measures the angle between two vectors (0=unrelated, 1=identical) | How semantic search finds relevant documents. The math behind RAG retrieval. | S2, S5 |
| Confusion matrix | TP/TN/FP/FN breakdown of a classifier's errors | Reveals what kind of mistakes a model makes. Essential for evaluating credit models. | S3, S4 |
| Precision vs. recall | Precision: are flagged positives right? Recall: are all positives caught? | Choosing which to optimise is a business decision, not a technical one | S3, S4 |
| AUC | Summary metric for a classifier (0.5=random, 1.0=perfect) | Standard credit model quality metric. Should always be supplemented with disaggregated eval. | S4, S8 |
| Confidence interval | Range that likely contains the true value of a metric | Tells you how much to trust an evaluation result. Small samples = wide intervals = unreliable. | S3, S4 |
| Distribution shift / drift | When production input distributions diverge from training distributions | The most common cause of model degradation. PSI quantifies it. | S8 |
| Unit economics | Revenue and cost attributable to a single unit of the product | The economic viability of an AI feature. Must be modelled before committing to architecture. | S4, S9 |
| Token cost | LLM API charge per token processed | The marginal cost of AI inference. Scales linearly with volume. | S4 |