Overview¶
The ability of computers and algorithms to generate art, literature, and other forms of content has been around for several decades. However, it is only recently that such content has begun to exhibit human-like quality. This is largely due to the use of Artificial Intelligence (AI), particularly Machine Learning (ML), which leverages data to produce high-quality output.
This document provides a high-level overview of how Gen()AI achieves this feat.
Before delving into the details, let's first understand what Gen()AI is.
Defining Gen()AI¶
Gen()AI is a term that encapsulates both Generative and General AI. Each of these technologies has the capability to generate new information. Generative AI uses data, such as text, images, and videos, to create new content. On the other hand, General AI, also known as Artificial General Intelligence (AGI), is often viewed as a goal. It aims to generate information across almost all domains in a manner that is indistinguishable from, or even superior to, human-created content.
Recent advancements in Generative AI have positioned it as a potential stepping stone towards AGI. Given the profound implications of Gen()AI on individuals and society, it is crucial to understand these technologies.
Generative AI is a subset of AI in general, as illustrated in the diagram below.
Heirarchy of GenAI
Traditionally, predictive AI has been widely used in virtually every domain where data exists. But how does predictive AI differ from generative AI?
Predictive AI vs Generative AI¶
Understanding the similarities and differences between predictive and generative AI is crucial. While there is a significant overlap, with Generative AI inheriting many tools and methods from predictive AI, they serve different purposes.
The distinction is visually represented below.
Predictive AI vs Generative AI
AI vs Traditional programming¶
Another way of thinking about the difference between AI and traditional programming is to consider the difference between a function call and a program.
Traditional Programming
graph LR
subgraph Input ["Input Layer"]
Program[("⌨️<br>Code")]
Call[/"💬<br>Function Call"/]
end
subgraph Processing ["Processing Layer"]
Robot[("🤖<br>Computation")]
end
subgraph Result ["Result Layer"]
Output[["✅<br>Output"]]
end
Program --> Robot
Call --> Robot
Robot --> Output
classDef input fill:#b3e0ff,stroke:#0277bd,stroke-width:2px
classDef funcCall fill:#ffe0b2,stroke:#ef6c00,stroke-width:2px
classDef process fill:#ce93d8,stroke:#6a1b9a,stroke-width:2px
classDef result fill:#a5d6a7,stroke:#2e7d32,stroke-width:2px
classDef inputBg fill:#f3f9ff,stroke:#01579b,stroke-width:2px
classDef processBg fill:#faf5fc,stroke:#4a148c,stroke-width:2px
classDef resultBg fill:#f4faf5,stroke:#1b5e20,stroke-width:2px
class Program input
class Call funcCall
class Robot process
class Output result
class Input inputBg
class Processing processBg
class Result resultBg
AI/ML Programming
graph LR
subgraph Input ["Input Layer"]
Data[("📊<br>Data")]
Program[("⌨️<br>Model Code")]
Call[/"💬<br>Inference Call"/]
end
subgraph Processing ["Processing Layer"]
Calc1[("🤖<br>Training")]
Calc2[("🤖<br>Inference")]
end
subgraph Result ["Result Layer"]
Output[["✅<br>Output"]]
end
Data --> Calc1
Program --> Calc1
Calc1 --> Calc2
Call --> Calc2
Calc2 --> Output
classDef input fill:#b3e0ff,stroke:#0277bd,stroke-width:2px
classDef funcCall fill:#ffe0b2,stroke:#ef6c00,stroke-width:2px
classDef process fill:#ce93d8,stroke:#6a1b9a,stroke-width:2px
classDef result fill:#a5d6a7,stroke:#2e7d32,stroke-width:2px
classDef inputBg fill:#f3f9ff,stroke:#01579b,stroke-width:2px
classDef processBg fill:#faf5fc,stroke:#4a148c,stroke-width:2px
classDef resultBg fill:#f4faf5,stroke:#1b5e20,stroke-width:2px
class Data,Program input
class Call funcCall
class Calc1,Calc2 process
class Output result
class Input inputBg
class Processing processBg
class Result resultBg
Creating Gen()AI¶
Several techniques exist for creating Gen()AI, including rule-based, data-based, and fusion methods. This section provides a brief overview of these techniques, with more detailed discussions to follow.
Data-based Approaches¶
The data-based approach to creating Gen()AI involves the following steps:
- Collect data.
- Train the model on the collected data.
- Evaluate the model based on any new data.
- Iterate the process to improve the model.
Rule-based Approaches¶
The rule-based approach to creating Gen()AI involves defining a set of rules that the AI follows to generate new data. This approach is often used in scenarios where the data is scarce or when the generation process needs to adhere to specific guidelines or standards.
The steps involved in the rule-based approach are:
- Define the rules for data generation.
- Implement the rules in the AI model.
- Evaluate new data based on the rules.
- Iterate the process to refine the rules and improve the model.
However, this approach can be less effective on larger volumes of data due to unnecessary or inaccurate rules, especially if the rules are not continually re-evaluated for their impact.
Fusion Approaches¶
Fusion approaches combine the strengths of both data-based and rule-based methods. Fine-tuned models, even those that are smaller in size/cost, may outperform larger models, likely due to the no free lunch theorem. As such, using both hard-coded and ML-generated rules to select between models provides the basis for fusion techniques. For instance, combining traditional algorithms, like a calculator for math processing or regular expressions for text processing, with ML can result in a system that is more explainable, accurate, and designable compared to systems that are predominantly AI-driven.