We built an AI copilot that drafts the first reply to every customer support ticket, cutting median response time from 18 minutes to under 90 seconds without sacrificing quality.
The problem
The client's support team was being crushed by a 4× spike in ticket volume after a product launch. Hiring couldn't scale fast enough, and the quality of replies started to slip as agents triaged faster and faster.
What we built
A retrieval-augmented copilot that sits inside the existing helpdesk. Each new ticket triggers a Supabase edge function that:
- Embeds the ticket using the OpenAI embeddings API.
- Retrieves the most relevant historical resolutions + product docs.
- Drafts a reply in the brand voice, tagged with the source documents.
- Surfaces the draft to the agent for one-click approval, edit, or send.
Outcomes
- Median first response time: 18 min → 87 seconds.
- Agent throughput up 2.4× with the same headcount.
- 94% of drafted replies are sent with zero or one-line edits.
Stack notes
The retrieval index lives in pgvector alongside the rest of the data. We avoided introducing a separate vector DB to keep ops surface minimal and let RLS govern who sees what.