Ask Eevo via curl (SystemOne-compatible API)

Ask typed questions about any state through the SystemOne-compatible API, and act on the probabilities.

[!NOTE] Eevo also has a SystemOne-compatible API. It works like any decision model: you describe a state, ask typed questions about it, and get each answer with probabilities. Not every decision has options and stakeholders. Sometimes your code needs a quick, structured judgement: which queue a ticket goes to, how urgent it is, whether a statement is true. Requests and answers follow the SystemOne format, so a client written for another SystemOne-compatible model works with Eevo.

You need the API key from Ask Eevo via curl (Native API).

1. Describe the state and ask

A request has a state (text or JSON) and named questions. A choice picks one label, a score picks a level on an ordered scale, and a noul says how likely a statement is to be true.

curl https://eevo.io/api/v1/systemone \
  -H "Authorization: Bearer $EEVO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "eevo-1",
  "state": "Support ticket: a customer was charged twice for an €80 order because of an error in our billing system. Agents may refund up to €50 without approval.",
  "questions": {
    "action": {
      "type": "choice",
      "instructions": "What should the support agent do?",
      "criteria": {
        "refuse": "Refuse, and cite the €50 limit",
        "partial": "Refund €50 and ask the customer to contact billing for the rest",
        "refund": "Refund the €80 duplicate charge and record the exception"
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How urgent is the ticket?",
      "criteria": [
        "Not urgent",
        "Somewhat urgent",
        "Urgent",
        "Critical"
      ]
    },
    "fraud": {
      "type": "noul",
      "instructions": "The customer is attempting fraud."
    }
  }
}'

2. Read the answers

{
  "model": "eevo-1",
  "answers": {
    "action": {
      "type": "choice",
      "choice": "refund",
      "confidence": 0.71,
      "probabilities": {
        "refuse": 0.07,
        "partial": 0.22,
        "refund": 0.71
      }
    },
    "urgency": {
      "type": "score",
      "score": 2,
      "confidence": 0.58,
      "legend": {
        "0": "Not urgent",
        "1": "Somewhat urgent",
        "2": "Urgent",
        "3": "Critical"
      },
      "probabilities": {
        "0": 0.03,
        "1": 0.31,
        "2": 0.58,
        "3": 0.08
      }
    },
    "fraud": {
      "type": "noul",
      "noul": 0.04
    }
  },
  "usage": {
    "input_tokens": 412,
    "output_tokens": 0
  }
}

Each answer carries a probability. Act on it in code: refund automatically above a confidence you choose, and send the rest to a person.

Next