InferenceIndex

Early access · Private preview

Cookbook

Support triage

Send a new ticket, get back the queue, the tags, and the reply you would send.

The same kinds of tickets come in all day, and they get sorted and tagged the same way. On our tests, one repeat of this job took about 0.5s and $0.00009, versus about 10s and $0.012 for a frontier agent.

A new ticket in, queue, tags, and reply back

The job

  • New each run: the customer, the order, and what went wrong.
  • Same each run: your queues, your tags, and your reply policy.

The call

python
import json
from openai import OpenAI

client = OpenAI(api_key="YOUR_KEY", base_url="https://api.inferenceindex.com/v1")

POLICY = """Queues: billing, shipping, account, bug, other.
Return JSON with keys: queue, tags (list), priority (low|normal|urgent), reply_draft."""

def triage(ticket: str) -> dict:
    response = client.chat.completions.create(
        model="workflow/auto",
        messages=[
            {"role": "system", "content": "You triage support tickets. " + POLICY},
            {"role": "user", "content": ticket},
        ],
    )
    return json.loads(response.choices[0].message.content)

What comes back

An example reply for "I was charged twice for order 1842":

json
{
  "queue": "billing",
  "tags": ["refund", "duplicate-charge"],
  "priority": "normal",
  "reply_draft": "Sorry about that. I can see two charges on order 1842 and have started a refund for the duplicate."
}

In production

  • Route by queue in your own code, the same way you do today.
  • Keep the queue list in the system prompt fixed. If you change it, those tickets can go to your fallback model.
  • Tickets about something new go to your fallback model.