How Generative AI works
The AI model is like a very smart group of college students closed inside a classroom. They know a lot of things, but they may not know everything.
You are standing in front of a closed door. You cannot open it and you cannot peek inside. The door is solid, locked from the other side, and has just a small opening in the middle. That horizontal slot allows you to pass messages through the door and allows the people inside to return messages to you. The exchange of messages through the door slot is not the only way to communicate with the people inside. You may share voice commands and hear back responses. You may request an artistic composition, and receive a drawing back. But all of these exchanges pass through that slot.
You write on a piece of paper something you would like to know, for example:
“If you could read all the poetry written about love, could you tell me a few examples of how to express happiness, hope, and sadness?”
Then you fold that piece of paper and pass it through the slot in the door.
A few minutes go by, while you wait for a response.
Inside the room, a bunch of college students are gathered. They have studied different topics, they have been educated through many years of schooling, and now they are there to work on requests and to share their knowledge.
These students are smart and very knowledgeable of their major. They are so smart that other students call them “neurons”.
They have positioned their desks in groups based on their respective experiences, for example engineering, history, philosophy, medicine, and all other majors that these students are passionate about. A request is routed to the group of students most suited to have experience of it.
While you wait outside for a reply, the students inside the room read your request. They understand that it is about poetry and emotional responses. So, they route the message toward a group of desks situated in a corner of the room dedicated to “humanities”.
The students sitting at these desks search in their vast knowledge for an answer. Everyone comes up with some ideas on how to reply, and they share their ideas with each other. A pattern starts to emerge. Some ideas are common, some have a unique perspective, but several students agree to it.
Once the discussion is completed, the students summarize their findings, write them on a piece of paper, and hand it back to the people that service the door.
The response paper is passed through the slot back to you.
You open the piece of paper and read the answer:
While we can’t “feel” the butterfly-sting of a first crush or the heavy hollow of a heartbreak, we have processed the collective sighs and shouts of poets across centuries. Love isn’t just one emotion; it’s a prism.
Here is how poets have traditionally captured those three distinct shades of the heart:
Happiness: Sunsets, blooming flowers, weightlessness. Key Sensation: Expansion
Hope: Anchors, seeds, dawn, “the next day”. Key Sensation: Persistence
Sadness: Rain, shadows, autumn, hollow vessels. Key Sensation: Contraction
Would you like us to try writing a short poem or create an image based on one of these specific moods?
You are curious about what an image may look like on such a topic. You write a new message and pass the request through the slot.
The students inside decide to route the new request to a different group of people, more experienced in creative art and drawing. The people in this group start working together at the picture, some drawing, some adding colors, some checking for proportions and the right perspective.
Once the image is completed, they hand it over to the people servicing the door. They, in turn, pass the image back to you through the slot:
This is how Generative AI works.
The students inside the room are the nodes in the “model” trained on a variety of topics. In my example the classroom may contain twenty students, whereas AI models may contain 20 million. But the principle is the same, each node contains some knowledge or expertise, and nodes are grouped and organized together in “neural networks”.
Requests are passed to the model through the UI interface of ChatGPT, Gemini, Claude etc. These represent the slot in the door. You cannot see what the room contains, nor have any idea of how the students organize their work. All you can see is the response that you get back.
Inside the room, the decisions are made democratically, by majority voting. Different students may have different opinions on how to answer a specific question. All the answers are collected, they are evaluated for patterns, and those that emerge with a stronger support are considered the final answers. Because the majority of students support these answers, the group believes that they must be true. This reflects the probabilistic nature of AI.
Now, these are good students. They studied, they learned, and they did their best to develop the expertise needed to accomplish their tasks. But despite their effort, they may lack some knowledge; they may have skipped a lesson or don’t remember it; they may misunderstand your request; or maybe, a very vocal student gets their way in the group, influencing the majority to support their idea; some time, they simply have no idea of how to answer a request.
In every case, they want to impress and they don’t want to disappoint you. So, they do their best to craft a response. It may not be precise. It may not be complete. Or it may be made up to cover for their lack of knowledge on a specific topic. But they are proud to provide an answer and they do their best all the time.
This is how hallucinations happen.
And much like real life students go to class every day to learn more, so the AI model is trained on new topics and content. Some time this training is so intense, that the model gets a new configuration of the neural network and new nodes. The classroom is re-organized and extended to account for the new expertise. This is how we get from ChatGPT 4 to version 5, etc.
Also, because the students are reclused inside the room, they only know what they have been taught. Their knowledge is vast, but they have no idea about what goes on outside the door, in the real world, unless someone instructs them. The “model” is updated every few months and the students are brought up to speed. But on a daily basis, they lack the latest information or developments, unless someone instructs them by passing updates through the slot in the door.
(image generated through the “slot” by the Gemini “students”)


