Generative artificial intelligence (AI) is a type of computer program that can produce content in response to human prompts.
After reading this article you will be able to:
Copy article link
Generative AI models are trained on vast quantities of raw data — generally, the same kinds of data they are built to produce. From that data, they learn to form responses, when given arbitrary inputs, that are statistically likely to be relevant for those inputs. For example, some generative AI models are trained on large amounts of text, in order to be able to respond to written prompts in a seemingly organic and original manner.
In simpler terms, generative AI can react to requests much like human artists or authors, but more quickly. Whether the content these models generate can be considered "new" or "original" is up for debate, but in many cases they can match or exceed certain human creative abilities.
Popular generative AI models include ChatGPT for text generation and DALL-E for image generation. Many organizations have built their own models as well.
Generative AI is a type of machine learning, which means it relies on mathematical analysis to find relevant concepts, images, or patterns. It then uses this analysis to produce content that is statistically likely to be similar or related to the prompt it received.
Specifically, generative AI relies on a type of machine learning called deep learning. Deep learning models are powerful enough to learn from unlabeled data. They use a type of computing architecture called a neural network. Such architectures are composed of multiple nodes that pass data to each other, similarly to how a human brain passes data via neurons. Neural networks are able to perform highly sophisticated and refined tasks.
Generative AI models that can interpret language need to understand more than individual words. They must be able to interpret entire sentences, paragraphs, and documents. Early machine learning models struggled with understanding entire sentences and would "forget" the beginning of a sentence by the time they reached the end, resulting in misinterpretation.
Modern generative AI models use a specific kind of neural network called transformers. These use a capability called self-attention to detect how elements in a sequence are connected. Transformers enable generative AI models to do things like process and contextualize large blocks of text instead of just individual words and phrases.
In order to work well, generative AI models have to be fed a large amount of data: more data, in most cases, than a human could process over the course of a lifetime. For example, the large language model ChatGPT was trained on millions of documents. An image generator might be trained on millions of images, and a code generator on billions of lines of code.
This training data is stored in a vector database. In such a database, points of data are stored as vectors — or, a set of coordinates within a multi-dimensional field. Just as latitude and longitude enable someone looking at a map to find nearby locations, storing data as vectors enables machine learning models to find "nearby" points of data. This allows models to make associations and understand the context of a word, an image, a sound, or any other type of content.
Once the generative AI model reaches a certain level of fine tuning, it does not need quite as much data in order to produce a result. For example, voice-generating AI models may be trained on thousands of hours of vocal recordings. But once they are fine-tuned, some models only need a few seconds of a sample recording to realistically imitate someone's voice.
Generative AI models are growing in popularity, since they offer a number of potential benefits. These benefits include, but are not limited to:
However, generative AI does come with its share of drawbacks, including:
"Large language model" (LLM) is the technical term for generative AI models that process language and can generate text, including both human-spoken languages and programming languages. Popular LLMs include ChatGPT (from OpenAI), Llama (from Meta), Bard (from Google), Copilot (from GitHub), and Bing Chat (from Microsoft).
AI image generators work similarly to LLMs, but for images instead of text. DALL-E and Midjourney are two examples of popular generative AI-based image generators.
Cloudflare empowers developers and businesses to build their own generative AI models. Cloudflare offers Vectorize so that developers can generate and store embeddings on the Cloudflare global network from their own data, and Cloudflare Workers AI for running generative AI tasks on a global network of GPUs. Learn more about how Cloudflare is enabling the next generation of generative AI.