Saltar al contenido principal
DocumentaciónDevelopers

Decisiones

Hazle preguntas a Clef sobre un caso y obtén números calibrados en lugar de texto: probabilidades, opciones y puntajes.

Menú de la documentación

Clef responde un conjunto de preguntas sobre un state (un texto o cualquier objeto JSON) en una sola llamada. Está pensado para enrutamiento y triaje: cada respuesta es un número al que puedes ponerle un umbral.

Haz preguntas

curl
curl "$CCSIO_BASE_URL/systemone" \
  -H "Authorization: Bearer $CCSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "clef",
    "state": {
      "ticket": 4312,
      "message": "Production has been down for two hours. This is the third outage this month and we will cancel the contract unless someone calls today."
    },
    "questions": {
      "urgent": { "type": "noul", "instructions": "Does this ticket need an answer within the hour?" },
      "team": {
        "type": "choice",
        "instructions": "Which team should take this ticket?",
        "criteria": {
          "billing": "Invoices, payments and refunds.",
          "technical": "Outages, errors and how the product works.",
          "sales": "Plans, upgrades and contracts."
        }
      },
      "frustration": {
        "type": "score",
        "instructions": "How frustrated is the customer?",
        "criteria": ["Calm.", "Annoyed.", "Angry.", "About to leave."]
      }
    }
  }'
JSON
{
  "model": "clef",
  "answers": {
    "urgent": { "type": "noul", "noul": 0.9542 },
    "team": {
      "type": "choice",
      "choice": "technical",
      "confidence": 0.927,
      "probabilities": { "billing": 0.0175, "technical": 0.927, "sales": 0.0556 }
    },
    "frustration": {
      "type": "score",
      "score": 2.8823,
      "confidence": 0.8997,
      "legend": { "0": "Calm.", "1": "Annoyed.", "2": "Angry.", "3": "About to leave." },
      "probabilities": { "0": 0.0035, "1": 0.0104, "2": 0.0863, "3": 0.8997 }
    }
  },
  "usage": { "input_tokens": 382, "output_tokens": 0 }
}

Tipos de pregunta

TipoTú envíasTú recibes
noulUna pregunta de sí o no en instructions.noul: la probabilidad del sí, de 0 a 1.
choiceLas opciones en criteria, cada una con una descripción.choice, su confidence y las probabilities de cada opción.
scoreUna escala ordenada en criteria.score en esa escala, su confidence, la legend y las probabilities.
Explora la plataforma

Obtén tu primera key API

El registro está abierto. Cuatro pasos hasta tu primera llamada: crea tu cuenta, crea tu organización, crea tu API key y empieza a usarla.

  1. 01Crea tu cuenta
  2. 02Crea tu organización
  3. 03Crea tu API key
  4. 04Empieza a usarla