Pular para o conteúdo

O conteúdo principal desta página está em inglês.Traduzir esta página

IA generativa

How Generative AI Works (No Maths Required)

Tokens, training, transformers and diffusion explained simply, plus why AI sometimes makes things up and how to get better answers.

Pela redação do IQrows · Atualizado · 2 min de leitura

Compartilhar
A robot hand feeding itself a spoonful of computer parts
Foto: Pexels

Generative AI can write, draw, talk and code. Here’s what’s actually happening behind the scenes.

Text models predict the next piece of text

A large language model (LLM) reads text as small chunks called tokens, roughly parts of words. During training it sees enormous amounts of text and learns to predict the next token. Doing that well forces it to pick up grammar, facts, reasoning patterns and style.

When you ask a question, the model generates an answer one token at a time, each time choosing a likely next token given everything so far.

Transformers: the key idea

Most modern models use the transformer architecture, introduced by Google researchers in 2017. Its core trick, called attention, lets the model weigh how every word relates to every other word in the input, which is why it handles long, complex prompts so well.

From raw model to helpful assistant

A freshly trained model just continues text. To make it a useful assistant, developers fine-tune it on examples of good answers and use human feedback to reward helpful, honest and safe responses. Many assistants can also use tools, such as web search, code execution or your apps, which leads to agentic AI.

Images: starting from noise

Most image generators use diffusion. During training, the model learns to remove noise from images. To create a picture, it starts with random noise and removes it step by step, guided by your prompt, until an image appears.

Why AI sometimes makes things up

Because LLMs predict plausible text, they can produce confident answers that are wrong, known as hallucinations. To reduce them:

  • Ask for sources, or use a search-based tool such as Perplexity.
  • Give it the facts to work from: paste the document or data.
  • Check anything important.

Get better results

Clear prompts help: set a role, give context, describe the task, the audience and the format you want. Our free Gerador de prompts de IA builds structured prompts for you.

Next: The biggest recent AI updates.

#generative ai#llm#how ai works#prompts

Perguntas frequentes

Why does generative AI make mistakes?

Language models predict likely text rather than look facts up, so they can produce confident but wrong answers, often called hallucinations. Asking for sources, using tools with web search and checking important facts reduces the risk.

Continue lendo

Compartilhe esta página