API request examples

POST /v1/systemone

Noul

Support escalation

{
  "model": "daoshu",
  "state": "I have asked three times now. Can I please just talk to a real person?",
  "questions": {
    "is_human_escalation": {
      "type": "noul",
      "instructions": "Is the customer asking for a human agent?"
    },
    "is_repeat_contact": {
      "type": "noul",
      "instructions": "Has the customer reached out about this issue before?",
      "criteria": {
        "true": "The customer mentions contacting support previously.",
        "false": "The message reads like a first contact."
      }
    }
  }
}

Flight refund request

{
  "model": "daoshu",
  "state": {
    "ticket_message": "My flight was cancelled. Can I get a refund?",
    "refund_policy": "Cancelled flights are eligible for a full refund."
  },
  "questions": {
    "refund_requested": {
      "type": "noul",
      "instructions": "Does `ticket_message` request a refund?"
    }
  }
}

Choice

Route a support ticket

{
  "model": "daoshu",
  "state": "The running shoes I ordered are the wrong size. I'd like to exchange them for a size 10.",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "returns": "Exchanges, wrong or damaged items",
        "shipping": "Delivery status, delays, lost packages",
        "billing": "Charges, invoices, payment problems"
      }
    }
  }
}

Identify a programming language

{
  "model": "daoshu",
  "state": "def greet(name):\n    return f'Hello, {name}!'",
  "questions": {
    "language": {
      "type": "choice",
      "instructions": "Which programming language does this snippet use?",
      "criteria": {
        "python": null,
        "javascript": null,
        "typescript": null,
        "go": null,
        "rust": null,
        "other": null
      }
    }
  }
}

Score

Bug severity

{
  "model": "daoshu",
  "state": "Export crashes the settings page in Safari. Chrome works, but some customers only use Safari.",
  "questions": {
    "bug_severity": {
      "type": "score",
      "instructions": "How severe is the reported issue?",
      "criteria": [
        "Cosmetic; no impact to functionality",
        "Broken or degraded feature, but workaround exists",
        "Blocking issue; no workaround exists"
      ]
    }
  }
}

Customer frustration

{
  "model": "daoshu",
  "state": {
    "ticket_message": "My flight was cancelled. Can I get a refund?",
    "refund_policy": "Cancelled flights are eligible for a full refund."
  },
  "questions": {
    "frustration": {
      "type": "score",
      "instructions": "How much frustration does the customer express in `ticket_message`?",
      "criteria": [
        "States the situation calmly.",
        "Expresses concern in a civil way.",
        "Expresses anger or uses harsh language."
      ]
    }
  }
}