Lesson 1
AI vs Machine Learning vs Deep Learning
Artificial Intelligence (AI), Machine Learning (ML), Deep Learning (DL) and Generative AI are best understood as nested circles: AI is the broadest field, ML is a subset of AI, DL is a subset of ML, and generative AI is built mainly on deep learning. Each inner layer depends less on hand-written rules and more on learning patterns from data. Knowing these differences helps you judge which technology fits a business or finance problem.
Artificial Intelligence (AI): The Big Umbrella
- Definition: AI is the field of building computer systems that perform tasks that normally need human intelligence, such as reasoning, learning, understanding language and making decisions.
- AI does not have to learn from data. Early AI used rule-based expert systems built on hand-written 'if-then' rules.
- Example: A rule-based loan screening system that rejects applications if income is below a fixed limit is AI but not ML.
- Narrow (weak) AI does one specific task, such as fraud alerts or chatbots. General AI (human-level across all tasks) is still theoretical.
Machine Learning (ML): Learning from Data
- Definition: ML is a subset of AI in which systems learn patterns from data and improve with experience, without being explicitly programmed for every rule.
- Basic flow: collect data → train a model → test or evaluate it → use it to predict on new data.
- Main types: supervised learning (labelled data, e.g. predicting loan default), unsupervised learning (unlabelled data, e.g. customer segmentation) and reinforcement learning (learning through rewards and penalties, e.g. trading strategy agents).
- Classical ML often needs humans to choose the input features, such as income, age or credit history.
Deep Learning (DL): Multi-Layered Neural Networks
- Definition: DL is a subset of ML that uses artificial neural networks with many layers ('deep') to learn complex patterns.
- DL can learn features automatically from raw data such as images, audio and text, so less manual feature engineering is needed.
- DL usually needs large amounts of data and high computing power, often GPUs.
- Examples: reading cheques with image recognition, speech-to-text in banking apps and detecting complex fraud patterns.
- Limitation: DL models are often 'black boxes' that are hard to explain. This matters in regulated areas like credit decisions.
Generative AI: Creating New Content
- Definition: Generative AI refers to deep learning models that create new content, such as text, images, code or audio, based on patterns learned from training data.
- Foundation models and Large Language Models (LLMs) are trained on huge datasets and can be adapted to many tasks.
- Earlier ML was mostly predictive or discriminative (classify or forecast). Generative AI produces new outputs.
- Finance examples: drafting reports, summarising annual reports and answering customer queries through chatbots.
- Risks: it can 'hallucinate' (confidently produce wrong facts), so its outputs need human checking.
Comparing the Nested Layers
- Hierarchy: AI ⊃ ML ⊃ DL ⊃ Generative AI (largely). Every DL system is ML, and every ML system is AI, but not the reverse.
- Moving inward: less hand-coded rules, more data needed, more computing power needed, and usually less explainability.
- Choose the simplest tool that works: rules for clear policies, ML for structured data predictions, DL for unstructured data like images and text.
Lesson 2
Supervised vs Unsupervised Learning
Machine learning systems learn patterns from data, and the two main ways they learn are supervised and unsupervised learning. Supervised learning trains on labelled data (inputs with known correct answers) to predict outcomes, while unsupervised learning works on unlabelled data to discover hidden groups or structures. Knowing the difference helps you pick the right approach for business and finance problems such as loan approval, fraud detection and customer segmentation.
Supervised Learning
- Definition: the model learns from labelled data, where each input (features) comes with the correct output (label).
- It works like a student learning with a teacher: the model's predictions are checked against known answers and errors are corrected during training.
- Steps: collect labelled data, split it into training and test sets, train the model, evaluate its accuracy, then predict on new data.
- Real-life example: a bank trains a model on past loan applications marked 'repaid' or 'defaulted' so it can predict whether a new applicant is likely to default.
- Goal: learn a mapping from input X to output Y, so that Y can be predicted for unseen X.
Types of Supervised Learning
- Classification: the output is a category, e.g. email is 'spam' or 'not spam', or a transaction is 'fraud' or 'genuine'.
- Regression: the output is a continuous number, e.g. predicting a house price, next month's sales or a company's revenue.
- Common algorithms: linear regression, logistic regression, decision trees, support vector machines (SVM), k-nearest neighbours (KNN).
- Simple linear regression formula: Y = a + bX, where Y = predicted value, X = input variable, a = intercept (value of Y when X is 0), b = slope (change in Y for a one-unit change in X).
Unsupervised Learning
- Definition: the model learns from unlabelled data, with no correct answers given, and finds patterns or structure on its own.
- It is like learning without a teacher: the algorithm groups or organises data based on similarities and differences.
- Real-life example: an e-commerce or retail company groups customers by purchase behaviour (frequency, spend, product types) to design targeted offers, without knowing the groups in advance.
- Main tasks: clustering (grouping similar items, e.g. K-means), association (finding items that occur together, e.g. market basket analysis using the Apriori algorithm), and dimensionality reduction (e.g. PCA).
- Finance use: spotting unusual transactions that do not fit normal patterns (anomaly detection) to flag possible fraud.
Supervised vs Unsupervised: Direct Comparison
- Data: supervised uses labelled data; unsupervised uses unlabelled data.
- Aim: supervised predicts a known type of outcome; unsupervised discovers hidden patterns or groups.
- Evaluation: supervised accuracy can be measured directly against true labels; unsupervised results are harder to measure because there is no correct answer.
- Effort and cost: supervised needs time and money to label data; unsupervised can use raw data but its results need human interpretation.
- Typical tasks: supervised means classification and regression; unsupervised means clustering, association and dimensionality reduction.
Key terms
- Labelled data
- Data where each example includes the correct output or answer, such as a transaction marked 'fraud' or 'genuine'.
- Feature
- An input variable used by a model, such as income, age or transaction amount.
- Classification
- A supervised task that predicts a category or class.
- Regression
- A supervised task that predicts a continuous numerical value.
- Clustering
- An unsupervised task that groups similar data points together without predefined labels.
- Association rule learning
- An unsupervised method that finds items or events that frequently occur together, as in market basket analysis.
- Training and test data
- Training data is used to teach the model; test data is held back to check how well it performs on unseen cases.
- Anomaly detection
- Identifying data points that differ greatly from normal patterns, often used to flag possible fraud.
Lesson 3
Generative AI and Its Use Cases in Finance
Generative AI creates new content such as text, images, code and synthetic data by learning patterns from large datasets. In finance it supports customer service, research, reporting, fraud detection, risk modelling and compliance, but outputs need human oversight because they can be wrong.
What Generative AI Is
- A branch of AI that produces new content, unlike traditional AI that mainly classifies or predicts.
- Built on foundation models trained on huge datasets, e.g. large language models (LLMs) built on the transformer architecture.
- Outputs are probabilistic: the model predicts likely next tokens, so answers can sound fluent and still be wrong (hallucinations).
Use Cases in Finance
- Customer service: chatbots and virtual assistants that answer account and product questions.
- Research and analysis: summarising earnings calls, filings and news, and drafting investment reports.
- Fraud detection and risk: generating synthetic data to train models and simulating stress scenarios.
- Compliance: reviewing contracts and regulations, and drafting regulatory documents.
- Personalisation: tailored financial advice and marketing content.
- Software development: generating and documenting code for financial systems.
Limitations and Risks
- Hallucinations and factual errors.
- Data privacy and confidentiality of client data.
- Bias inherited from training data.
- Regulatory requirements for explainability and auditability.
Key terms
- Generative AI
- AI that creates new content (text, images, code, data) based on patterns learned from training data.
- Large Language Model (LLM)
- A model trained on massive text corpora to understand and generate human language.
- Hallucination
- Confident but false or fabricated output from a generative model.
- Synthetic data
- Artificially generated data that mimics real data, used for model training or testing while protecting privacy.
Lesson 4
AI Ethics Basics
AI ethics is the set of principles that guide the responsible design and use of AI. Core principles are fairness, transparency, accountability, privacy, safety and human oversight, and they matter most in high-stakes areas such as lending.
Core Principles
- Fairness: avoid discriminatory outcomes across groups.
- Transparency and explainability: people should be able to understand how decisions are made.
- Accountability: humans and organisations stay responsible for AI outcomes.
- Privacy: protect personal data and obtain consent.
- Safety and robustness: systems behave reliably and resist misuse.
- Human oversight: keep a human in the loop for consequential decisions.
Common Ethical Risks
- Algorithmic bias from skewed or historical training data.
- Black-box models that cannot justify their decisions, such as loan denials.
- Misuse, including deepfakes and misinformation.
- Privacy breaches and surveillance.
Mitigation Practices
- Use diverse, representative data and run bias audits.
- Use explainable AI techniques and document models.
- Run governance frameworks and impact assessments.
- Comply with regulation such as GDPR and the EU AI Act.
Key terms
- AI ethics
- Principles and practices for developing and using AI responsibly.
- Algorithmic bias
- Systematic unfair outcomes produced by an AI system, often inherited from its data.
- Explainability
- The ability to understand and communicate why a model produced a given output.
- Human-in-the-loop
- A design in which people review or approve AI decisions.
Lesson 5
Generative AI Tools and Prompt Engineering
Generative AI tools such as ChatGPT, Claude, Gemini, Copilot and image generators produce content from prompts. Prompt engineering is the skill of writing clear, structured instructions with context, role, format and examples to get accurate and useful outputs.
Generative AI Tools
- Text and chat: ChatGPT, Claude, Gemini, Microsoft Copilot.
- Images: DALL-E, Midjourney, Stable Diffusion.
- Code: GitHub Copilot.
- Tools are often built into office software for drafting, summarising and analysis.
Elements of a Good Prompt
- Role: e.g. 'Act as a financial analyst.'
- Task: a clear, specific instruction.
- Context: relevant background or data.
- Format: the desired output structure, e.g. a table, bullets or a word limit.
- Constraints and tone: audience, style and what to avoid.
Prompting Techniques
- Zero-shot: give the instruction with no examples.
- Few-shot: include examples of the desired input and output.
- Chain-of-thought: ask the model to reason step by step.
- Iterate: refine the prompt based on the output.
- Verify facts, and never paste confidential data into public tools.
Key terms
- Prompt
- The input instruction or question given to a generative AI model.
- Prompt engineering
- Designing and refining prompts to get better model outputs.
- Few-shot prompting
- Including a few examples in the prompt to guide the output.
- Chain-of-thought
- Prompting the model to reason step by step before answering.
Lesson 6
How Recommendation Engines Work
Recommendation engines are AI systems that predict which items a user is likely to want, based on past behaviour, item features and the preferences of similar users. The main approaches are collaborative filtering, content-based filtering and hybrid systems, and each has its own strengths and its own problems, such as the cold-start problem.
What recommendation engines do
- Predict a user's interest in items such as products, videos, songs or articles.
- Used by Netflix, YouTube, Amazon, Spotify and social media feeds.
- Learn from data: clicks, ratings, purchases, watch time and searches.
- Aim to increase engagement, sales and user satisfaction.
Main approaches
- Collaborative filtering: recommends what similar users liked (user-based) or items often liked together (item-based).
- Content-based filtering: recommends items with features similar to items the user already liked, such as the same genre or keywords.
- Hybrid systems: combine both approaches to improve accuracy.
- Modern systems often use machine learning or deep learning to rank candidate items.
Data and feedback
- Explicit feedback: ratings, likes and reviews.
- Implicit feedback: clicks, viewing time and purchases.
- Recommendations improve as the system collects more interaction data.
Challenges
- Cold start: new users or new items have little data to learn from.
- Filter bubbles: users keep seeing similar content, which narrows their exposure.
- Privacy concerns about collecting personal behaviour data.
- Popularity bias: popular items get recommended even more.
Key terms
- Recommendation engine
- An AI system that suggests items a user is likely to want.
- Collaborative filtering
- Recommending items based on the preferences of similar users or co-liked items.
- Content-based filtering
- Recommending items whose features match items the user already liked.
- Hybrid system
- A recommender that combines collaborative and content-based methods.
- Cold-start problem
- Difficulty recommending for new users or items that have little data.
- Filter bubble
- Narrowed exposure caused by repeatedly recommending similar content.
Lesson 7
Ethics of Using Generative AI
Using generative AI responsibly means paying attention to bias, accuracy, privacy, intellectual property, transparency and accountability. Users should verify AI outputs, protect sensitive data, disclose AI use where it matters and keep humans responsible for decisions.
Bias and fairness
- Models learn from human data and can reproduce stereotypes and biases.
- Outputs should be reviewed for unfair or discriminatory content.
- Diverse data and testing help reduce bias.
Accuracy and misinformation
- Generative AI can 'hallucinate': it can produce confident but false information.
- Verify facts, citations and figures before using them.
- Deepfakes and synthetic media can be used to deceive.
Privacy and intellectual property
- Do not enter confidential or personal data into public AI tools.
- Training data and outputs raise copyright and ownership questions.
- Respect creators' rights and organisational policies.
Transparency and accountability
- Disclose AI use where appropriate, for example in academic or professional work.
- Humans remain accountable for decisions and published content.
- Keep human oversight (human-in-the-loop) for high-stakes uses.
- Consider the wider impacts: jobs, environmental cost and misuse.
Key terms
- AI ethics
- Principles that guide fair, safe and responsible development and use of AI.
- Algorithmic bias
- Systematically unfair outputs that come from biased data or design.
- Hallucination
- An AI output that sounds plausible but is false or made up.
- Deepfake
- Realistic synthetic media that falsely depicts people or events.
- Transparency
- Being open about when and how AI is used.
- Human-in-the-loop
- Keeping human review and control over AI-assisted decisions.
