Introduction to Generative AI

Qwiklabs-Courses
9 Jul 202422:54

Summary

TLDRThis video provides an introduction to Generative AI, explaining its definition, how it works, and its applications. Roger Martinez from Google Cloud covers topics such as artificial intelligence, machine learning, supervised and unsupervised models, and deep learning. He explains the difference between generative and discriminative models and highlights the power of large language models like Gemini. The video also touches on practical applications of generative AI, such as text-to-image and code generation, and discusses tools like Vertex AI Studio and PaLM API for developers to leverage Google's AI technologies.

Takeaways

  • 🤖 Generative AI is a type of artificial intelligence that creates new content, such as text, images, audio, and synthetic data, based on patterns learned from existing data.
  • 🧠 Artificial intelligence (AI) is a branch of computer science focused on building machines that can think and act like humans, while machine learning (ML) is a subfield of AI that trains models to make predictions from data.
  • 📝 Supervised learning uses labeled data to predict future values, while unsupervised learning identifies patterns in unlabeled data, clustering similar data points.
  • 🔗 Deep learning, a subset of machine learning, utilizes artificial neural networks to handle complex patterns, often using labeled and unlabeled data in semi-supervised learning.
  • 💡 Generative AI is a form of deep learning that generates new data instances, while discriminative models are used for classification or predicting labels.
  • 📊 Large language models (LLMs), such as those used in generative AI, rely on transformers, which include an encoder and decoder to process input and generate relevant tasks.
  • 🧩 Generative models can create various outputs based on inputs, including text, images, audio, and video, such as text-to-image or text-to-task models.
  • 🌍 Foundation models, such as those in Google's Vertex AI and PaLM API, are large AI models pre-trained on vast datasets, which can be fine-tuned for tasks like sentiment analysis, image generation, and fraud detection.
  • 💻 Gemini, a multimodal AI model, can process text, images, audio, and code, making it highly versatile for complex tasks that require understanding multiple types of input.
  • 🚀 Tools like Vertex AI Studio, Vertex AI Search and Conversation, and the PaLM API make it easier for developers to build and deploy generative AI models, even with limited coding experience.

Q & A

  • What is generative AI?

    -Generative AI is a type of artificial intelligence that creates new content based on patterns it has learned from existing data, such as text, imagery, audio, or synthetic data.

  • How does generative AI differ from traditional AI and machine learning?

    -Traditional AI focuses on creating systems that can reason and act like humans. Machine learning is a subfield of AI where models learn from data to make predictions. Generative AI, a subset of deep learning, goes further by generating new content rather than just making predictions.

  • What are the two main types of machine learning models?

    -The two main types are supervised models, which are trained on labeled data, and unsupervised models, which find patterns in unlabeled data.

  • How does deep learning relate to machine learning?

    -Deep learning is a subset of machine learning that uses artificial neural networks, allowing models to process more complex patterns, inspired by the structure of the human brain.

  • What is the difference between a generative and a discriminative model?

    -Discriminative models classify or predict labels for data, while generative models learn the underlying structure of data to create new content, such as generating text, images, or audio.

  • What are large language models (LLMs), and how do they relate to generative AI?

    -LLMs are a subset of deep learning that can generate natural-sounding language based on patterns in large datasets. They are a key component of generative AI, allowing for applications like text generation and dialogue systems.

  • What role do transformers play in generative AI?

    -Transformers are a type of deep learning architecture that revolutionized natural language processing by using encoders and decoders to process input sequences and generate relevant tasks, making generative AI more powerful.

  • What are some of the common applications of generative AI?

    -Common applications include text generation, code generation, image generation, video creation, and generating 3D models, all based on the patterns learned from input data.

  • What is prompt design in generative AI?

    -Prompt design refers to creating a short piece of text input to a large language model to control its output. Well-crafted prompts help guide the model to generate the desired content.

  • What tools does Google Cloud offer to help with generative AI development?

    -Google Cloud offers tools like Vertex AI Studio for model exploration and customization, Vertex AI Search and Conversation for building chatbots and search engines, and the PaLM API for experimenting with large language models.

Outlines

00:00

👋 Introduction to Generative AI and AI Concepts

The video begins with an introduction to generative AI, led by Roger Martinez, a Developer Relations Engineer at Google Cloud. Roger explains the course outline, including the definition of generative AI, how it works, its model types, and applications. The section introduces artificial intelligence (AI) and machine learning (ML), clarifying that AI is a discipline under computer science that deals with creating intelligent agents capable of reasoning, learning, and autonomous actions. The distinction between AI and ML is made, explaining that machine learning enables a system to learn from data without explicit programming, focusing on supervised and unsupervised ML models.

05:02

🧠 Deep Learning and Neural Networks

This section explores deep learning as a subset of machine learning, utilizing artificial neural networks. These networks are inspired by the human brain and consist of interconnected neurons, enabling the model to learn complex patterns. The concept of semi-supervised learning is introduced, where neural networks are trained using a combination of labeled and unlabeled data. Generative AI is highlighted as part of deep learning, capable of generating new content by learning from existing data, and is contrasted with discriminative models that classify data based on learned patterns.

10:03

🐕 Discriminative vs. Generative Models

The distinction between discriminative and generative models is elaborated. Discriminative models classify data, while generative models generate new data instances based on learned patterns. An example is provided where a discriminative model classifies an image of a dog, and a generative model can generate a new image of a dog. The section concludes with visualizations of traditional ML models versus generative AI models, emphasizing the ability of generative AI to create new content, such as images or text, based on learned data.

15:04

🛠️ Generative AI Processes and Models

The generative AI process is compared to traditional machine learning. Unlike traditional models that make predictions, generative AI can produce new outputs like text, images, and audio. Foundation models, such as PaLM and LaMDA, are introduced as large language models capable of generating natural language and multimedia content. The section delves into how these models work by processing vast amounts of data, and how users can generate content by providing prompts.

20:05

🎨 Generative AI Applications and Tools

This section explores various applications of generative AI, including text-to-text, text-to-image, text-to-video, and text-to-task models. Each type of model is explained, demonstrating how generative AI can solve practical problems such as translating languages, creating videos from text, or performing tasks like navigating user interfaces. The section highlights the versatility of generative AI and how it can be applied across industries to automate tasks and generate creative content.

🏗️ Foundation Models and Use Cases

Foundation models are described as large pre-trained models that can be adapted for specific tasks, such as sentiment analysis or object recognition. Examples from Google Cloud's Vertex AI, including PaLM API and Model Garden, showcase how developers can leverage foundation models for a variety of use cases, including generating code, performing sentiment analysis, or developing customer support systems. The section emphasizes how foundation models are revolutionizing industries like healthcare and finance.

👨‍💻 AI Code Generation and Development Tools

The video introduces Gemini, an AI model that assists in code generation and debugging. A use case is demonstrated where the model helps convert Python code to JSON. Additionally, tools like Vertex AI Studio and PaLM API are highlighted for their ability to help developers train, fine-tune, and deploy AI models without extensive coding experience. The tools simplify the development process, making it accessible for developers to integrate generative AI into their applications.

Mindmap

Keywords

💡Generative AI

Generative AI is a subset of artificial intelligence that creates new content based on what it has learned from existing data. In the video, this concept is central as the speaker discusses how it generates text, images, audio, and other forms of media from learned patterns in training data. It is highlighted as the core technology behind tools like PaLM and Gemini.

💡Artificial Intelligence (AI)

AI refers to the broader discipline of computer science focused on creating intelligent agents that can reason, learn, and act autonomously. In the script, AI is compared to fields like physics, setting the stage for understanding generative AI. It provides the foundational framework for all the machine learning and deep learning methods discussed.

💡Machine Learning (ML)

Machine learning is a subfield of AI that enables models to learn from data without explicit programming. The video explains how ML allows computers to predict outcomes from unseen data, using supervised and unsupervised models. ML forms the basis for more complex AI models, including generative AI.

💡Supervised Learning

Supervised learning is a machine learning approach where models are trained on labeled data. The video uses the example of predicting tips based on historical bill data in a restaurant. This method is contrasted with unsupervised learning to show different ways models can be trained in the AI landscape.

💡Unsupervised Learning

Unsupervised learning is another machine learning method where models are trained on unlabeled data to discover hidden patterns. In the video, the speaker illustrates unsupervised learning through an example of clustering employees based on tenure and income. It emphasizes the discovery aspect, which is important for understanding how generative AI models work.

💡Deep Learning

Deep learning is a subset of machine learning that uses neural networks to process complex patterns in data. The video explains how deep learning models, with their multiple layers of neurons, can handle more sophisticated tasks, such as those required in generative AI. This concept links traditional machine learning to the more advanced capabilities of generative models.

💡Neural Networks

Neural networks are computational systems inspired by the human brain, consisting of interconnected nodes or 'neurons.' The video discusses how these networks learn to perform tasks through deep learning, which is foundational for generative AI. Neural networks are critical in enabling generative AI models to process both labeled and unlabeled data.

💡Large Language Models (LLMs)

Large language models are deep learning models trained on vast amounts of text data to generate human-like text. The video mentions models like PaLM and Gemini, which use LLMs to process and generate new language outputs, demonstrating the power of generative AI in natural language processing tasks.

💡Transformer Models

Transformer models are advanced neural network architectures that revolutionized natural language processing by using encoders and decoders to process input sequences. In the video, transformers are credited for the breakthrough in generative AI, enabling models to generate coherent text and other forms of content based on learned patterns.

💡Foundation Models

Foundation models are large pre-trained AI models that can be adapted for various downstream tasks, such as image recognition or language generation. In the video, these models, like those available in Google's Vertex AI Model Garden, are highlighted for their ability to be fine-tuned for specific use cases, making generative AI more accessible and versatile.

Highlights

Introduction to Generative AI and its basic definition as a subset of artificial intelligence.

Explanation of the difference between AI and machine learning, where AI is the broader discipline, and ML is a subfield.

Description of the two main types of machine learning models: supervised and unsupervised.

Machine learning models are trained on input data to make useful predictions for new, unseen data.

Introduction to deep learning as a more advanced form of machine learning that uses neural networks to process complex patterns.

Deep learning uses artificial neural networks inspired by the human brain, enabling it to learn tasks by processing data.

Generative AI is a subset of deep learning and can produce new content, such as text, images, audio, and more.

Generative models generate new data instances, while discriminative models classify existing data.

Example of discriminative and generative models: discriminative models classify if an image is a dog, while generative models create a new image of a dog.

A formal definition of generative AI: a type of AI that creates new content based on what it has learned from existing content.

Introduction to large language models (LLMs), a type of generative AI model that produces human-like text responses.

Explanation of transformers and their role in advancing natural language processing since 2018.

Discussion of hallucinations in AI, where models generate nonsensical or incorrect outputs.

Explanation of prompt design and its role in controlling the output of large language models.

Overview of various model types in generative AI, including text-to-text, text-to-image, text-to-video, and text-to-3D.

Transcripts

play00:06

Hi, and welcome to "Introduction to Generative AI."

play00:10

Don't know what that is?

play00:11

Then you're in the perfect place.

play00:13

I'm Roger Martinez

play00:14

and I am a Developer Relations Engineer at Google Cloud,

play00:17

and it's my job to help developers

play00:19

learn to use Google Cloud.

play00:21

In this course, I'll teach you four things,

play00:24

how to define generative AI,

play00:27

explain how generative AI works,

play00:29

describe generative AI model types,

play00:32

describe generative AI applications.

play00:34

But let's not get swept away with all of that yet,

play00:37

let's start by defining what generative AI is first.

play00:42

Generative AI has become a buzzword, but what is it?

play00:45

Generative AI is a type

play00:47

of artificial intelligence technology

play00:49

that can produce various types of content,

play00:52

including text, imagery, audio, and synthetic data.

play00:57

But what is artificial intelligence?

play01:01

Since we are going to explore

play01:02

generative artificial intelligence,

play01:04

let's provide a bit of context.

play01:07

Two very common questions asked are:

play01:10

What is artificial intelligence?

play01:12

And what is the difference between AI and machine learning?

play01:17

Let's get into it.

play01:18

So one way to think about it is that AI is a discipline,

play01:21

like how physics is a discipline of science.

play01:24

AI is a branch of computer science

play01:26

that deals with the creation of intelligent agents

play01:29

and are systems that can reason, learn,

play01:31

and act autonomously.

play01:34

Are you with me so far?

play01:35

Essentially, AI has to do with the theory and methods

play01:38

to build machines that think and act like humans.

play01:42

Pretty simple, right?

play01:44

Now, let's talk about machine learning.

play01:47

Machine learning is a subfield of AI.

play01:50

It is a program or system

play01:52

that trains a model from input data.

play01:55

The trained model can make useful predictions

play01:57

from new, never before seen data

play01:59

drawn from the same one used to train the model.

play02:03

This means that machine learning gives the computer

play02:05

the ability to learn without explicit programming.

play02:09

So what do these machine learning models look like?

play02:12

Two of the most common classes of machine learning models

play02:14

are unsupervised and supervised ML models.

play02:18

The key difference between the two

play02:20

is that with supervised models, we have labels.

play02:24

Labeled data is data that comes with a tag,

play02:26

like a name, a type, or a number.

play02:31

Unlabeled data is data that comes with no tag.

play02:35

So what can you do with supervised and unsupervised models?

play02:39

This graph is an example of the sort of problem

play02:42

a supervised model might try to solve.

play02:44

For example, let's say you're the owner of a restaurant.

play02:48

What type of food do they serve?

play02:50

Let's say pizza or dumplings.

play02:54

No, let's say pizza. I like pizza.

play02:57

Anyway, you have historical data of the bill amount

play03:00

and how much different people tipped

play03:02

based on the order type, pick up or delivery.

play03:06

In supervised learning, the model learns from past examples

play03:09

to predict future values.

play03:12

Here, the model uses the total bill amount data

play03:14

to predict the future tip amount

play03:16

based on whether an order was picked up or delivered.

play03:20

Also, people, tip your delivery drivers.

play03:23

They work really hard.

play03:24

This is an example of a sort of problem

play03:26

that an unsupervised model might try to solve.

play03:29

Here, you wanna look at tenure and income,

play03:32

and then group or cluster employees

play03:33

to see whether someone is on the fast track.

play03:36

Nice work, Blue Shirt.

play03:38

Unsupervised problems are all about discovery,

play03:41

about looking at the raw data

play03:42

and seeing if it naturally falls into groups.

play03:45

This is a good start, but let's go a little deeper

play03:48

to show this difference graphically,

play03:50

because understanding these concepts

play03:52

is the foundation for your understanding of generative AI.

play03:56

In supervised learning, testing data values, X,

play03:59

are input into the model.

play04:01

The model outputs a prediction

play04:03

and compares it to the training data

play04:05

used to train the model.

play04:07

If the predicted test data values

play04:09

and actual training data values are far apart,

play04:12

that is called "Error."

play04:14

The model tries to reduce this error

play04:16

until the predicted and actual values are closer together.

play04:20

This is a classic optimization problem.

play04:23

So, let's check-in.

play04:25

So far, we've explored differences

play04:26

between artificial intelligence and machine learning

play04:29

and supervised and unsupervised learning.

play04:32

That's a good start, but what's next?

play04:35

Let's briefly explore where deep learning fits

play04:38

as a subset of machine learning methods,

play04:41

and then, I promise, we'll start talking about Gen AI.

play04:45

While machine learning is a broad field

play04:47

that encompasses many different techniques,

play04:49

deep learning is a type of machine learning

play04:51

that uses artificial neural networks,

play04:53

allowing them to process more complex patterns

play04:56

than machine learning.

play04:58

Artificial neural networks are inspired by the human brain.

play05:01

Pretty cool, huh?

play05:03

Like your brain,

play05:04

they are made up of many interconnected nodes or neurons

play05:07

that can learn to perform tasks

play05:09

by processing data and making predictions.

play05:13

Deep learning models typically have many layers of neurons,

play05:16

which allows them to learn more complex patterns

play05:18

than traditional machine learning models.

play05:22

Neural networks can use both labeled and unlabeled data.

play05:25

This is called semi-supervised learning.

play05:28

In semi-supervised learning, a neural network is trained

play05:31

on a small amount of labeled data

play05:33

and a large amount of unlabeled data.

play05:36

The labeled data helps the neural network to learn

play05:39

the basic concepts of the tasks,

play05:41

while the unlabeled data helps the neural network

play05:43

to generalize to new examples.

play05:46

Now we finally get to where generative AI fits

play05:49

into this AI discipline.

play05:51

Gen AI is a subset of deep learning,

play05:54

which means it uses artificial neural networks,

play05:57

can process both labeled and unlabeled data

play05:59

using supervised, unsupervised, and semi-supervised methods.

play06:04

Large language models are also a subset of deep learning.

play06:08

See, I told you I'd bring it all back to Gen AI.

play06:11

Good job, me.

play06:13

Deep learning models or machine learning models in general

play06:15

can be divided into two types,

play06:18

generative and discriminative.

play06:21

A discriminative model is a type of model

play06:23

that is used to classify or predict labels for data points.

play06:27

Discriminative models are typically trained

play06:29

on the dataset of labeled data points,

play06:32

and they learn the relationship between

play06:33

the features of the data points and the labels.

play06:37

Once a discriminative model is trained,

play06:39

it can be used to predict the label for new data points.

play06:44

A generative model generates new data instances

play06:47

based on a learned probability distribution

play06:49

of existing data.

play06:51

Generative models generate new content.

play06:54

Take this example:

play06:55

Here, the discriminative model

play06:57

learns the conditional probability distribution,

play06:59

or the probability of Y, our output, given X, our input,

play07:05

that this is a dog,

play07:06

and classifies it as a dog and not a cat,

play07:09

which is great because I'm allergic to cats.

play07:12

The generative model

play07:13

learns the joint probability distribution

play07:15

or the probability of X and Y, P of XY,

play07:20

and predicts the conditional probability that this is a dog,

play07:23

and can then generate a picture of a dog.

play07:27

Good boy. I'm gonna name him Fred.

play07:30

To summarize, generative models

play07:33

can generate new data instances,

play07:35

and discriminative models

play07:36

discriminate between different kinds of data instances.

play07:41

One more quick example.

play07:43

The top image shows a traditional machine learning model

play07:46

which attempts to learn the relationship between

play07:48

the data and the label, or what you want to predict.

play07:52

The bottom image shows a generative AI model

play07:55

which attempts to learn patterns on content

play07:57

so that it can generate new content.

play08:00

So what if someone challenges you

play08:02

to a game of "Is It Gen AI or Not?"

play08:06

I've got your back.

play08:08

This illustration shows a good way to distinguish

play08:10

between what is Gen AI and what is not.

play08:14

It is not Gen AI when the output, or Y, or label,

play08:19

is a number or a class,

play08:21

for example, spam or not spam, or a probability.

play08:26

It is Gen AI when the output is natural language

play08:30

like speech or text, audio,

play08:32

or an image like Fred from before, for example.

play08:37

Let's get a little mathy to really show the difference.

play08:40

Visualizing this mathematically would look like this:

play08:44

If you haven't seen this for a while,

play08:45

the y = f(x) equation calculates the dependent output

play08:49

of a process given different inputs.

play08:52

The Y stands for the model output,

play08:54

the F embodies a function used in the calculation or model,

play08:59

and the X represents the input or inputs

play09:02

used for the formula.

play09:04

As a reminder, inputs are the data,

play09:06

like comma separated value files, text files, audio files,

play09:11

or image files, like Fred.

play09:14

So the model output is a function of all the inputs.

play09:18

If the Y is a number, like predicted sales,

play09:21

it is not generative AI.

play09:24

If Y is a sentence, like define sales, it is generative,

play09:29

as the question would elicit a text response.

play09:33

The response we base on all the massive large data

play09:36

the model was already trained on.

play09:38

So the traditional ML supervised learning process

play09:42

takes training code and labeled data to build a model.

play09:45

Depending on the use case or problem,

play09:47

the model can give you a prediction, classify something,

play09:51

or cluster something.

play09:53

Now, let's check out how much more robust

play09:55

the generative AI process is in comparison.

play09:59

The generative AI process can take training code,

play10:03

labeled data and unlabeled data of all data types

play10:06

and build a foundation model.

play10:09

The foundation model can then generate new content,

play10:12

it can generate text, code, images, audio,

play10:16

video, and more.

play10:18

We've come a long way from traditional programming,

play10:21

to neural networks, to generative models.

play10:24

In traditional programming, we used to have to hard code

play10:27

the rules for distinguishing a cat,

play10:29

type, animal, legs, four, ears, two,

play10:35

fur, yes, likes, yarn, catnip, dislikes, Fred.

play10:43

In the wave of neural networks,

play10:45

we could give the networks pictures of cats and dogs

play10:48

and ask, "Is this a cat?"

play10:50

And it would predict, "A cat," or "Not a cat."

play10:53

What's really cool is that in the generative wave,

play10:56

we as users can generate our own content,

play10:59

whether it be text, images, audio, video, or more.

play11:03

For example, models like PaLM, or Pathways Language Model,

play11:07

or LaMDA, Language Model for Dialogue Applications,

play11:11

and just very, very large data

play11:14

from multiple sources across the internet

play11:17

and build foundation language models

play11:19

we can use simply by asking a question,

play11:21

whether typing it into a prompt

play11:23

or verbally talking into the prompt itself.

play11:27

So when you ask it, "What's a cat?"

play11:30

It can give you everything it's learned about a cat.

play11:33

Now, let's make things a little more formal

play11:36

with an official definition.

play11:37

What is generative AI?

play11:41

Gen AI is a type of artificial intelligence

play11:43

that creates new content

play11:45

based on what it has learned from existing content.

play11:48

The process of learning from existing content

play11:50

is called training,

play11:52

and results in the creation of a statistical model.

play11:56

When given a prompt, gen AI uses a statistical model

play11:59

to predict what an expected response might be,

play12:02

and this generates new content.

play12:04

It learns the underlying structure of the data

play12:06

and can then generate new samples

play12:09

that are similar to the data it was trained on.

play12:12

Like I mentioned earlier, a generative language model

play12:14

can take what it has learned

play12:15

from the examples it's been shown

play12:17

and create something entirely new based on that information.

play12:21

That's why we use the word "generative".

play12:25

But large language models

play12:26

which generate novel combinations of texts

play12:28

in the form of natural sounding language

play12:31

are only one type of generative AI.

play12:34

A generative image model takes an image's input

play12:37

and can output text, another image, or video.

play12:40

For example, under the output text,

play12:43

you can get visual question and answering,

play12:45

while under output image, image completion is generated,

play12:48

and under output video, animation is generated.

play12:52

A generative language model takes text as input

play12:55

and can output more text, an image, audio, or decisions.

play12:59

For example, under the output text,

play13:01

question and answering is generated,

play13:03

and under output image, a video is generated.

play13:06

I mentioned that generative language models

play13:08

learn about patterns in language through training data.

play13:11

Check out this example:

play13:13

Based on things learned from its training data,

play13:15

it offers predictions of how to complete this sentence.

play13:20

I'm making a sandwich with peanut butter and...

play13:23

Jelly. Pretty simple, right?

play13:26

So given some text, it can predict what comes next.

play13:30

Thus, generative language models

play13:32

are pattern matching systems.

play13:34

They learn about patterns

play13:35

based on the data that you provide.

play13:37

Here is the same example using Gemini,

play13:39

which is trained on a massive amount of text data

play13:42

and is able to communicate and generate human-like text

play13:45

in response to a wide range of prompts and questions.

play13:48

See how detailed the response can be?

play13:51

Here is another example

play13:52

that's just a little more complicated

play13:54

than peanut butter and jelly sandwiches.

play13:57

The meaning of life is...

play13:59

And even with a more ambiguous question,

play14:01

Gemini gives you a contextual answer

play14:04

and then shows the highest probability response.

play14:07

The power of generative AI

play14:09

comes from the use of transformers.

play14:12

Transformers produced the 2018 revolution

play14:14

in natural language processing.

play14:17

At a high level, a transformer model

play14:19

consists of an encoder and a decoder.

play14:23

The encoder encodes the input sequence

play14:25

and passes it to the decoder,

play14:26

which learns how to decode the representations

play14:29

for a relevant task.

play14:31

Sometimes, transformers run into issues though.

play14:34

Hallucinations are words or phrases

play14:37

that are generated by the model

play14:38

that are often nonsensical or grammatically incorrect.

play14:42

See, not great.

play14:44

Hallucinations can be caused by a number of factors,

play14:47

like when the model is not trained on enough data,

play14:51

is trained on noisy or dirty data,

play14:54

is not given enough context,

play14:55

or is not given enough constraints.

play14:59

Hallucinations can be a problem for transformers

play15:02

because they can make the output text

play15:03

difficult to understand.

play15:05

They can also make the model more likely to generate

play15:07

incorrect or misleading information.

play15:10

So put simply, hallucinations are bad.

play15:14

Let's pivot slightly and talk about prompts.

play15:17

A prompt is a short piece of text

play15:19

that is given to a large language model, or LLM, as input,

play15:24

and it can be used to control the output of the model

play15:26

in a variety of ways.

play15:28

Prompt design is the process of creating a prompt

play15:31

that will generate a desired output from an LLM.

play15:34

Like I mentioned earlier, generative AI depends a lot

play15:38

on the training data that you have fed into it.

play15:41

It analyzes the patterns and structures of the input data

play15:43

and thus, learns.

play15:46

But with access to a browser based prompt,

play15:48

you, the user, can generate your own content.

play15:52

So, let's talk a little bit about

play15:54

the model types available to us when text is our input,

play15:57

and how they can be helpful in solving problems,

play15:59

like never being able to understand my friends

play16:01

when they talk about soccer.

play16:03

The first is text-to-text.

play16:06

Text-to-text models take a natural language input

play16:09

and produce text output.

play16:11

These models are trained to learn the mapping

play16:13

between a pair of text,

play16:15

for example, translating from one language to others.

play16:19

Next, we have text-to-image.

play16:22

Text-to-image models are trained on a large set of images,

play16:25

each captioned with a short text description.

play16:29

Diffusion is one method used to achieve this.

play16:33

There's also text-to-video and text-to-3D.

play16:36

Text-to-video models aim to generate a video representation

play16:39

from text input.

play16:41

The input text can be anything from a single sentence

play16:44

to a full script, and the output is a video

play16:46

that corresponds to the input text.

play16:49

Similarly, text-to-3D models

play16:51

generate three dimensional objects

play16:53

that correspond to a user's text description,

play16:56

for use in games or other 3D worlds.

play16:59

And finally, there's text-to-task.

play17:02

Text-to-task models are trained to perform a defined task

play17:05

or action based on text input.

play17:07

This task can be a wide range of actions,

play17:10

such as answering a question, performing a search,

play17:12

making a prediction, or taking some sort of action.

play17:16

For example, a text-to-task model

play17:18

could be trained to navigate a web user interface

play17:20

or make changes to a doc

play17:22

through a graphical user interface.

play17:24

See, with these models, I can actually understand

play17:27

what my friends are talking about when the game is on.

play17:30

Another model that's larger than those I mentioned

play17:32

is a foundation model,

play17:34

which is a large AI model pre-trained

play17:36

on a vast quantity of data designed to be adapted

play17:39

or fine-tuned to a wide range of downstream tasks,

play17:43

such as sentiment analysis, image captioning,

play17:46

and object recognition.

play17:48

Foundation models have the potential

play17:50

to revolutionize many industries,

play17:52

including healthcare, finance, and customer service.

play17:56

They can even be used to detect fraud

play17:57

and provide personalized customer support.

play18:00

If you're looking for foundation models,

play18:02

Vertex AI offers a Model Garden

play18:04

that includes foundation models.

play18:07

The language foundation models include PaLM API

play18:10

for chat and text.

play18:12

The vision foundation models include stable diffusion,

play18:14

which have been shown to be effective

play18:16

at generating high quality images from text inscriptions.

play18:20

Let's say you have a use case

play18:21

where you need to gather sentiments

play18:22

about how your customers feel about your product or service.

play18:26

You can use the classification task

play18:28

sentiment analysis task model.

play18:30

Same for vision tasks,

play18:32

if you need to perform occupancy analytics,

play18:35

there is a task-specific model for your use case.

play18:39

So those are some examples of foundation models we can use,

play18:42

but can Gen AI help with code for your apps?

play18:45

Absolutely.

play18:46

Shown here, are generative AI applications.

play18:49

You can see there's quite a lot.

play18:52

Let's look at an example of code generation

play18:54

shown in the second block under the code at the top.

play18:57

In this example, I've input a code file conversion problem,

play19:01

converting from Python to JSON.

play19:04

I use Gemini and insert into the prompt box,

play19:06

"I have a Pandas Dataframe with two columns -

play19:10

one with a file name

play19:11

and one with the hour in which it is generated:

play19:15

I am trying to convert it into a JSON file

play19:17

in the format shown on screen:"

play19:19

Gemini returns the steps I need to do this.

play19:21

And here, my output is in a JSON format.

play19:24

Pretty cool, huh?

play19:26

Well, get ready, it gets even better.

play19:29

I happen to be using

play19:29

Google's free browser based Jupyter notebook

play19:32

and can simply export the Python code to Google's CoLab.

play19:35

So to summarize, Gemini code generation can help you

play19:39

debug your lines of source code,

play19:41

explain your code to you line-by-line,

play19:44

craft SQL queries for your database,

play19:46

translate code from one language to another,

play19:49

generate documentation and tutorials for source code.

play19:53

I'm gonna tell you about three other ways Google Cloud

play19:55

can help you get more out of generative AI.

play19:58

The first is Vertex AI Studio.

play20:02

Vertex AI Studio lets you quickly explore

play20:05

and customize generative AI models

play20:08

that you can leverage in your applications on Google Cloud.

play20:11

Vertex AI Studio helps developers create

play20:14

and deploy generative AI models

play20:16

by providing a variety of tools and resources

play20:19

that make it easy to get started.

play20:22

For example, there is a library of pre-trained models,

play20:25

a tool for fine-tuning models,

play20:28

a tool for deploying models to production,

play20:30

and a community forum for developers

play20:32

to share ideas and collaborate.

play20:34

Next, we have Vertex AI, which is particularly helpful

play20:38

for all of you who don't have much coding experience.

play20:41

You can build generative AI search and conversations

play20:44

for customers and employees

play20:45

with Vertex AI Search and Conversation,

play20:47

formerly Gen AI App Builder.

play20:50

Build with little or no coding

play20:52

and no prior machine learning experience.

play20:55

Vertex AI can help you create your own chatbots,

play20:58

digital assistants, custom search engines,

play21:02

knowledge bases, training applications, and more.

play21:06

And lastly, we have PaLM API.

play21:09

PaLM API lets you test and experiment

play21:11

with Google's large language models and Gen AI tools.

play21:15

To make prototyping quick and more accessible,

play21:17

developers can integrate PaLM API with Maker Suite,

play21:20

and use it to access the API

play21:22

using a graphical user interface.

play21:25

The suite includes a number of different tools,

play21:27

such as a model training tool, a model deployment tool,

play21:30

and a model monitoring tool.

play21:33

And what do these tools do? I'm so glad you asked.

play21:37

The model training tool helps developers train ML models

play21:39

on their data using different algorithms.

play21:42

The model deployment tool

play21:43

helps developers deploy ML models to production

play21:46

with a number of different deployment options.

play21:48

The model monitoring tool helps developers monitor

play21:51

the performance of their ML models in production

play21:53

using a dashboard and a number of different metrics.

play21:57

Lastly, there is Gemini, a multimodal AI model.

play22:02

Unlike traditional language models,

play22:04

it's not limited to understanding text alone,

play22:07

it can analyze images, understand the nuances of audio,

play22:11

and even interpret programming code.

play22:13

This allows Gemini to perform complex tasks

play22:16

that were previously impossible for AI.

play22:19

Due to its advanced architecture,

play22:21

Gemini is incredibly adaptable and scalable,

play22:24

making it suitable for diverse applications.

play22:28

Model Garden is continuously updated to include new models.

play22:32

And now you know absolutely everything about generative AI.

play22:36

Okay, maybe you don't know everything,

play22:38

but you definitely know the basics.

play22:40

Thank you for watching our course

play22:41

and make sure to check out our other videos

play22:43

if you wanna learn more about how you can use AI.

Rate This

5.0 / 5 (0 votes)

関連タグ
Generative AIGoogle CloudMachine LearningDeep LearningNeural NetworksAI BasicsTech EducationAI ApplicationsCode GenerationTransformers
英語で要約が必要ですか?