Use Case · Customer Support

AI Customer Support: Build a Support Bot That Resolves 70% of Tickets

A production-grade support pipeline with ticket triage, instant RAG answers, human handoff and CSAT measurement. Cut cost-per-ticket to ~$2.50 while keeping your customers happy — all on one OpenAI-compatible API.

Updated Aug 16, 2026 · Start building free →

Scenario overview

Tier-1 support is repetitive: refund requests, shipping status, password resets, "how do I…?" questions. A well-tuned LLM resolves the predictable 70% of tickets instantly, escalates the messy 30% to humans, and writes the first draft of every reply — so agents handle exceptions, not boilerplate. The result is a 5–10× increase in tickets per agent and dramatic improvements in first-response time.

Auto triageInstant replyRAG knowledge baseHuman handoffCSAT scoringMultilingual

Architecture (text version)

1
IngestUser message lands in your ticketing system (Zendesk, Help Scout, Intercom webhook) or DrAI chat endpoint. Capture thread context + customer metadata.
2
ClassifyLightweight model (gpt-5-mini or deepseek-chat) tags intent, urgency, product area, sentiment. ~50 ms latency, sub-cent per call.
3
Retrieve (RAG)Embed the question, search your knowledge base via /v1/embeddings + vector store (pgvector, Qdrant, Pinecone). Return top-k relevant docs.
4
Answer (LLM)Strong model (gpt-5 or claude-sonnet-4) answers, grounded in retrieved context, with citations. Low confidence → handoff. Tool intents (refund, status) → function-calling.
5
Act or escalateAuto-actions via functions (issue refund, reset password). Sensitive or ambiguous cases send a draft + context to a human agent in seconds.
6
Score CSATPost-resolution, an LLM call auto-rates satisfaction from the transcript. Low scores trigger supervisor review.

Code & configuration

Triage — classify intent & urgency

curl https://api.dr-ai.top/v1/chat/completions \
  -H "Authorization: Bearer sk-***" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5-mini",
    "messages": [
      {"role": "system", "content": "Classify the support ticket. Reply ONLY JSON: {intent, urgency: 1-5, sentiment, product_area, confidence}"},
      {"role": "user", "content": "...ticket text..."}
    ],
    "response_format": {"type": "json_object"},
    "temperature": 0.2
  }'

RAG-grounded answer (Python)

from openai import OpenAI
client = OpenAI(base_url="https://api.dr-ai.top/v1", api_key="sk-***")

def embed(text):
    return client.embeddings.create(model="text-embedding-3-small", input=text).data[0].embedding

def rag_answer(ticket, kb_chunks):
    q = embed(ticket)
    hits = vector_search(q, kb_chunks, k=5)             # pgvector / Qdrant
    ctx = "\n\n".join(h["text"] for h in hits)
    r = client.chat.completions.create(
        model="gpt-5",
        messages=[
            {"role": "system",
             "content": f"Answer using ONLY this context. If it is insufficient, say "'I will escalate this to an agent."'"\n             f"\n\n{ctx}"},
            {"role": "user", "content": ticket},
        ],
        temperature=0.3, stream=True,
    )
    for chunk in r:
        if chunk.choices[0].delta.content:
            yield chunk.choices[0].delta.content

ROI data

MetricManual tier-1AI-assisted
Cost per resolved ticket$15.00$2.50
First-response time (P50)~6 hrs~3 sec
Tickets resolved without human0%70%
CSAT (after tuning)86%89%
Agents → 10k tickets/week123

Conservative: a 1,000-ticket/week support team spends ~$15,000/week on manual handling; an AI front line drops that to ~$2,500/week (mostly DrAI subscription), about 83% reduction in direct support cost — freeing skilled agents for high-value escalations.

Deploy your support bot

Grab an API key, wire your knowledge base, and watch first-response time drop to seconds.

Get Started — freeRead the Quickstart
🌐 English