Get startedGet started for free

Intro to generative AI

1. Intro to generative AI

One type of artificial intelligence that you can use for your applications is generative artificial intelligence, or generative AI for short. Generative AI is a type of artificial intelligence that creates new content based on what it has learned from existing content. We call this type of learning "training." A statistical model is created by using the existing content. You can provide an input, called a prompt, to the model, which can predict an expected response. New content can be generated based on the expected response. How does AI generate new content? It learns from a massive amount of existing content such as text, images, and audio. Training results in the creation of a “foundation model.” The most popular type of foundation model is a large language model, or LLM. LLMs are trained on text data only, but other types of foundation models might be trained on other types of data, like images or programming code. The foundation model can then be used directly to generate content and solve general problems, such as content extraction or document summarization. The model can also be trained further with new datasets in your field to solve specific problems, such as financial model generation or healthcare consulting. This training results in the creation of a new model that is tailored to your specific needs. How is generative AI different from traditional programming and other types of machine learning? In traditional programming, you have to specify the rules, then the machine acts on them and returns the answers. For example, using traditional programming, you might specify these attributes of a cat: type: animal legs: 4 ears: 2 fur: yes likes: yarn, catnip However, writing these algorithms is difficult because it’s impossible to implement all possible rules. So you need a new method: machine learning with neural networks. With machine learning, you feed the machine data and answers and let it discover the rules itself. For example, you train the machine on many pictures of cats and other animals. The machine learns the pattern and predicts whether a new picture is a cat. However, this type of learning is typically in a narrow field to solve a specific task. What if you want a machine to develop some fundamental intelligence to solve general problems? Generative AI aims to solve this problem. With generative AI, you feed a machine a huge amount of multimodal data. The machine learns a seemingly endless number of concepts and develops foundation models like an LLM. So when you ask the machine “what’s a cat,” it can give you everything it learned about a cat. So, what are large language models? Large language models refer to large, general-purpose language models that can be pre-trained and then fine-tuned for specific purposes. What does large mean? Large has two meanings. First is the enormous size of the training dataset, sometimes at the petabyte scale. Second it refers to the number of parameters, which now reaches billions and even trillions. Parameters are essentially the memories and knowledge that the machine has learned during model training. Parameters determine the ability of a model to solve a problem, such as predicting text. General-purpose means that the models are sufficient to solve common problems. The models work due to the commonality found in a human language, regardless of the specific tasks you are trying to do. This leads to the last point: pre-trained and fine-tuned. A large language model can be pre-trained for general purpose use with a large dataset. Later, it can be fine-tuned for a specific purpose by using a much smaller dataset. What are the potential use cases of generative AI? Generative AI can create content and bring your thoughts and visions to life. It can: Generate stories or poems based on prompts that you provide, or improve images based on instructions. Creation of content is an important benefit of generative AI, but it doesn't end there. Generative AI can summarize knowledge. Such as: Automatically summarizing video, audio, and paragraphs, or generating questions and answers based on the content. Generative AI can do search and discover for you. For example, it can: Search for a document, or Discover products based on desired features. Generative AI can also automate workflows. For instance, it can: Extract and label contracts, or classify feedback and create support tickets. You can use generative AI to create powerful and compelling applications. Generative AI revolutionizes how applications are developed. You code your apps with help from your own generative AI-powered coding assistant. Features include: Code generation. You can generate code based on a natural language description of the desired code, and automatically generate unit tests for a piece of code or ask your assistant to optimize code. Documentation. The assistant can add comments to your code or generate release notes based on the changes. Code explanation. You ask your assistant to explain what the code does, and how it does it. Fixing code. Your AI assistant can find bugs in your code, and then fix them. Code completion. As you type your code, the context of your code is used to finish the line of code you're writing. Or your code editor might suggest code for the entire function. Code translation. Take code written in one coding language, and have your assistant translate it into another, while adhering to coding conventions of the new language. Models developed by Google assist with code generation, code chat, and code completion to provide these features. Gemini provides you this assistance to help you write code faster and more efficiently.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.