Retail Banking Institute Logo
Lafferty Group
Certified International Retail Banker Certificate

Artificial Intelligence

Key Concepts in AI

Machine Learning

Machine Learning is the field of Artificial Intelligence that studies and develops algorithms and models capable of learning patterns from data. Unlike traditional programs, which are coded to do specific tasks, machine learning codes and algorithms can learn and improve the output by themselves, based on the “experience”, meaning that new patterns found are considered as part of a new solution.

Such new patterns are a combination of existing answers plus the same database that has been enriched and improved over time. All these new data points along with the previous base are considered in the process of establishing the new best and most suitable answer or solution.

Instead of following specific commands, the algorithms of machine learning use statistical methods that enable the system to improve its performance in a specific task as it is exposed to more data. These systems can identify patterns, provide solutions, make predictions, and make decisions without direct human intervention.

The machine learns as time passes. It is like learning to swim and growing from experience. Or you could reflect that when in school, as you had access to more data, or got information from your teacher, you knew more about a particular subject. In this way, you were able to provide better answers as your knowledge grew.

Machine learning has an important role in digital development as an important tool and segment of AI. It can help the speed of innovation, enabling important advances in many sectors and contributing to solving complex problems faster, and in a more efficient and personalized manner.

Types of Machine Learning

Supervised – using the analogy of the school, humans play the role of a schoolteacher guiding the learning process, providing the topics to be learned, and controlling the outcomes. This ensures that the learning is in the expected direction and provides the expected results. As the system learns and provides expected solutions, more data is fed into the system, always ensuring through supervision that the outcome will be within the expected range. Any deviation will require adjustments in the algorithm.

Supervised Machine Learning has many uses, such as in fraud prevention, analysis of spam emails, or any solution where the outcome will alter when we have changes in variables that define a particular scenario, like predicting pricing, weather, and helping with health diagnosis.

We work with the system to define which data will be used to look into patterns and provide the best solution. The conclusions are brought back to the model and new data can be added or excluded depending on its relevance as the system learns. That is how supervised machine learning can identify spam emails or predict if a certain prospect will buy or not buy the product, comparing the data and the patterns of previous prospects that made the purchase. All are based on the available data. In the same way, supervised AI can recognise faces, recognise characters, and answer prompts, and predict outcomes, such as when helping in medical diagnosis or fraud detection.

Programmers work with algorithms and mathematical and statistical models, using the data available to come up with the expected solutions.

Unsupervised – here we provide the system with data and give it a problem, asking it to look for patterns without a pre-defined weight or list of variables. The system will establish patterns by itself. It will group data points based on different reasons, which are not necessarily expected by who has given it the problem to solve.

We will be learning by observation, so we provide the system with data and let it look for common patterns on its own. The system will group data based on its own analysis. For example, when providing customer data, the system will define by which data, weight and sequence it will sort the customer. These may be by age, height, income, etc, probably coming out with a totally different segmentation than previously executed or expected.

This type of machine learning is used also to discover unpredicted anomalies in processes and systems. It can find something unusual in the expected pattern, thus uncovering a new pattern that isn’t necessarily the right or expected one, that may demand correction or preventive actions in the future. Or this could become the norm, proving to be a more effective method. We learn from the patterns found and presented as the solution.

Unsupervised machine learning is an exploratory way to visualise data, enabling companies to identify patterns in a large amount of data in a faster way than supervised machine learning.

Some of the applications are:

News – when looking to gather information from various sources, the label (title- subject) can be a generic one, such as the name of an event, all the news in the various news agencies will pop up, providing different views and approaches.

Visual recognition – unsupervised algorithms are used to enable the system to recognise objects, providing the machine with visual perception.

Medical Image analysis – it provides the capability to the system to detect, classify and segment medical images, helping with image diagnostics.

Search for anomalies – it enables the search of a great quantity of data and discovery of atypical data points in a dataset. Such anomalies can help to understand faster why some equipment is malfunctioning, or why we have a human error or a security breach.

Define customer segmentation, create customer personas – it can be used on top of the supervised segmentation effort, where it will find new patterns, enriching the understanding of customers and personas. It may help improve communication, loyalty and sales strike rates.

Improve cross sales – it can help to find trends in the dataset that can be used to develop cross-selling and up-selling strategies.

Unsupervised Machine Learning does have some challenges when compared to supervised one.

  • It normally requires a larger amount of data and as a consequence, a larger computer processing capacity.
  • The learning takes longer.
  • There’s a higher risk of wrong results and hallucinations
  • It requires human intervention to check every output

There is a lack of transparency on how the data was grouped to look for patterns. An example is the algorithm in Instagram, as no one clearly understands how it works!

Reinforcement Learning – this is like trial and error, where we allow the algorithm to provide unsupervised output, and every time the answer is right, it is reinforced and goes back to the model.

This builds a series of “right” answers, like a library of right outcomes. It is used when all the possible scenarios cannot be predicted.

It is used to optimise processes, create autonomous systems and make assertive decisions, like when we train a program to drive a car. It is also used in games, such as chess simulators. In summary, it enables computers to learn.

Reinforcement learning is what is enabling the advances we are witnessing lately.

Examples of Companies and Banks using Machine Learning

J.P.Morgan – Project Innovation in Latin America with Big Data. The Clearing team and the Data & Analytics team evaluated the main financial institutions in Latin America and used dashboards of data powered by Artificial Intelligence to improve and optimise international payments, reducing the transaction time and improve client experience.

The project has:

  • Reduced the operational costs, with lower commission costs and charges from the American Central Bank – FED.
  • Improved payments security, with an increase in the percentage of payments completed.
  • Decreased the time and cost of payment reconciliations.

Google – uses machine learning to improve the response and accuracy of the response of various of its products, like Google Maps, which can find places and provide information and the best routes for various means of transport. Google Translation is improving day by day the quality of the translation offered and Google Search remains the most used search engine in the world. (It is now offering AI overviews.)

Bank of America – created Erica, a virtual assistant. By leveraging human-like interfaces and predictive analytics, Erica acts as a financial advisor for more than 45 million customers. Integrating Erica into the mobile phone service makes the life of customers easier when seeking support or clarification in routine transactions and common doubts. This frees human resources at the call centres to deal with more complex issues, improving customer service. Notably, Bank of America built Erica in-house, while most banks rely on white-labelled third-party solutions.

First National Bank, South Africa – the bank uses machine learning to identify patterns of behaviour indicative of fraud. If the system detects such a pattern, or activity, it triggers an alert to the fraud team, which will investigate further.

Salesforce offers an SaaS (Software as a Service) to improve Sales through the CRM solution SalesCloud, which is aimed at managing the customer’s relationship. Using machine learning to look at patterns to drive segmentation, this tool helps to segment customers and define the most appropriate action with each customer. Its “Einstein” system uses machine learning to analyse and process vast amounts of data, where the client sets the data points and problems. It promises that it can provide new ideas, predict results and obtain recommendations from this machine learning driven platform.

Netflix – the suggestion process in Netflix is driven by machine learning, based on previous views and customers with similar behaviour when using the platform. For new customers, suggestions are based on existing customers with similar profiles.

Neural Networks

Neural Networks are computational systems that were inspired by how the human brain works. They are used to rapidly solve complex problems. Traditional computers process data based on a sequential set of rules, analysing each data point before moving to the next.

Neural Networks process and analyse different sets of data at the same time. They assign different weights to each data point and process the sets simultaneously. These multiple results are put together and analysed based on the weight of each, to generate a solution.

So, how does it work?

Each neural network is built with basic nodes or neurons, which mimic or simulate actual human neurons. These neurons receive inputs, process them and generate an output.

The neurons are organised in layers, called processing layers.

  • An input layer that receives the data, image or numbers.
  • Hidden layers where the processing of data happens.
  • Output Layers where all the processing is placed together and generates a solution or answer based on the rules (weights) of each result. An example is the goal of identifying (or not) an image in a picture. Each neuron in the hidden layer processes one aspect or datapoint to define if the image represents what it should.

In the process of weight and adjustments, each connection between the neurons has a weight related to the components (information) that are used in the decision process, with this “weight” based on the importance of each component. By adjusting the weights, the output, solution and answer process can become more precise over time.

The neural network learns by comparing its output and the answers generated with what is the right one. A process called “backpropagation” adjusts the weight to reduce errors. The final result is that after being trained, a neural network can identify images, recognise the face of an individual, or predict the price of an asset (for example, a stock) based on the patterns it has learned.

A good way to picture the neural network is as if it is a box. Inside the “box” there are several little helpers, each doing one part of the task. At the end of the work, they combine each task performed, taking into consideration the importance of each task, to generate a final answer.

Ai Image 5

Large Language Models (LLM)

LLMs are AI models that are built to enable computers to understand large amounts of text and data, and understand and answer human language, both written and spoken. It is like teaching the machine to listen and to talk, or to understand what humans say and then generate human-like answers.

The model is trained in large volumes of data, normally sourced from the internet, looking for patterns in how words and phrases are placed together. When patterns are learned, the model can predict the next most common or used word in a phrase or context (subject).

So, how does an LLM work? First, it captures the “language”, which can be presented in a text or in audio files. After capturing the material, it will perform a pre-processing of the data, so that it will split the “language” (audio or text) into small parts, such as words or phrases. It analyses each word and its position in the phrase and compares this with previously analysed patterns. So, a phrase like, “My name is John”, is seen as “My”, “name”, “is”, “John”. In the next step it will eliminate what is called “the noise”, which are elements considered nonrelevant for understanding, such as punctuation and common words.

Finally it will bring the words to their basic format, so “analysing”, becomes “analyse”. Such exercises are called Stemming and Lemmatisation, and both have the objective to reduce words to their basic forms, helping in simplifying the analysis of text by grouping different forms of a word into a common base form.

For the next step the system will understand the meaning of the text or audio. It will do it through a grammatical analysis (of how the words are related), the context of the word in the phrase, and by recognising the names of “entities” or things, such as places, people, and dates.

Understanding of the text or audio will then lead to an output of the system, such as answering a question, performing a translation, etc. Here the concept of Machine Learning we studied earlier in the module is very important as it enables the model to improve the quality of outputs over time.

LLMs have existed for some time, but became famous after Chat GPT 3 was launched in 2020. ChatGPT 3 increased the parameters available covering a wider range of output and human-like responses. For comparison, GPT 2 had 1.5 billion parameters, while GPT 3 had 175 billion parameters. ChatGPT 4 brought learning beyond text, as it learns from images, increased again the number of parameters and is constantly adding new data. It has 170 trillion parameters.

GPT brought AI to the average person, and the name incorporates important aspects of AI.

G – meaning the capacity to generate human-like texts
P – pretrained in a large number of data
T – for transformer, an architecture that challenged the logic of LLM.

Instead of just looking for the order of words in a sentence, it looks at the overall relationship of words in a sentence. Despite all the advances and everything we have learned so far which is called Artificial Intelligence, there is no intelligence in it, at least not in the narrow AI that currently exists. Tools like GPT have access to large amounts of data, and with an impressive capacity to look into patterns within this data, aiming at solutions for questions and problems. But they have no “common sense”, or idea of the quality of the output, and human intervention is still needed. However, most ChatGPTs and competitors will not give an ‘I don’t know’ answer, but will deliver the information (even if wrong) in an authoritative manner, causing many people to believe it is accurate.

LLMs have other applications beyond tools like GPT, as we can experience it in Virtual Assistants like Alexa and Siri, and in translation services apps. It is used in social media to measure tendencies and reactions, and also in chatbots for customer services.

Prompts

We were talking in the last section about LLMs. There is a very important tool that one has to understand and know how to use to maximise the use of LLMs, which is the “Prompt”. Prompts are instructions, questions or phrases provided to a system to look for an answer or specific action, like an analysis, decision, or suggestion. When we are interacting with an LLM, like GPT, Llama from Meta or Gemini from Google, the prompt is the question or command that you provide to the model looking for a specific output.

So, when you ask the GPT or LLama “What is the most populous city in Africa?”, the question is the prompt. You expect the model will answer something like, “Lagos, in Nigeria, is the most populous city in Africa”. The prompts are the triggers that enable the model or the system, to understand what the user wants.

For example, a prompt saying “Create an image of a piece of broccoli on a plate” might deliver a decent image. A professional image editor might prompt “You are a camera operator. Create an image of a piece of broccoli on a plate using an F11 aperture with a 1/15s shutter speed on an Arriflex IIC 35-mm film camera,” and you get a far better image. (This is where domain knowledge is important.)

Prompts are the basis for interactions with AI technology, translated in virtual assistants, chatbots and LLMs. It is important to understand how to build a good prompt, as it increases the probability of a more precise and relevant answer from the system.

It is important to remember how AI works in order to use prompts well. The systems are trained in large quantity of data, using mathematics and statistical models to seek patterns and correlations. The system has no idea or consciousness of what it is creating, or the quality or relevance of the output, which is just a direct consequence of the greater incidence of a particular pattern vis a vis the question or a specific action requested. As a consequence, when we build weak or bad prompts, or prompts that are not clear enough, AI will tend to stumble, potentially providing nonsensical answers.

What does one need to do to build a good prompt to maximise the output of AI? There are 3 basic concepts to be followed:

1 Be as clear as possible. Use simple and direct commands translated into simple and direct words, as if explaining something to a friend, or a student.

2 Be concise. Guide the AI to the point and avoid being either too vague or too prolific (by using too many words). One word less or more can change the whole output.

3 Contextualise. Provide examples of what a good result looks like, and this extra effort and detail will provide better and more creative outputs or answers.

We can take courses in doing a better prompt, but experience and trial and error is the best way, as it is a mix of science and art. Well-built prompts will provide predictable answers, and output, rather than a “black box scenario” where it’s hard to see the connections or processes at work between the input and output.

Candidate Dashboard

forgotten password?