Skip to content

Writing prompts

Structure task, context, criteria, and format to get more reliable responses.

Updated on Aug 09, 2026

A good prompt turns an intention into verifiable criteria. Start with a simple instruction, observe the failures in your real cases, and add only the context needed to correct them.

  1. 1

    Task

    State what must be produced: classify, summarize, compare, extract, or propose.

  2. 2

    Context

    Provide the data that supports the answer and define the allowed sources.

  3. 3

    Criteria

    Explain what makes an answer correct and how to handle missing or ambiguous information.

  4. 4

    Format

    Define fields, order, length, language, and an example when useful.

system.txt
Você analisa chamados de suporte.

Classifique em: cobranca, tecnico ou conta.
Use somente informações presentes na mensagem; quando faltarem dados, use null.
Responda em JSON: {"categoria": string | null, "urgencia": 1 | 2 | 3 | 4 | 5, "resumo": string}.
O resumo deve ter no máximo 15 palavras.

Reliability practices

  • Put permanent rules in system and the current request in user.
  • Prefer specific criteria over vague adjectives such as "good" or "professional".
  • Ask for evidence when the answer depends on a document.
  • For important decisions, request a brief, verifiable justification, without requiring detailed internal reasoning.
  • Validate required formats, limits, and permissions in code.

Test the prompt as part of the product

Turn real examples into repeatable evaluations.

Was this page helpful?