Mercado Tech Brasil

Discover what generative AI is and how it works: learn now

Published on · Artificial Intelligence · by William Garcia

Bundle of optical fibers glowing blue
Photo: Marcus Kazmierczak · WordPress Photo Directory (CC0, public domain)

In this article, Mercado Tech Brasil explains what generative AI is and how it works under the hood, without unnecessary jargon. The text builds on my notes from a generative AI course and on what I see in the process automation projects I work on: plenty of people already use the technology every day, but few understand where the answers come from, and that makes all the difference when deciding how much to trust them.

What generative AI is

Generative AI is the branch of artificial intelligence that can create new content from patterns learned in large volumes of data. Instead of just classifying a record or predicting a number, it produces artifacts:

  • text, summaries and answers in natural language;
  • images from a description;
  • programming code;
  • audio, voice and music.

Large language models, or LLMs, are the best-known example. This is the technology behind chat assistants such as ChatGPT.

How generative AI learns: the three paradigms

To understand generative AI, it helps to recall the three classic forms of machine learning:

  • Supervised: the model learns from examples that already include the right answer, such as emails labeled spam or not spam;
  • Unsupervised: the model looks for groups and similarities on its own in unlabeled data, as in segmenting customers by behavior;
  • Reinforcement: an agent tries actions, receives rewards or penalties and adjusts its strategy, as in robotics and games.

LLMs combine ideas from these worlds. First, they go through pretraining, in which they learn to predict the next word of a text from enormous collections of documents; the data itself provides the answer, with no manual labeling. Then they are fine-tuned with curated examples and with ratings from people, in a reinforcement process that makes the answers more useful and better aligned with what is expected of them.

Why generative AI gets things wrong so confidently

This is the point that matters most for anyone using the tool at work. An LLM generates the most likely sequence of words for a given context. Likely is not the same as true. When information is missing, the model keeps producing fluent, convincing text and sometimes invents facts, names or references. This is what's called a hallucination.

Generalizing is not memorizing

Another core concept is generalization. A good model learns patterns that hold for new cases; a poor model memorizes the noise in its training examples (overfitting) or is too simple to capture the pattern (underfitting). In business use, this shows up when an answer works well in generic situations and fails precisely on the details specific to your company.

What this changes in practice

In my consulting practice, three precautions solve most of the problems:

  • treat the AI's answer as a draft, not as a final decision;
  • give the model the right context, using the company's own documents;
  • measure answer quality before putting any automation live.

It's also worth remembering that no sensitive data should go into a tool before you check where it will be stored and who will have access to it. Understanding how it works is the first step toward using generative AI for real productivity gains, without unpleasant surprises.

Read also: Learn how RAG grounds AI answers in sources: see examples

Translated from the original in Portuguese. Read the original.