A Comprehensive AI Learning Path: Demystifying Generative AI
Alex de Pablos Lopez14 min
Hello! Today, we’re going to explore a specific area of Artificial Intelligence (AI) that has been gaining a lot of attention in the tech world: Generative AI.
You may be asking… Why Generative AI? Well, it all started with a recommendation from Nerea Luis, the AI responsible at Sngular. Nerea is deeply entrenched in the AI field and when someone like her recommends anything related with this field, you know it’s going to be good. Plus, I’ve been dabbling with Gen AI tools and developing some easy applications, so I thought it was high time I gained some solid foundational knowledge. And what better way to do that than to dive into Google’s “Generative AI” learning path?
In this post, we’ll explore AI, Machine Learning, Deep Learning, and of course, Generative AI. If these terms sound like tech jargon, do not worry. I’ll break them down in simple language, making them accessible and understandable. So, let’s dive in!
Understanding AI, Machine Learning, and Deep Learning
Let’s start with the basics. What is AI? In simple terms, AI is a branch of computer science that deals with creating intelligent agents – systems that can reason, learn, and act autonomously. Think of AI as a discipline, like physics. It’s all about building machines that can think and act like humans.
Now, within this discipline, we have something called Machine Learning. This is a subfield of AI where we train a model from input data so that it can make useful predictions from new data. In other words, Machine Learning gives computers the ability to learn without being explicitly programmed.
Deep Learning, on the other hand, is a type of Machine Learning that uses artificial neural networks. These networks are inspired by the human brain and consist of interconnected nodes or neurons that can process complex patterns. Deep Learning models can have many layers of neurons, allowing them to learn more complex patterns than traditional Machine Learning models.

So, to sum it up, AI is the broad discipline, Machine Learning is a subset of AI, and Deep Learning is a subset of Machine Learning. It’s like a set of Russian dolls, with each one fitting neatly inside the other.
What is Generative AI?
Now that we’ve laid the groundwork with AI, Machine Learning, and Deep Learning, let’s delve into the heart of our discussion – Generative AI.
Generative AI, a subset of Deep Learning, is a fascinating field that focuses on creating new content based on what it has learned from existing content. Imagine an AI that can write a poem, compose music, or even generate a realistic image of a person who doesn’t exist! That’s the power of Generative AI.
But how does it work? Generative AI models learn from the data they’re trained on, understanding its underlying structure. Then, when given a prompt, they use this knowledge to generate new content that’s similar to the training data.
For instance, let’s say we train a Generative AI model on a dataset of classical music compositions. Once trained, we can give the model a simple prompt, like the first few notes of a melody. The model would then generate a complete composition that sounds like it could be a piece of classical music. It’s like having Beethoven or Mozart at your fingertips!
Types of Generative AI Models
Generative AI is a broad field with various types of models, each with its unique capabilities. Let’s take a look at some of them:
- Text-to-Text Models: These models take a natural language input and produce text output. They’re trained to learn the mapping between a pair of texts. For example, they can be used for tasks like translating text from one language to another.
- Text-to-Image Models: These models are trained on a large set of images, each captioned with a short text description. Given a text input, they can generate a corresponding image. For instance, if you input “a red apple on a table,” the model could generate an image depicting exactly that.
- Text-to-Video and Text-to-3D Models: These models aim to generate a video or a three-dimensional object based on a text description. For example, if you input “a cat chasing a ball,” a Text-to-Video model could generate a short clip of a cat chasing a ball.
- Text-to-Task Models: These models are trained to perform a defined task or action based on text input. This task can range from answering a question to making a prediction or taking some sort of action. For example, a Text-to-Task model could be trained to navigate a website or make changes to a document through a graphical user interface.
Each of these models opens up a world of possibilities, transforming the way we interact with technology and creating new opportunities for innovation.
How Does Generative AI Work?
Generative AI might seem like a complex concept at first glance, but let’s break it down so you can understand it in a simple way.
Generative AI models are trained using large volumes of data. During this training, the models learn to recognize patterns and structures in the data. Once they have been trained, these models are capable of generating new content that resembles the data they were trained with.
To make it clearer, imagine a generative language model. This type of model is trained with texts, thus learning the patterns and structures of language. When given a sentence or a piece of text, the model can predict what words or phrases are most likely to follow.
For example, if you give the model the sentence ‘I’m making a sandwich with peanut butter and…’, the model might suggest that the next word be ‘jelly’. This suggestion is based on the patterns and structures that the model has learned from the texts it was trained with. In this case, it has learned that peanut butter and jelly are often mentioned together, especially in the context of making a sandwich.
But it doesn’t stop there. Generative AI models not only predict words, but they can also generate complete sentences, paragraphs, or even longer texts. And they’re not limited to text, they can also generate images, music, and much more. All of this is possible thanks to the patterns and structures they have learned during their training.

Generative AI Applications
Generative AI has a wide range of applications. For instance, it can be used for code generation. In this scenario, you can input a classic code file conversion problem, such as converting from Python to JSON, into a Generative AI model like Bard. The model will then return the steps and the code snippet needed to perform this conversion. This is just one example of how Generative AI can help you debug your lines of source code, explain your code to you line by line, craft SQL queries for your database, translate code from one language to another, and generate documentation and tutorials for source code.
It can, for sure, to transform various industries and creating new possibilities.
Here are some tools:
- Generative AI Studio: This tool helps developers create and deploy generative AI models. It provides a library of pre-trained models, tools for fine-tuning models, and resources for deploying models to production. It also includes a community forum for developers to share ideas and collaborate.
- Generative AI App Builder: This tool allows users to create Generative AI apps without writing any code. It provides a drag-and-drop interface for designing and building apps, a visual editor for creating and editing app content, and a built-in search engine. Users can create chatbots, digital assistants, custom search engines, knowledge bases, training applications, and more.
- PaLM API: This API allows developers to test and experiment with Google’s Large Language Models and Generative AI tools. Developers can integrate the PaLM API with MakerSuite to access the API using a graphical user interface. The suite includes a model training tool, a model deployment tool, and a model monitoring tool.
Understanding Foundation Models
A foundation model is a large AI model pre-trained on a vast quantity of data. It’s designed to be adapted or fine-tuned to a wide range of downstream tasks, such as sentiment analysis, image captioning, and object recognition. Foundation models have the potential to revolutionize many industries, including healthcare, finance, and customer service. They can be used to detect fraud and provide personalized customer support.
For instance, Vertex AI offers a Model Garden that includes Foundation Models. The language Foundation Models include PaLM API for Chat and Text. The Vision Foundation models include stable diffusion, which has been shown to be effective at generating high-quality images from text descriptions. Vertex AI also provides task-specific foundation models. For example, if you need to gather sentiments about how your customers are feeling about your product or service, you can use the classification task sentiment analysis model.
The Power of Transformers
Transformers brought about a revolution in Natural Language Processing in 2018. A Transformer model consists of an encoder and decoder. The encoder encodes the input sequence and passes it to the decoder, which learns how to decode the representations for a relevant task. Unlike its predecessor, Recurrent Neural Networks, which was used for language processing, Transformers can take advantage of parallelization using Graphical Processing Units (GPUs) and Tensor Processing Units (TPUs). This means that they can process much more data in the same amount of time.
However, Transformers can sometimes generate words or phrases that are often nonsensical or grammatically incorrect, known as hallucinations. These can be reduced by training the model on more data, cleaner data, giving the model more context, or more constraints.
Understanding the Transformer Architecture
Introduced in the paper “Attention Is All You Need“, the Transformer is based on a self-attention mechanism that is particularly well-suited for language understanding tasks.
Unlike recurrent neural networks (RNNs) that process language sequentially, the Transformer performs a small, constant number of steps. In each step, it applies a self-attention mechanism that directly models relationships between all words in a sentence, regardless of their respective positions. This allows the Transformer to make decisions that depend on words far away from each other in a single step, making it more efficient and accurate.
For example, in the sentence “I arrived at the bank after crossing the river”, to determine that the word “bank” refers to the shore of a river and not a financial institution, the Transformer can learn to immediately attend to the word “river” and make this decision in a single step.
The Transformer also outperforms both recurrent and convolutional models on academic English to German and English to French translation benchmarks. On top of higher translation quality, the Transformer requires less computation to train and is a much better fit for modern machine learning hardware, speeding up training by up to an order of magnitude.
Another intriguing aspect of the Transformer is that we can visualize what other parts of a sentence the network attends to when processing or translating a given word, thus gaining insights into how information travels through the network. This ability to visualize the flow of information within the network can provide valuable insights into how the Transformer makes its decisions.
The Transformer architecture offers significant advantages in terms of computational performance, accuracy, and the ability to visualize the flow of information. Its self-attention mechanism allows it to efficiently process language and make accurate decisions, making it a powerful tool in the field of language understanding.
Prompt Design in Generative AI
A prompt is a short piece of text that is given to the Large Language Model (LLM) as input. It can be used to control the output of the model in a variety of ways. Prompt design is the process of creating a prompt that will generate the desired output from an LLM. Designing effective prompts increases the likelihood that the model will return a response that is both favorable and contextual.
However, recent research has introduced a new concept called “prompt tuning“, which is a mechanism for learning “soft prompts” to condition large language models to perform specific tasks. Unlike the discrete text prompts used traditionally, soft prompts are learned through backpropagation and can be tuned to incorporate signals from any number of labeled examples.
A “soft prompt” is a learned input that conditions the model to perform a specific task. Unlike traditional prompts, which are fixed pieces of text, soft prompts are learned from the data during the training process and can be adjusted or “tuned” based on the task at hand. In other words, a soft prompt is a kind of adaptable input that the model learns to generate more accurate and contextually relevant outputs.

For example, consider a language model trained to answer questions about a specific topic. In traditional prompt design, you might provide a prompt like “Tell me about the history of the Roman Empire”, and the model would generate a response based on its training. With prompt tuning, however, the model learns a soft prompt from a large number of examples related to the Roman Empire. This soft prompt is then used to condition the model’s responses, leading to more accurate and contextually relevant answers.
As models become larger, exceeding billions of parameters, prompt tuning becomes more competitive, matching the strong performance of model tuning where all model weights are tuned. This is especially relevant because large models are costly to share and serve, and the ability to reuse one frozen model for multiple downstream tasks can ease this burden.
While prompt design is an essential aspect of working with generative AI models, the emerging technique of prompt tuning and the use of soft prompts offer a promising way to improve the performance and efficiency of these models, especially as they continue to grow in size.
The Future of Generative AI
Generative AI is not just a current trend, but it’s also shaping the future of many industries. According to an article on Technology Review, the future of generative AI is niche, not generalized. This means that instead of trying to create AI models that can do everything, the focus is shifting towards creating models that are specialized in specific tasks. This approach allows for the development of AI models that are highly efficient and effective in their respective domains.
Moreover, businesses are starting to realize the potential of generative AI. Deloitte’s article on the implications of Generative AI for businesses highlights how this technology can be used to create new opportunities and solve complex problems. However, it’s important to note that with the increased use of generative AI, there’s a need for proactive risk management. Deloitte’s article on responsible use of generative AI emphasizes the importance of ethical considerations when using this technology.
Conclusion
Generative AI is a fascinating and rapidly evolving field. It’s a technology that can create new content based on what it has learned from existing content. From generating text, code, images, audio, and video, to creating chatbots, digital assistants, and custom search engines, the possibilities with Generative AI are simply as many as you can imagine.
The Google Cloud course, “Introduction to Generative AI,” provides a comprehensive overview of this technology, its applications, and how it fits into the broader AI discipline. It’s a course that I highly recommend to anyone interested in AI overall if you are a curious beginner.
The course also introduces various tools and resources that can help you explore and experiment with Generative AI, such as Generative AI Studio, Generative AI App Builder, and PaLM API. These tools make it easier for developers to train, deploy, and monitor Generative AI models, and even build their own Gen AI apps.
Generative AI is a powerful tool that can revolutionize many industries and applications. It’s a technology that’s worth understanding and exploring, and the “Introduction to Generative AI” course is an excellent place to start.
Personally, I’m convinced that Generative AI is a revolutionary tool that is redefining the boundaries of what’s possible in many industries and applications. And remember, we are living just the beginning! On the blog, you’ll find more fascinating content on Generative AI and other cutting-edge topics. I hope you’ll stick with us and continue exploring!