An easy and fun way to explain how Generative-AI works: The cupcake Analogy
Throughout my graduation project on “AI and Design”, I’ve gotten to interact with many people about Generative AI in the form of short courses, workshops and casual discussions.
It didn’t take long for me to realise how fussy it was to explain how Generative-AI works. Sure, you could go with the textbook explanation of how it works, but it gets too technical and sucks the fun out of this exciting technology.
Is there any way to communicate how it works in a simple, fun and straightforward way such that the listener doesn’t fall asleep?
*Que the drums* Enter the cupcake analogy!
So I took some time off to figure out what the best way to communicate this complex system would be and found out that representing it with an anology of a vertical cupcake manufacturing assembly line works well.
Here’s how it works:
- Input: All generative AI models require an input, ChatGPT requires text, Midjourney; A description of an image. Let’s consider “make a cake please” as a prompt in this scenario.
- Preprocessing: The AI does not understand what “make” or “cake” or any of those words means, so the input is preprocessed and filtered to convert into a format the LLM(Large Language Model) can understand, often involving some form of labelling or assigning tokens.
- Neural Network: All generative AI models rely on a neural network architecture to generate outputs. They mimic the functioning of our brain. It tries to figure out what “Make a cake please” means by relating all the bits and pieces it was provided to the data it was already trained on, in a trial and error method. Once it finds what it thinks is the most probable connection it learns from it and keeps it ready for output.
- Training: Generative AI models are trained using large amounts of data. For example, ChatGPT was trained on a massive corpus of text. This training is what will ultimately define how good your cake will be. The more data and parameters the AI model has been trained on, the better the result or output will be.
- Output: The output is the final result generated by the generative AI model, in this case, a cake — based on all the data it was trained on and what the neural network thought the best representation would be, but remember, the cake is a reflection of the data the Neural network was trained on, so it might not be the exact cake that you envisioned it to be.
- Fine-tuning: The cake isn’t perfect. Most Generative AI models can be fine tuned on specific tasks in an attempt to make the output as perfect and safe as possible.
- Evaluation: Generative AI models are evaluated based on various metrics to ensure the cake it has given you is fit for consumption and isn’t harmful.
This model has been used to explain how Gen-AI works in a corporate setting, but also in a room filled with High school kids and it has proven beneficial for both. Hence I wanted to share it and make it open source so that more people who’d find it helpful can use it. The text explaining above how it works is intended only as background information and could just be explained verbally depending upon the context you’re in. I’ve attached a presentation friendly PDF that has animated frames inorder to explain better how this functions, you can click here to access it.
Please feel free to use it, and if you do, I would love to know your opinions and thoughts on it. Don’t forget attribution though, silly.
You can find me online at designroughbook.com