What is Generative AI? + Key GenAI Vocabulary
A few months ago, I completed the Generative AI with Large Language Models course provided by deeplearning.ai and Amazon Web Services. To help make the topic of GenAI more approachable, I aim to share a recap of the key takeaways from the course over ~10 notes. Congratulations, you’re reading the first one now!
For a deeper understanding of the topic, I encourage people to take the course, and see my earlier summary of the Stanford Machine Learning course from Professor Andrew Ng.
In this note, we’ll lightly define Generative AI, begin to discuss how modern Generative AI works, and share some key vocabulary, which we’ll use in future notes.
What is Generative AI?
Generative AI (GenAI) is a subset of machine learning where models are trained to find statistical patterns in data generated by humans, and then use those statistical patterns to create content as an approximation of human content.
These models use many of the same deep learning approaches that have been around for over a decade or more (deep neural networks, back propagation), but in a newer configuration (i.e., architecture) called transformers, which was introduced in a new research paper in 2017 titled “Attention is All You Need”. This architecture is still the state of the art today, and is behind the current generation of GenAI technologies that have become household names. We’ll go deeper into this architecture in a future note, but for now it is important to know that these models are still built using deep (i.e., multi-layered) neural networks to identify the relationships (and relationships between relationships, etc etc) among a vast set of data.
When trained on a vast set of language data, these models are called large language models (LLMs). At their most basic capability, LLMs are able to complete sentences and respond to questions, but they are capable of a wide set of tasks, and they are now being explored as “reasoning engines”, which can be connected to external APIs and be given the ability to retrieve external information on the user’s behalf. It’s plausible that very soon, LLM “agents” will eventually be able to engage with any other software, website, and app that is designed with human-facing user interfaces in much the same way that a human would.
Key GenAI Vocabulary
Here are a few key terms that we’ll use in future notes:
- Prompts are natural language inputs, which can be used to have an LLM complete a wide variety of tasks. For example: “Translate this paragraph into French:”.
- Tokens are the components of the prompts, as the model receives them. You can think of these as almost the same as words, but can also include parts of words, or other text elements, such as symbols or punctuation.
- Context Window is the maximum size of a prompt (measured in tokens) that a LLM can take as an input.
- Inference is the action the model is taking when it generates text or images from a given prompt.
- Completion is the final product of the model’s inference: i.e., a complete output.
- Temperature is an inference setting for the model that determines how much the model’s predictions directly inform the completion of the model: “Cooler” temperatures (setting <1) will create completions that are more based on the model’s direct predictions. “Warmer” temperatures (setting >1) will allow for randomness to play a greater role in the completions, so you may get more “creative” outputs than what you might typically expect.
- Parameters are the “weights” at each connection between nodes in a neural network. These weights are updated during model training to reflect the model’s understanding of the statistical patterns in its training data. The more parameters a model has, the more ability to remember and complete sophisticated tasks.
- Fine Tuning is a way to train a model to better follow instructions for a specific task or set of tasks using supervised learning with a large set of labeled examples of [prompt, completion] pairs for the model to learn from.
- Prompt Engineering is a way of improving performance by only changing the prompt itself, and without changing the underlying model. Please note that this is different from prompt-tuning (also known as “soft prompts”) which is an efficient type of fine-tuning that we’ll discuss more later on.
Thank you for reading. I hope you found this helpful.
Up Next
In the next note, we’ll take a deeper look at the transformer architecture used in modern GenAI models.