Machine Learning (ML)

Machine learning is the subset of artificial intelligence (AI) focused on algorithms that can “learn” the patterns of training data and, subsequently, make accurate inferences about new data. This pattern recognition ability enables machine learning models to make decisions or predictions without explicit, hard-coded instructions.

Machine Learning Types – Most Common

SupervisedInvolves training models and algorithms to predict characteristics of new, unseen data using labeled data sets. Each output matches an input, meaning a corresponding output label exists for each input feature present in the labeled data
UnsupervisedAnalyze and cluster unlabeled data sets. These algorithms discover hidden patterns or data groupings without the need for human intervention.
Semi-SupervisedA machine learning technique that trains AI models using a small amount of labeled data alongside a large amount of unlabeled data. It bridges the gap between supervised learning (which requires entirely labeled data) and unsupervised learning (which relies entirely on unlabeled data).
ReinforcementA branch of machine learning where an AI agent learns to make decisions through trial and error. By interacting with an environment, it receives positive feedback (rewards) or negative feedback (penalties) for its actions, allowing it to determine the optimal strategy to achieve a specific goal

Additional Training Types

Ensemble

Ensemble learning is a machine learning technique that aggregates two or more learners (e.g. regression models, neural networks) in order to produce better predictions. In other words, an ensemble model combines several individual models to produce more accurate predictions than a single model alone.

Neural Networks and Deep Learning

A subset of machine learning inspired by the human brain’s structure, using multi-layered artificial neural networks (ANNs) to analyze complex data patterns. “Deep” refers to the numerous hidden layers (often hundreds or thousands) between input and output, allowing the system to automatically learn hierarchical features from large, unstructured datasets, such as images, text, and audio

Probabilistic and Statistical

Branch of data science focused on understanding and interpreting how variables (or data sets) relate to one another within a data set. This provides the theoretical foundation for many predictive and analytical data analysis and machine learning techniques.

Instance Based

Instance-based learning includes nearest neighbor, locally weighted regression and case-based reasoning methods. Instance-based methods are sometimes referred to as lazy learning methods because they delay processing until a new instance must be classified.

Genetic Based and Evolutionary Computing

A genetic algorithm (GA) is a program, or a set of rules, a computer uses to solve a complicated problem by mimicking Charles Darwin’s theory of evolution involving natural selection. A GA can be used to solve very complex problems with many solutions when solving such a problem manually is too time-consuming.

Hybrid Models

A hybrid approach to course delivery combines face-to-face classroom instruction with online activities. This approach reduces the amount of seat time in a traditional face-to-face course and moves more of the course delivery online.

Each type above have sub-types (algorithms). For our purposes here, the intent is to stay general. If you’re interested in the different algorithms and which type of learning they fall under, check out the article on the Medium website titled, List of All Machine Learning (ML) Algorithms.

Hallucinations

An AI hallucination is when an artificial intelligence—like a chat-bot or image generator—produces false, misleading, or entirely fabricated information, but presents it with absolute confidence. Instead of an error, it is a byproduct of how these models work.

Before we go further, let’s clarify where this happens. This typically happens due to a failure within the training. This could be related to the data itself, or the underlying algorithm being used. It’s also important to point out that these errors or hallucinations can occur within ANY AI model. Typically the neural-network gets all the attention. This is due to the wide spread adoption of generative AI like ChatGPT and Gemini.

3 Main AI Models

Decision TreesA decision tree is a non-parametric supervised learning algorithm, which is utilized for both classification and regression tasks. It has a hierarchical, tree structure, which consists of a root node, branches, internal nodes and leaf nodes.
Support Vector MachinesA machine learning tool that sorts data into categories by drawing the best possible boundary between them. Imagine you have a table covered in red and blue marbles. You want to draw a line to separate them so that if you drop a new marble, you’ll know what color it should be based on which side of the line it falls on. 
Neural NetworksA neural network is a method in artificial intelligence (AI) that teaches computers to process data in a way that is inspired by the human brain. It is a type of machine learning (ML) process, called deep learning, that uses interconnected nodes or neurons in a layered structure that resembles the human brain.

AI Agents

An AI agent is an autonomous software program that uses artificial intelligence to perceive its environment, make decisions, and take actions to achieve a specific goal. Unlike standard chatbots that only generate text, AI agents plan multiple steps, use external tools, and execute workflows with minimal human oversight.

The AI agent is itself an AI model which uses the Neural Network model. This model acts as middleware. When a request is submitted from the front end (like what you type in to talk with a generative AI), the request is passed to the AI Agent. This agent parses your request to determine which model to use.

Examples Using AI Agents

The request: What is the capital of France?

  • The evaluation: The agent instantly recognizes this is a factual, concrete question that can be answered with structured data.
  • The routing of the agent: It completely bypasses the heavy, slow Large Language Models (neural networks).
  • The tool: It routes your query to a traditional, lightning-fast database lookup (like Google’s Knowledge Graph). You get the answer “Paris” in 0.2 seconds, costing Google next to nothing in electricity.

The request: Write a poem about a sad robot in the style of Shakespeare.

  • The evaluation: The agent realizes a standard database or simple flowchart cannot generate creative, context-heavy text.
  • The routing of the agent: It gives the green light to power up the heavy machinery.
  • The tool: It boots up their massive generative AI neural networks to process the request and write the poem.

Note: Above are simple requests. The AI Agent is also capable of splitting the request up into multiple parts, routing the pieces to different tools. It then would aggregate the results and display it to the user in a easily understood way.

Summary

Machine learning is the lifeblood for any AI model. Regardless of the model, data is required and it must be cleaned and trained. This cleaning and training is carried out by machine learning. We also learned there are different AI models. Decision trees, support vector machines and neural-networks are the most common. We’ve only just glanced at the surface. Machine learning is a vast field of study. When we hear of hallucinations the root cause is typically here, in machine learning.