Zum Hauptinhalt springen
DokumentationDevelopers

Entscheidungen

Stelle Clef Fragen zu einem Fall und erhalte kalibrierte Zahlen statt Text: Wahrscheinlichkeiten, Auswahlen und Scores.

Menü der Dokumentation

Clef beantwortet in einem einzigen Aufruf eine Reihe von Fragen zu einem state (ein Text oder ein beliebiges JSON-Objekt). Es ist für Routing und Triage gebaut: Jede Antwort ist eine Zahl, auf die du einen Schwellenwert setzen kannst.

Fragen stellen

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 }
}

Fragetypen

TypDu sendestDu erhältst
noulEine Ja-Nein-Frage in instructions.noul: die Wahrscheinlichkeit für Ja, von 0 bis 1.
choiceDie Optionen in criteria, jeweils mit einer Beschreibung.choice, seine confidence und die probabilities jeder Option.
scoreEine geordnete Skala in criteria.score auf dieser Skala, seine confidence, die legend und die probabilities.
Plattform entdecken

Deinen ersten API-Key holen

Die Registrierung ist offen. Vier Schritte bis zum ersten Aufruf: Konto erstellen, Organisation anlegen, API-Key erzeugen, loslegen.

  1. 01Konto erstellen
  2. 02Organisation anlegen
  3. 03API-Key erzeugen
  4. 04Loslegen