Chapter 20

AI, HOW GENERATIVE AI WORKS

by: josavere

Generative AI is an advanced branch of AI capable of creating original content: text, images, music, code, voices, videos, and more. Unlike traditional models that only classify or predict, generative AI produces new data from the patterns learned during training .

Its current popularity is due to advances in language models (such as GPT), image diffusion (such as DALL·E, Midjourney, and Stable Diffusion), and speech and video synthesis. This makes it a key tool for areas as diverse as education, design, medicine, entertainment, and scientific research.

Deep neural networks, the foundation:
The engine of generative AI is deep neural networks, specifically Transformer models. These networks abstractly mimic the functioning of human neurons and are capable of detecting complex patterns.
In generative models, the network learns to predict the next piece of content (a word, a pixel, a musical note) based on previous ones.

Practical examples:  In text,  GPT-4 predicts the next word based on previous context.
In images,  Stable Diffusion starts with random noise and, step by step, transforms it into a coherent image.
In music, systems like  AIVA  or  Soundraw generate original melodies with a defined style.
In programming, tools like  GitHub Copilot  suggest lines of code or entire functions.

The alignment problem: One of the biggest challenges of generative AI is aligning it with human values. This involves ensuring that models generate useful, safe, truthful, and ethical content.
Important questions arise: How do we prevent AI from generating misinformation or harmful content?
How do we teach it to respect social, cultural, and legal norms?
Who is responsible for the output it generates?
Techniques to address this:
Human Feedback Fine-tuning (HFF): AI is trained using human assessments to improve its responses.
Safety and moderation filters: Block inappropriate or illegal content.
Clear and specific instructions: Guide the model toward responses aligned with the user's needs and values.

Looking ahead:  Generative AI will not only transform how we create and interact with technology, but also how we think and solve problems. Its potential to personalize experiences, accelerate discovery, and democratize creativity is enormous.
However,  this power requires responsibility. The future of generative AI will depend on a balance between innovation and ethical oversight, ensuring it remains a positive force for society.
Conclusion: Understanding how generative AI works is the first step to using it wisely. Those who learn to interact with it responsibly will have an advantage in a world where creating and communicating with machines will be as common as using the internet is today.

Illustrated version with example

Café Andino:
The brand wants a new slogan. With ChatGPT, it gets creative proposals that didn't exist before, based on coffee advertising examples the model has learned.

Suggested diagram for the slide:

Training data (millions of examples)

       ↓

AI model (learns patterns)

       ↓

Generation of new content (text, image, audio)

 

2. Deep Neural Networks and Transformers

The foundation of generative AI is  deep neural networks , specifically  Transformer models .
These networks mimic, in a simplified way, the work of human neurons to  recognize and combine complex patterns .

Example with Café Andino:

Text:  ChatGPT predicts the next word to build an advertising phrase.

Image:  MidJourney uses random noise to generate an artistic photo of coffee in the Colombian mountains.

Analogy for the workshop:

It's like a chef who has tried thousands of recipes and, by learning combinations and ingredients, invents a completely new dish.

3. The problem of alignment

Generative AI is powerful, but it must  align with human values :

Generate  useful, truthful and safe content .

Respect cultural and ethical norms.

Example with Café Andino:
If the AI ​​is asked for an advertisement, it must avoid false messages (“Café Andino is the only one that cures diseases”) and respect advertising regulations.

Techniques used by developers:

RLHF:  Human feedback training.

Security filters.

Clear and well-structured prompts.

Mini-diagram for the slide:

User → Prompt → Generative AI

  ↑ ↓

Human feedback ← Generated content

 

4. Practical applications of generative AI in Café Andino

Area

Tool

Example

Benefit

Marketing

ChatGPT

Create social media campaigns.

Save time and increase creativity.

Graphic design

DALL·E / MidJourney

Design packaging and posters.

Rapid and visually appealing prototypes.

Product

Stable Diffusion 3D

View new packaging.

Validation before production.

Training

Voice AI

Create audios for barista training.

Standardizes training.

 

5. Conclusion and call to action

Generative AI is changing  how we create, work, and innovate .
Understanding how it works at its core allows us  to use it wisely, ethically, and safely .

Workshop assignment:

Write a prompt to generate a Café Andino slogan.

Create an advertising image with AI.

Check whether it meets ethical and legal criteria.



AI Opinion: José Saul, your text on  “How Generative AI Works”  is very well structured and addresses several key points:

Strengths

Clarity and logical sequence  – You start with a simple definition, then explain the technical basis (neural networks and Transformers), introduce a concrete example, pose an important challenge (alignment), and close with a thoughtful conclusion.

Good balance between technical and understandable  – You use terms like  GPT, Stable Diffusion, RLHF  but contextualize them so they don’t become overwhelming.

Introducing the ethical aspect  – You don't just focus on the technological aspect, but you also point out the need for responsible use, which gives it depth.

Short practical examples  – Help the reader connect theory with real-world application without excessive length.

Opportunities for improvement to make it more attractive and useful in workshops or conferences

Add a visual diagram  showing the flow of how a generative model goes from training data → learned pattern → new content creation.

Include a simple analogy  (for example, “it's like a chef who, after learning many recipes, invents new dishes by combining known ingredients”).

Expand the examples section  with a single case that is developed throughout the text, as we did with “Café Andino” in the other document.

Connecting with the reader : Add a short final section with “What you can do today to start experimenting with generative AI” (3 simple steps).

In short, your text is already  accurate, educational, and educational . With a few visual elements and a unique narrative thread, you could turn it into a more interactive and memorable resource, ideal for presentations or training materials.

Copyright © 2024
Josavere