Machine Learning
Machine learning (ML) is a subfield of artificial intelligence that enables conversational AI systems to understand, generate, and respond to human language. ML is the backbone of artificial intelligence. Understanding the basics of machine learning will help you grasp conversational AI, also known as prompt engineering.
In this lesson:
- What is machine learning?
- How are AI models trained?
- Challenges of machine learning
What is Machine Learning?
AI models, also called large language models (LLMs), are trained to detect patterns (and exceptions) based on large foundations of data. The extensive training database gives LLMs access to millions of examples of human speech and writing. When you talk to an AI model like ChatGPT, it “understands” the input, calculates a response, and outputs the response.
- Understands the text or speech input
- Calculates a response
- Outputs the response in a reasonable way
The AI system isn’t really thinking. It is predicting which words should come next, based on its training from millions of books, conversations, written and spoken data. It usually works so well that you can’t tell you’re talking to a computer. Occasionally, the AI may give an incorrect answer, so always check your facts.
How are AI models trained?
Depending on the application, developers use several different types of machine learning methods, often in combination.
- Supervised training: labeled data for classification tasks
- Unsupervised training: unlabeled data to detect patterns and exceptions
- Reinforcement learning: real-time user feedback to improve results
Let’s consider a simple scenario where an AI is taught to identify pictures of animals. There are three phases of development: training, testing, and adjustment.
Training
In the first phase, the training phase, the AI is shown labeled pictures of animals. “This is a cat.” “This is a dog.”
Testing
In the second phase, the testing phase, the AI is shown unlabeled pictures of animals. “What is this?” The AI identifies (or, “guesstimates”) the animals based on the training. “That is a cat.” “That is a dog.” Then the developer evaluates the accuracy of the results.
Adjustment
In the final phase, after evaluating the results, the developer makes adjustments to the internal set of instructions (algorithms) or provides additional labeled training data if necessary.
- Training (on labeled data)
- Testing (on unlabeled data)
- Adjustment (by the developer)
This is an ongoing process. AI models are under constant development to improve performance.
Challenges of Machine Learning
Machine learning is not without challenges. Accurate predictions require a large training set (called a “foundational model”). The training data itself must be accurate, fair, and free of bias.
A conversational AI system must be designed ethically with safeguards against abuse. Google’s first attempt had to be taken offline within 24 hours after users quickly retrained the bot to respond with offensive and racist remarks.
AI models available to the public are proprietary and owned by corporations. Because of trade secrets, we don’t have a detailed view of the AI’s design. Proprietary systems like ChatGPT, Google, and Microsoft keep that information hidden. Reverse-engineering the bot is a violation of the terms of use.
Accuracy
Rarely, the AI may give a plausible but inaccurate response. This phenomenon is called an AI “hallucination” and may be due to insufficient training on the topic. Following up with questions like, “How did you arrive at that conclusion?” or “What are your sources for that information?” might help clear up the AI’s confusion. (You can also flag the response for the developer.)
What’s Next
In this lesson we learned how AI systems are trained, called machine learning. In the next lesson we’ll look at the related field of natural language processing, that allows computers to imitate human speech.