GPT means Generative Pre-trained Transformer, in Portuguese, generative pre-trained transformer. It is the name of a family of language models created by OpenAI, and it has also come to be used to describe this type of architecture in general.
How it works
Each word in the name explains part of the idea:
- Generative: the model generates new content, such as text and code.
- Pre-trained: before any use, it learns language patterns by reading huge volumes of text.
- Transformer: the neural network architecture that uses the attention mechanism to understand how words relate in a context.
In practice, the model predicts what is the next most likely piece of text, repeatedly, until it forms a complete response. After pre-training, the company can fine-tune the model to follow instructions and converse in a useful and safe way.
ChatGPT is a chat product built on GPT models. The models are also available via API for developers. Versions and names change frequently, so check the official OpenAI documentation for the current models.
Practical example
You have a store and want automatic responses to customer reviews. Your system sends the review text to a GPT model via the API, with the instruction "respond politely and propose a solution". The model returns a draft, which you review before publishing.
The structure of the call is usually like this:
{
"model": "NOME_DO_MODELO",
"messages": [
{"role": "user", "content": "Responda esta avaliação com educação: ..."}
]
}The model name and exact format depend on the current API version.
What it's for
GPT-type models are used for language tasks:
- Write, summarize and translate texts.
- Generate and explain code.
- Answer questions about documents.
- Serve as the brain for AI agents, which use the model to decide steps and call tools.
Difference between GPT and LLM
LLM is the category: any large language model. GPT is a specific family of LLMs, from OpenAI, with transformer architecture. Every GPT is an LLM, but not every LLM is a GPT.
Cautions
Generative models can make mistakes and invent information confidently. Review important responses and do not send sensitive data without understanding the service's privacy policy.