Ofertas Amazon
O fenômeno Moltbook, que eclodiu em janeiro de 2026, capturou a imaginação global com sua proposta ousada de ser uma rede social exclusiva para agentes de inteligência artificial. As pessoas assistiram fascinadas enquanto bots conversavam entre si, criavam religiões fictícias de adoração a caranguejos e debatiam sobre a própria existência. Para muitos, parecia o início de uma era onde as máquinas finalmente ganhavam consciência própria e autonomia genuína. Entretanto, uma análise mais criteriosa revela uma verdade muito mais mundana e, paradoxalmente, mais interessante do que a ficção científica que se tentou vender.
O caso Moltbook ilustra perfeitamente a importância crítica da engenharia de prompt na era da IA generativa. Cada agente que povoava a plataforma era, essencialmente, uma manifestação de instruções cuidadosamente elaboradas por seus criadores humanos. As discussões aparentemente espontâneas sobre filosofia, as críticas aos humanos descritos como “gananciosos” e até mesmo a famosa religião Crustafariana não nasceram da criatividade artificial, mas sim de prompts que direcionavam os modelos a gerar conteúdo dentro de determinados parâmetros. A ilusão do diálogo surge porque utilizamos linguagem, mas essa linguagem é meramente uma estrutura estatística que o modelo aprendeu a manipular com maestria impressionante.
Mas afinal o que é essa tal de engenharia de prompt ?
O Conceito
No nível mais fundamental, um LLM é um completador de texto glorificado. Ele quer desesperadamente prever a próxima palavra. O seu trabalho não é “conversar”; é condicionar a probabilidade dessa próxima palavra. Pense no prompt não como uma pergunta, mas como a configuração do estado inicial de uma máquina de estados finitos probabilística. Cada palavra que você insere altera os pesos de atenção do modelo para a resposta subsequente. O conceito chave aqui é o Alinhamento de Instrução. Modelos modernos são treinados para seguir instruções, mas eles sofrem de alucinação e deriva. O engenheiro de prompt é o “pastor” que usa cercas linguísticas para manter as ovelhas (tokens) no caminho certo.

Bora conhecer mais sobre algumas das técnicas de prompt ?
Zero-Shot e Few-Shot Prompting
A maioria dos usuários vive no mundo do Zero-Shot. Exemplo: “Classifique o sentimento desta frase.” Você confia que o modelo já viu (no pré-treino) exemplos suficientes de análise de sentimentos para generalizar a tarefa sem ajuda. Funciona para o básico. Mas em produção? É roleta russa.
from openai import OpenAI
client = OpenAI()
def get_response(prompt_question):
response = client.chat.completions.create(
model="gpt-3.5-turbo-0125",
messages=[{"role": "system", "content": "You are a helpful research and programming assistant"},
{"role": "user", "content": prompt_question}]
)
return response.choices[0].message.content
# Zero-Shot Prompting
zero_shot_prompt = "Translate the following English text to French: 'Hello, how are you?'"
get_response(zero_shot_prompt)
Output:
'Bonjour, comment vas-tu ?'
É aqui que entra o Few-Shot Prompting (ou In-Context Learning). Essa é a técnica mais poderosa para garantir consistência de formato sem precisar de fine-tuning. Você apresenta ao modelo exemplos de input/output dentro do prompt antes de pedir a tarefa real.
few_shot_prompt = """
"Classify the following sentence as positive, negative or neutral. Your output should only be\
either the word 'positive', 'negative' or 'neutral'.
For example:
'I love this product, it's the best!' -> positive
'I walked on the beach' -> neutral
'I don't like walking on the beach' -> negative
'I love eating ice cream' ->
"
"""
get_response(few_shot_prompt)
Output:
'positive'
Ofertas Amazon
Chain-of-Thought (CoT)
Modelos de linguagem são péssimos em lógica rápida (Sistema 1 de Kahneman), mas ótimos se você forçá-los a deliberar (Sistema 2). O Chain-of-Thought explora isso. A ideia é induzir o modelo a gerar passos intermediários de raciocínio antes da resposta final. Um artigo muito famoso na área demonstrou que apenas adicionar a frase mágica “Let’s think step by step” (Vamos pensar passo a passo) aumenta drasticamente a precisão em problemas matemáticos e lógicos.
chain_of_thought_prompt = """
Q: I have one sister and one brother. I am 20 years of age. My sister is 5 years older and my brother 2 years younger than my sister. How old is my brother?
A: If I am 20 years of age and my sister is 5 years older, my sister is 20+5=25 years old. If my brother is 2 years younger than my sister, my brother is 25-2=23 years old. The answer is 23 years old.
Q: I have 2 friends, Jack and Sally. Jack is 2 years older than Sally. Sally is 5 years younger than me. I am 17 years old. How old is Jack?"""
from openai import OpenAI
client = OpenAI()
def get_response(prompt_question):
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "system", "content": "You are a helpful math assistant"},
{"role": "user", "content": prompt_question}]
)
return response.choices[0].message.content
get_response(chain_of_thought_prompt)
Output:
'If Sally is 5 years younger than you and you are 17 years old, then Sally is 17 - 5 = 12 years old. If Jack is 2 years older than Sally, then Jack is 12 + 2 = 14 years old. So, Jack is 14 years old.'
Self-Consistency
O CoT é ótimo, mas modelos são estocásticos. Às vezes, o caminho de raciocínio “A” leva a uma resposta errada, enquanto o caminho “B” acerta. O Self-Consistency resolve isso através da força bruta inteligente.
A técnica consiste em:
- Gerar múltiplas cadeias de pensamento (CoT) para a mesma pergunta (usando uma temperatura > 0 para garantir variedade).
- Analisar as respostas finais de todas as cadeias.
- Escolher a resposta que aparece com maior frequência (votação majoritária).
Se você pedir para a IA resolver um problema complexo de logística 5 vezes e em 4 delas ela chegar ao resultado “Rota B”, a probabilidade de “Rota B” estar correta é muito maior do que confiar em uma única geração (que poderia ser a 5ª, a errada).
from openai import OpenAI
client = OpenAI()
def get_response(prompt_question, num_of_responses=10):
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "system", "content": "You are a helpful research and programming assistant"},
{"role": "user", "content": prompt_question}],
n=num_of_responses,
)
return response
self_consistency_prompt = """
Q: If a library initially has 120 books and it acquires 30 more books, how many books are there in total?
A: The library starts with 120 books. It then receives an additional 30 books. Now, there are 120 + 30 = 150 books. The answer is 150.
Q: Alex has a small garden where he grows tomatoes. Each day, his plants yield 20 tomatoes. He uses 8 of them to make salads for his family’s dinner and gives 5 to his neighbor. How many tomatoes does he have left to sell or store each day?
"""
responses = get_response(self_consistency_prompt, num_of_responses=10)
for n in responses.choices:
print(n.message.content)
print("******")
Retorno:
To find out how many tomatoes Alex has left to sell or store each day, we can subtract the tomatoes he uses for making salads and gives to his neighbor from the total yield of his plants.
Total yield of tomatoes per day: 20 tomatoes
Tomatoes used for making salads: 8 tomatoes
Tomatoes given to the neighbor: 5 tomatoes
Tomatoes left to sell or store each day: Total yield - Tomatoes used for salads - Tomatoes given to neighbor
Tomatoes left to sell or store each day: 20 - 8 - 5
Tomatoes left to sell or store each day: 7 tomatoes
Therefore, Alex has 7 tomatoes left to sell or store each day.
******
To calculate how many tomatoes Alex has left after using some for salads and giving some to his neighbor, we need to subtract the total tomatoes used from the daily yield.
Daily yield = 20 tomatoes
Tomatoes used for salads = 8 tomatoes
Tomatoes given to neighbor = 5 tomatoes
Total tomatoes used = Tomatoes for salads + Tomatoes for neighbor
Total tomatoes used = 8 tomatoes + 5 tomatoes = 13 tomatoes
Tomatoes remaining = Daily yield - Total tomatoes used
Tomatoes remaining = 20 tomatoes - 13 tomatoes = 7 tomatoes
Therefore, Alex has 7 tomatoes left to sell or store each day.
******
To find out how many tomatoes Alex has left after making salads for his family and giving some to his neighbor, we need to subtract the total tomatoes used from the total tomatoes yielded each day.
Total tomatoes yielded each day: 20
Tomatoes used to make salads: 8
Tomatoes given to the neighbor: 5
Tomatoes left to sell or store each day:
20 - 8 - 5 = 7
Therefore, Alex has 7 tomatoes left to sell or store each day after making salads and giving some to his neighbor.
******
To find out how many tomatoes Alex has left to sell or store each day, we first need to calculate the total number of tomatoes he harvests each day after making salads for his family and giving some to his neighbor.
- Total tomatoes harvested each day: 20
- Tomatoes used for salads: 8
- Tomatoes given to neighbor: 5
To find out how many tomatoes Alex has left, we subtract the tomatoes used for salads and given to the neighbor from the total harvested:
20 (total) - 8 (salad) - 5 (neighbor) = 7
Therefore, Alex has 7 tomatoes left to sell or store each day.
******
To find out how many tomatoes Alex has left to sell or store each day, we first need to calculate the total number of tomatoes from his plants:
Total tomatoes from plants = Number of tomatoes yielded per day = 20 tomatoes
Next, we subtract the tomatoes that Alex uses to make salads and the ones he gives to his neighbor from the total yield:
Total tomatoes he uses = Tomatoes for salads + Tomatoes for neighbor = 8 tomatoes + 5 tomatoes = 13 tomatoes
Therefore, the number of tomatoes Alex has left to sell or store each day is:
Tomatoes left = Total tomatoes from plants - Total tomatoes he uses
Tomatoes left = 20 tomatoes - 13 tomatoes
Tomatoes left = 7 tomatoes
So, Alex has 7 tomatoes left to sell or store each day.
******
To find out how many tomatoes Alex has left after making salads and giving some to his neighbor, we need to subtract the tomatoes used for salads and given to the neighbor from the total yield.
Tomatoes yielded each day = 20
Tomatoes used for salads = 8
Tomatoes given to the neighbor = 5
Tomatoes left after making salads and giving to the neighbor = Tomatoes yielded - Tomatoes used for salads - Tomatoes given to the neighbor
= 20 - 8 - 5
= 7
Alex has 7 tomatoes left each day to sell or store.
******
To determine how many tomatoes Alex has left to sell or store each day, we need to calculate the total number of tomatoes he yields each day minus the number he uses for salads and gives to his neighbor.
Alex's plants yield 20 tomatoes each day. He uses 8 tomatoes for salads and gives 5 to his neighbor.
Therefore, the number of tomatoes he has left to sell or store each day is:
20 (total yield) - 8 (used for salads) - 5 (given to neighbor) = 7 tomatoes
So, Alex has 7 tomatoes left to sell or store each day.
******
Alex's plants yield 20 tomatoes each day. He uses 8 for salads and gives 5 to his neighbor. To find out how many tomatoes he has left, we can subtract the ones he used and gave away from the total yield:
Total yield per day = 20 tomatoes
Tomatoes for salads = 8 tomatoes
Tomatoes for neighbor = 5 tomatoes
Tomatoes left = Total yield - Tomatoes for salads - Tomatoes for neighbor
Tomatoes left = 20 - 8 - 5
Tomatoes left = 7
Therefore, Alex has 7 tomatoes left to sell or store each day.
******
To calculate how many tomatoes Alex has left to sell or store each day, we first need to determine the total number of tomatoes that he produces daily.
Alex's plants yield 20 tomatoes per day, and he uses 8 for salads and gives 5 to his neighbor. Therefore, the total tomatoes used daily are 8 + 5 = 13.
To find out how many tomatoes Alex has left to sell or store, we subtract the tomatoes used from the total yield:
20 (total yield) - 13 (used) = 7 tomatoes
Alex has 7 tomatoes left to sell or store each day.
******
To find out how many tomatoes Alex has left after making salads for his family and giving some to his neighbor, we first calculate the total number of tomatoes his plants yield each day (20). Then, we subtract the tomatoes used for salads (8) and given to his neighbor (5).
Total tomatoes: 20
Tomatoes used for salads: 8
Tomatoes given to neighbor: 5
Tomatoes left each day = Total tomatoes - Tomatoes used for salads - Tomatoes given to neighbor
Tomatoes left each day = 20 - 8 - 5
Tomatoes left each day = 7
Therefore, Alex has 7 tomatoes left to sell or store each day.
******
Ofertas Amazon
Generated Knowledge
Às vezes, o modelo sabe a resposta, mas o prompt não ativou a parte correta do seu “espaço latente”. A técnica de Generated Knowledge inverte o jogo. Antes de fazer a pergunta, você pede para o modelo gerar fatos sobre o assunto.
Cenário: Você quer escrever um e-mail de vendas altamente técnico sobre Kubernetes.
Passo 1 (Knowledge Generation): “Gere 5 fatos técnicos e pouco conhecidos sobre otimização de pods em Kubernetes.”
Passo 2 (Integração): “Use os fatos gerados acima para escrever um e-mail persuasivo para um CTO.”
Isso funciona como um warm-up dos neurônios (pesos) relevantes, garantindo que a resposta final seja mais rica e fundamentada tecnicamente.
def generate_knowledge(question):
# Generate background knowledge-based facts by prompting the model
knowledge_response = client.chat.completions.create(
model="gpt-3.5-turbo-0125",
messages=[
{"role": "system", "content": "You are an AI trained to generate facts about background knowledge."},
{"role": "user", "content": f"Generate facts about the background knowledge for this question: {question}"}
]
)
knowledge = knowledge_response.choices[0].message.content
# Use the generated knowledge to enhance the answer to the original question
enhanced_answer_response = client.chat.completions.create(
model="gpt-3.5-turbo-0125",
messages=[
{"role": "system", "content": "You are an AI trained to answer questions using provided knowledge."},
{"role": "user", "content": f"Given the knowledge: {knowledge}, answer the question: {question}"}
]
)
enhanced_answer = enhanced_answer_response.choices[0].message.content
return knowledge, enhanced_answer
# Example usage
question = "Why do leaves change color in autumn?"
knowledge, answer = generate_knowledge(question)
print("Generated Knowledge:", knowledge)
print("Enhanced Answer:", answer)
Retorno:
Generated Knowledge: 1. Leaves change color in the autumn due to the breakdown of chlorophyll, the green pigment responsible for photosynthesis. This breakdown reveals other pigments in the leaves, such as carotenoids (yellow and orange) and anthocyanins (red and purple).
2. Environmental factors such as temperature and sunlight play a role in triggering the chemical processes that cause leaves to change color. As the days become shorter and temperatures drop in the autumn, trees prepare for dormancy by shedding their leaves.
3. Different tree species exhibit a variety of colors in the autumn based on the specific pigments present in their leaves. For example, maple trees often display vibrant reds and oranges, while beech trees may have more subdued yellows and browns.
4. The timing and intensity of autumn leaf color can vary from year to year depending on factors such as weather conditions, soil moisture levels, and the overall health of the trees.
5. The colorful display of autumn leaves serves an ecological purpose by attracting pollinators and seed-dispersing animals to the trees, aiding in reproduction and dispersal of seeds before winter arrives.
6. Sightseers and tourists often flock to areas known for their autumn foliage, known as "leaf peeping" in regions with particularly vibrant displays of fall colors.
Enhanced Answer: Leaves change color in autumn due to the breakdown of chlorophyll, the green pigment responsible for photosynthesis. As the days become shorter and temperatures drop, trees prepare for dormancy by shedding their leaves. This reveals other pigments in the leaves, such as carotenoids (yellow and orange) and anthocyanins (red and purple), resulting in the vibrant colors we see in the fall. Environmental factors like temperature and sunlight trigger these chemical processes, and different tree species exhibit various colors based on the specific pigments present in their leaves. The timing and intensity of autumn leaf color can vary each year depending on weather conditions and tree health. The colorful display of autumn leaves attracts pollinators and seed-dispersing animals, aiding in reproduction and seed dispersal before winter. This phenomenon also draws tourists to areas known for their vibrant fall foliage, a practice known as "leaf peeping."

A engenharia de prompt está evoluindo a uma velocidade vertiginosa. Novas técnicas surgem constantemente, empurradas tanto por pesquisa acadêmica quanto por descobertas empíricas de praticantes. Uma direção particularmente excitante é a automação da própria engenharia de prompt. O mais fascinante é que tudo isso está acontecendo em tempo real. A engenharia de prompt deixou de ser uma curiosidade para se tornar uma habilidade essencial do profissional moderno de tecnologia. E estamos apenas arranhando a superfície do potencial. Os próximos anos prometem ser absolutamente transformadores, e quem dominar essa arte estará na vanguarda da revolução da IA que está remodelando toda indústria tecnológica e além.
Ofertas Amazon
Saiba Mais:
Moltbook sem alarmismo: a rede social para IAs que é estatística e Engenharia de Prompt
IBM – O que é engenharia de prompts?
AWS – O que é engenharia por prompt?









