This outlines a list of basic generative AI terms used in our course and beyond for easy reference.
Glossary:
- Artificial Intelligence (AI) - the ability of a computer system to perform tasks that typically require human intelligence, such as learning, reasoning, problem-solving, perception, comprehension and generation of natural language.
- vs Machine Learning (ML) - a branch of AI that focuses on the development of algorithms and models that allow computers to learn from and make predictions or decisions based on data without being explicitly programmed. It involves the use of statistical techniques and algorithms to enable computers to improve their performance on a specific task through experience and iterative learning processes.
- What they have in common: The commonality between ML and AI and what differentiates them both from any other sub-field of computer science is that these programs are emergent and self-modifying. Traditional programs are designed by humans through and through. These programs were fully conceived in someones head before they became a functional code. AI & ML software are different. They aggregate capacities and insights which they achieved on their own, due to the learning capacities embedded in them by the programmer.
- Backpropagation - an algorithm for improving the accuracy of predictions in data mining and machine learning. It works by working back from output nodes of the neural network to input nodes. It calculates how the output could be tranformed by tuning and adjusting the nodes further back in the neural network.
- AI Agent - a needlessly scary and opaque term which, in the context of our course, means an AI tool that takes some action as opposed to solely generating content.
- For example, a browser-based AI might automatically integrate your Twitter
and LinkedIn content, or might look for a cheap flight via Expedia when
you ask for travel information to a specific location.
- API - Application Programming Interface; a means to interact with a specific software, usually via the internet, or a set of instructions for interacting with a software.
- For example, a restaurant is an API for food. I know that I will receive a menu, and that if I give something from the menu with money, I will get food. I don’t need to know about what happens in the kitchen. An API is like this for software. It is a set of instructions that allow me to give some kind of information and get something in return without knowing how the internal of the software function.
- For more AI models, we access them through APIs. We send some piece of information to the model (often on someone else’s computer), and get back an output of some kind. We don’t need to know anything about the model to do this, so long as we know the format the information needs to be submitted in.
- Chain-of-thought prompting - instead of giving a single prompt and expecting the model to deliver, you maximize your likelihood of attaining a favorable result by providing a series of prompts as steps which build on each other.
- Ex.: Instead of saying “Write a story about cats in the style of Ernest Hemingway” you would start with:
- Step 1: “List the characteristics of Ernest Hemingway’s writing”
- Step 2: “Write a story about cats with the characteristics listed above.”
- Completion model(a.k.a. base model) - a generative AI model which does not comprehend direct commands, but requires a specific approach where you write an introduction to the content which you want it to generate.
- Ex.: If you want to write an article about cats, you would start with “Here
is an article about cats. Title: Cats are awesome. Body:” and then let
the model fill in the body of the text. (Other methodologies for guiding completion models exist)
- The original GPT-3 was a completion model, as are many open source models.
- Foundational model - a large, pre-trained generative AI model trained on a vast amount of data, costing thousands or millions of dollars, and requiring ingenuity of data engineers. There are only a handful of such models. 99% of all AI applications you see rely on one of these models in some way.
- GPU - Graphics Processing Unit; chips originally developed for video game graphics, that are also used for AI model training and inference. Today, GPUs for video games and AI have diverged and specialized. More rarely, other types of chips like TPUs or IPUs are used to run AI applications.
- Instruct model - an AI model to which you can give direct commands in a human-readable format.
- Ex.: You can say “write me an article about cats” and it will start writing an article about cats.
- ChatGPT (GPT-3.5-turbo) and GPT-4 are instruct models. Previous versions are completion models.
- Loss function - a function which calculates how well an algorithm predicts a dataset. These can be predictions of changes in time or completion of a dataset which you kept hidden from the algorithm. If your predictions are totally off, your loss function will output a higher number. If they’re pretty good, it’ll output a lower number. As you change pieces of your algorithm to try and improve your model, your loss function will tell you if you’re getting anywhere.
- NLP - Natural Language Processing; a general term for the domain of computing the deals with computers understanding or producing natural language.
- LLM - Large Language Model; the brains of AI text generators. A large network of letters and words (usually “tokens” which contain about four characters) and statistical weights describing how often the words co-occur with one another.
- NLP model vs LLM - an LLM is a tool which performs NLP tasks. While NLP
applications have been around for a while, doing all sorts of things, LLMs have sprung up in a visceral way only in 2018, and are preoccupied specifically with generating text.
- Playground - A particular user interface with a model which allows a wider array
of toggles and options than a simple chat interface. This approach is usually preferable if you plan to integrate the prompt as an API (a tool) in a personal app. The toggles available include:
- Temperature - This is how creative AI gets with its output. High temperature makes
for very out-of-the-box and sometimes nonsensical outputs. Low temperature makes for very rote responses which often repeat themselves. Temperature around 0.7 is a good starting point for many creative writing tasks. For coding, the ideal temperature should be closer to 0.
- Maximum length - how long the input (prompt) + output length is.
- Top P - another way to control for the randomness of the text, by specifying
the cut off percentage on the probability curve for generating the next
word. Value of 1 is often optimal.
- Frequency penalty - how much the model will try to avoid repeating the same words or phrases.
- Presence penalty - a more strict mode of frequency penalty which avoids using any words already present in the input or output.
- Priming - guiding the output of generative AI model towards a specific result by providing relevant context, key words and scenarios.
- Production Model Governance - the overall strategy an organization developing AI tool applies in to ensure quality and efficacy of their AI tools. This strategy can include element such as roles involved in the production, access control, testing and validation, writing audits and compliance reports.
- Prompt - a way for the user to convey to the AI model what he or she wants by sending it direct instructions or samples.
- Prompt engineering - overall discipline of creating prompts for a specific output.
- Prompt mining- Accelerating the process of developing stable prompts* by searching an online database or community of prompt developers for prompts which achieved the style or output you are looking for.
- Ex.: In the case of generating image prompts, Jeremy provided the resource lexica.art, where you can search an AI-generated image database and copy the prompt to the image closest to what you are looking for. You can then swap the key words in that prompt to generate your own content in the same style. Its important to mine prompts for the model you are using. For instance, Midjourney prompts should be mined from the Midjourney Discord, and they will not work well for Stable Diffusion.