2 How does Generative AI work?
GenAI tools and search engines are different.
Many of us use AI in our everyday lives: spelling and grammar check, autocomplete, chatbots and more. We often ask AI to complete a concrete task for us – like asking Alexa to play music (using voice recognition).
GenAI is a little bit different from Siri or Alexa and is also not a supercharged Google search. A traditional search engine like Google or Duck Duck Go uses a rule-based algorithm to search for the exact words you type and gives you a list to explore. Some of these results are prioritized based on advertisements or SEO (Search Engine Optimization).
Video: How do GenAI tools work?
There are three stages in how GenAI tools work: Training, Prompting and Output.
What happens during training?
During training, a GenAI is fed a vast amount of training data, from which the GenAI learns patterns and relationships. This can include information like text (books, articles, code), images (photographs, paintings, diagrams) and multimedia files (music, speech, video). The goal of training is to identify deep patterns in the data – like how often the word “pie” appears near “apple” or “chart”, and that blue pixels often form a sky at the top of an image. Through this training, the GenAI develops the ability through its probabilistic algorithm to generate new content that resembles its training data.
What is prompting?
A prompt is a set of instructions that you, the user, give the GenAI tool to perform a task like summarizing a topic, creating an image or debugging code.
The GenAI converts the human language into a mathematical language it can process. It looks at your prompt and maps the patterns it learned in the training phase.
There are many different ways to prompt GenAI – some more effective than others. The quality of the prompt is just as important as the quality of the dataset that the tool was trained on. One way to create a prompt is to use a framework like ROSES.
ROSES Framework
- Role – tell GenAI who it is pretending to be
- Objective – specify a goal or purpose of the content in the output
- Style – identify the tone, format, structure of the output
- Example – provide a sample of the desired output
- Scenario – give the specific context for the content
Example:
- Role – You are a 19-year-old student in an academic writing course who is incredibly detail-oriented but does not have a lot of experience doing library research.
- Objective – Develop an outline for completing a 15 minute research podcast project, including the timeline for researching, recording and editing the podcast.
- Style – Create a document with clear bulleted steps for each piece of the podcast project.
- Example – Format the sections like an episode of This American Life
- Scenario – I am a 19-year-old writing student. I need to create a narrative research podcast on the popularity of capybaras in social media. I need to create a 15-minute podcast that features academic research articles as well as popular sources.
What is the output?
The quality of the output from a GenAI depends on the quality, origin and the diversity of the data, as well as the specificity of the prompt. It’s all connected.
When prompted, GenAI doesn’t just recall information, but it pulls together different types of patterns to produce a new output. The calculations which determine what that output will be are based on probability. It’s predicting the next most likely word, sentence or pixel based on the billions of words and connected pieces of information within its training dataset.
For text output, GenAI calculates the probability of the next word. If the sentence is “Comparing apples to”, the model sees that “oranges” has a 80% probability, while “mango” has 5%.
To keep things creative, the AI doesn’t always pick the 100% most likely option. It uses a bit of randomness to choose slightly less likely paths, resulting in original content. This is one reason why GenAI can provide factual inaccuracies in its output – something called a “hallucination” or “fabrication”.
GenAI repeats this probability check thousands of times a second until a full output like a summary, presentation, image or song is complete.
What happens with the output?
After receiving the output from a GenAI tool, it’s important to have some human intervention to review the output for accuracy, authority and bias. This assures that humans remain in the loop by providing oversight through correcting errors and having the final decisions around what to do with the GenAI’s output.