Master the foundational architecture of Generative AI

Generative AI is not magic—it is the culmination of decades of research in mathematical optimization, statistical probability, and neural computation.
To leverage these technologies strategically, executives must understand the technical continuum: how Artificial Intelligence encompasses Machine Learning, which contains Deep Learning, which underpins the Transformer revolution.
This pedagogical guide demystifies supervised and unsupervised models, vector embeddings, loss functions, and generative algorithms to provide a solid technical ground.
Author: Thierry P. Gaillard - What is Artificial Intelligence? Principles and historical overview

Artificial intelligence is a scientific discipline. This branch of computer science deals with creating systems capable of reasoning, learning, and acting autonomously.
AI encompasses the theory and development of machines able to perform tasks that normally require human intelligence.
Machine learning, deep learning, discriminative artificial intelligence, and generative artificial intelligence are all subsets of artificial intelligence.

Machine Learning: supervised, unsupervised, and reinforcement paradigms

Machine learning is a subfield of AI. It consists of a program or system that trains a model from input data. This trained model can then make useful predictions from new or previously unseen data drawn from the same distribution as the data used to train the model.
Machine learning gives computers the ability to learn without explicit programming.
Unsupervised models and supervised models constitute two of the most common categories of machine learning models.
The primary difference between the two is that in supervised models, we have labels. Labeled data is data accompanied by a tag, such as a name, a category, or a number.
Conversely, data used in unsupervised models is unlabeled—meaning it has no predefined tags. Unsupervised problems focus on discovery, examining raw data, and finding natural clusters.

Deep Learning: multi-layer neural networks and feature extraction

Deep learning is a subset of machine learning that uses artificial neural networks, enabling them to process more complex patterns than traditional machine learning.
Neural networks

Artificial neural networks are inspired by the human brain. They consist of many interconnected nodes or neurons that learn to perform tasks by processing data and making predictions.
Deep learning models typically feature many layers of neurons, allowing them to learn much more complex representations than traditional machine learning. Neural networks can use both labeled and unlabeled data. This is called semi-supervised learning.
Semi-supervised learning
In semi-supervised learning, a neural network is trained on a small amount of labeled data and a large amount of unlabeled data.
The labeled data helps the neural network learn the foundational concepts of the task, while the unlabeled data helps it generalize to new examples.
Deep learning models can be divided into two main types of AI: discriminative and generative.
Discriminative Artificial Intelligence

Discriminative AI is used to classify or predict labels for data points. Discriminative models are typically trained on a dataset of labeled points.
They learn the relationship between the features of the data points and their labels. Once a discriminative model is trained, it can be used to predict the label for new data points. Discriminative AI outputs numbers, classes, and probabilities.
Generative Artificial Intelligence
Generative AI generates new data instances based on a learned probability distribution of existing data. Generative models therefore produce new content. Generative AI produces natural language text, audio, code, video, and images.
Mathematically, this is written as: y = f(x)
where:
- y represents the model's output,
- f represents the function used in the calculation,
- x represents the input or inputs used for the formula.
The model's output is therefore determined by its inputs. If y is a number—such as when predicting future sales figures—then it is discriminative AI. If y is a sentence or an image, then it is generative AI.
Mastering generative Artificial Intelligence and Transformer models

Generative Artificial Intelligence (GenAI) is a type of artificial intelligence that creates new content based on what it has learned from existing content.
The process of learning from existing content is called training and results in the creation of a statistical model.
When given a prompt, generative AI uses this statistical model to predict the expected response, thereby generating new content.
There are two major families of generative AI:
- Generative language models: they learn from training data and, given a text prompt, predict what comes next.
- Generative image models: they produce new images using techniques such as diffusion. Then, given a prompt or related images, they transform random noise into coherent images.
Generative AI models are neither databases of information nor deterministic information retrieval systems. Because they are prediction engines, they can produce different outputs in response to the exact same prompt.
For example, when you ask a generative AI model to produce an image of a cat, it does not search its training data and return an existing cat photo. Instead, it generates a brand-new cat image every single time.
How generative Artificial Intelligence works

Generative artificial intelligence is a subset of deep learning, which means it uses artificial neural networks and can process both labeled and unlabeled data using supervised, unsupervised, and semi-supervised methods.
The power of generative artificial intelligence stems from the use of Transformers. Transformers sparked the 2018 AI revolution in natural language processing. They require massive datasets, billions of parameters, and unsupervised learning.
A Transformer consists of an encoder that encodes the input sequence and passes it to the decoder, which learns how to decode the representation for a relevant task.
Why does Generative AI hallucinate?

"Hallucinations" arise from words or phrases generated by the model that are nonsensical, factually untrue, or grammatically flawed.
Hallucinations can be caused by a number of factors, including:
- The model is not trained on enough data.
- The model is trained on noisy or corrupted data.
- The model is not given enough context.
- The model is not given sufficient constraints.
A hallucination is an LLM response that may sound coherent and be presented with confidence, but is not grounded in facts. Among other reasons, hallucinations can occur when the response is not anchored in training data or real-world facts. Hallucinations can be reduced, but they are very difficult to eliminate completely.
Generative models do not retrieve information; they predict which words come next based on user inputs. For this reason, there is no guarantee that an LLM's prediction will contain factual information, nor that its outputs for a given prompt will remain identical over time.
Hallucinations can be reduced in an LLM, but inaccuracies cannot be avoided 100% of the time since responses are created through a probabilistic prediction mechanism. During fine-tuning, models can be optimized to recognize accurate patterns in their training data, reducing factual errors. Another technique to reduce hallucinations is connecting LLMs to external knowledge systems (such as RAG) to ground responses in verified information.
Overview of prompts and prompt design
A prompt is a short text instruction given to a Large Language Model as input. It can be used to control the model's output in various ways. "Prompt design" is the process of crafting a prompt that generates the desired result.
The quality of generative artificial intelligence depends heavily on the training data provided to it. It analyzes patterns and structures in input data, enabling it to learn. With access to a browser-based prompt interface, you can generate your own content.
Designing the ideal prompt can be complex. Subtle changes in how you phrase a question or arrange words can lead to surprising variations in the model's responses. Furthermore, a prompt cannot always accommodate a large volume of examples to guide the model. Even if you craft a prompt that seems to work well for your specific project, you might find that the model's responses lack consistency in quality.
The best way to address this issue is to use parameter-efficient tuning. This involves training a small subset of parameters in the existing model. For instance, you can add extra layers to the prompt to make it more precise. Tools like Google's Vertex AI Studio allow you to do this without touching a single line of code.
Core generative model modalities

- "Text-to-text" models take natural language input and produce text output. These models are trained to learn the mapping between pairs of texts (e.g., translating from one language to another). Possible applications: text generation, classification, summarization, translation, search, extraction, clustering, and rewriting.
- "Text-to-image" models are relatively recent and are trained on large datasets of images, each accompanied by a short text caption. Possible application: image generation and editing.
- "Text-to-video" models aim to generate a video representation from text. The input text can range from a single sentence to a full script, and the output is a video matching the input text. Possible applications: video creation and video editing.
- "Text-to-3D" models generate three-dimensional objects matching a user's text description. Possible application: video games and 3D modeling.
- "Text-to-task" models are trained to perform a specific task or action based on text input. This task can span a wide range of actions such as answering a question, performing a search, making a prediction, or executing an action. For example, a "text-to-task" model can be trained to navigate a web interface or edit a document through a graphical user interface. Possible applications: software agents, virtual assistants, and task automation.
Foundation models and strategic conclusions for enterprise leaders

In the fascinating realm of generative artificial intelligence, imagine a foundation model as a vast digital library that has ingested an immense amount of diverse information without explicit labels. This model is a true Swiss Army knife, capable of creating a wide variety of formats: text, code, images, music, and much more.
These models learn through what is called self-supervised learning. There is no need to explicitly show them what to do; they discover patterns and relationships on their own within raw data to understand how things work.
Here are several well-known examples of foundation models:
- GPT-3 and GPT-4 by OpenAI.
- BERT, PaLM, and Gemini by Google.
- Megatron-Turing 530B by NVIDIA.
- LLaMA 2 (open-weights) by Meta.
After this pre-training phase, foundation models become versatile general-purpose engines. You can call on them to generate text, translate languages, analyze sentiment, craft diverse creative content, or answer complex questions—like having an extraordinarily capable personal assistant across numerous domains!
Sources
- Google Cloud Tech - Introduction to Generative AI.
- Ask a Techspert - What is generative AI?
- Generative AI FAQs.
- Google Cloud - Introduction to Generative AI.
- Google Cloud - Introduction to Generative AI Learning Path.
- Google Cloud Skills Boost.
About the author:
Thierry P. Gaillard - End-to-end digital project management
After working at American Express for 15 years—including six as an IT Project Manager and eight as a Profit Center Director managing around a hundred people—Thierry P. Gaillard became a web entrepreneur, digital marketing manager, and e-commerce specialist.
His specialties are web performance, branding, business negotiation, and management.
