Agrupe o feedback de clientes em temas com citações, usando IA

Um agente lê respostas de pesquisas e devolve os principais temas com contagens e citações literais.

  • Arquivos
  • Limite de orçamento

Veja uma execução real

Uma execução real em 7 de out. de 2026, reproduzida. Modelo: openai/gpt-6-luna.

Concluídarun_16e8f6ea0b96505dd4d2615be299a35b$0.002898 de $0.03
  1. Na filaorçamento de $0.03 reservado
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell off · web off
  4. Arquivoread feedback.txt
  5. MicroVMmicroVM destroyed
  6. Concluída2 chamadas ao modelo, 2,542 tokensSaída gravada (em inglês)
    json
    {
      "themes": [
        {
          "name": "Dashboard and report speed",
          "sentiment": "positive",
          "count": 3,
          "response_numbers": [
            1,
            9,
            19
          ],
          "quote": "Love the new dashboard, much faster than before."
        },
        {
          "name": "Pricing and plan details",
          "sentiment": "negative",
          "count": 3,
          "response_numbers": [
            4,
            13,
            20
          ],
          "quote": "Pricing is confusing, I cannot tell which plan includes API access."
        },
        {
          "name": "Dark mode",
          "sentiment": "request",
          "count": 3,
          "response_numbers": [
            6,
            10,
            18
          ],
          "quote": "Please add dark mode."
        },
        {
          "name": "Support experience",
          "sentiment": "positive",
          "count": 2,
          "response_numbers": [
            3,
            12
          ],
          "quote": "Support answered in 10 minutes, great experience."
        },
        {
          "name": "CSV export failures",
          "sentiment": "negative",
          "count": 2,
          "response_numbers": [
            2,
            11
          ],
          "quote": "Export to CSV keeps timing out on big reports."
        },
        {
          "name": "Mobile app crashes",
          "sentiment": "negative",
          "count": 2,
          "response_numbers": [
            5,
            14
          ],
          "quote": "The mobile app crashes when I open reports."
        },
        {
          "name": "Excel import failures",
          "sentiment": "negative",
          "count": 2,
          "response_numbers": [
            7,
            17
          ],
          "quote": "Importing contacts from Excel failed twice with no error message."
        },
        {
          "name": "Finding and downloading invoices",
          "sentiment": "negative",
          "count": 2,
          "response_numbers": [
            8,
            16
          ],
          "quote": "Billing page is hard to find, I could not get my invoice."
        },
        {
          "name": "Easy onboarding",
          "sentiment": "positive",
          "count": 1,
          "response_numbers": [
            15
          ],
          "quote": "Onboarding was easy, I was running in 10 minutes."
        }
      ],
      "unthemed": []
    }
  7. Worker destruído$0.002898 cobrados, $0.027102 liberados
Modelo $0.000498 · Web $0.00 · Computação $0.0024

Execute você mesmo

Abra o exemplo no playground com a requisição inteira preenchida. Ele roda na sua própria conta, dentro do orçamento indicado, contra os mesmos sistemas de exemplo somente leitura.

Orçamento deste exemplo: $0.03

Como funciona

Cada tema tem uma contagem e pelo menos uma citação literal, então cada afirmação pode ser conferida no arquivo de origem. Elogios e reclamações ficam separados, e cada resposta é contada em um único tema.

O que o agente pode e não pode fazer

As permissões fazem parte da requisição. Tudo o que não está listado aqui não está disponível para a execução.

ConfiguraçãoPermitido
ConexõesNenhuma
WebDesativado
ShellDesativado
Arquivosfeedback.txt (somente leitura)
Retenção zero de dadosDesativada: o registro é mantido por 30 dias
Orçamento$0.03, um limite rígido
Tempo limite60 segundos

As credenciais nunca entram na máquina: um broker as adiciona a cada chamada e aplica os métodos acima.

O código

Esta é a requisição exata que o exemplo envia. Defina EPHEMERAL_API_KEY com uma chave de membro da sua organização.

curl -X POST $EPHEMERAL_URL/v1/runs \
  -H "Authorization: Bearer $EPHEMERAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @request.json

Arquivos na requisição

Enviados inline, então nada é carregado antes. O agente vê cada um como um arquivo somente leitura.

feedback.txt
feedback.txt
1. Love the new dashboard, much faster than before.
2. Export to CSV keeps timing out on big reports.
3. Support answered in 10 minutes, great experience.
4. Pricing is confusing, I cannot tell which plan includes API access.
5. The mobile app crashes when I open reports.
6. Please add dark mode.
7. Importing contacts from Excel failed twice with no error message.
8. Billing page is hard to find, I could not get my invoice.
9. The dashboard loads quickly now, nice work.
10. I would pay more for a dark theme, my eyes hurt at night.
11. CSV export is broken for anything over a few thousand rows.
12. Great support team, they fixed my issue same day.
13. Why does the Team plan cost so much more than Pro? The page does not explain it.
14. The app crashed on my phone again after the update.
15. Onboarding was easy, I was running in 10 minutes.
16. Could not find where to download invoices. Had to ask support.
17. Import from Excel silently drops rows with dates.
18. Dark mode please! The white background is too bright.
19. Reports are much faster, thank you.
20. Pricing page does not list the API limits for each plan.
Corpo completo da requisição request.json

O mesmo corpo, com os arquivos inline.

request.json
{
  "prompt": "feedback.txt holds 20 numbered customer comments. Group them into themes. Reply with one JSON object and nothing else: {\"themes\": [{\"name\": string, \"sentiment\": \"positive\"|\"negative\"|\"request\", \"count\": number, \"response_numbers\": number[], \"quote\": string}], \"unthemed\": number[]}. Every comment belongs to exactly one theme, so the counts add up to 20 together with unthemed. quote must be copied word for word from one of the theme's comments. Order themes by count, highest first.",
  "files": [
    {
      "path": "feedback.txt",
      "content": "1. Love the new dashboard, much faster than before.\n2. Export to CSV keeps timing out on big reports.\n3. Support answered in 10 minutes, great experience.\n4. Pricing is confusing, I cannot tell which plan includes API access.\n5. The mobile app crashes when I open reports.\n6. Please add dark mode.\n7. Importing contacts from Excel failed twice with no error message.\n8. Billing page is hard to find, I could not get my invoice.\n9. The dashboard loads quickly now, nice work.\n10. I would pay more for a dark theme, my eyes hurt at night.\n11. CSV export is broken for anything over a few thousand rows.\n12. Great support team, they fixed my issue same day.\n13. Why does the Team plan cost so much more than Pro? The page does not explain it.\n14. The app crashed on my phone again after the update.\n15. Onboarding was easy, I was running in 10 minutes.\n16. Could not find where to download invoices. Had to ask support.\n17. Import from Excel silently drops rows with dates.\n18. Dark mode please! The white background is too bright.\n19. Reports are much faster, thank you.\n20. Pricing page does not list the API limits for each plan.\n"
    }
  ],
  "shell": false,
  "timeout_seconds": 60,
  "max_cost_micros": 30000
}

Saiba mais

Exemplos relacionados

esc

Nada corresponde a “”.