How it works
From question to reply
- The customer asks. They send a question about Tunely.
- The AI finds relevant help articles. It looks for information that covers the question.
- It replies or hands off. A clear answer from help articles can become an automatic reply. Otherwise, the question goes to a support agent.
- A support agent replies. The agent sends the draft as-is, edits it, or writes their own reply.
When a person steps in
A support agent takes over when the AI is unsure, no help article covers the question, or the answer needs a staff-only internal note. The agent can write a new help article to cover a missing answer.
Problems with money or account security always go to a person: refunds, double charges, hacked or locked accounts, and fraud. Cancelling a plan, updating a card, and changing a password are routine how-to questions; the AI can reply when a help article clearly covers them.
After an automatic reply, the customer can ask for a person if they still need help. The same conversation goes to a support agent.
Architecture
- Web appNext.js and React render the customer chat, Agent seat, and public saved quality results. Server actions send requests to the API.
- APINode.js and Express validate visitor and owner sessions, enforce allowances, compute MiniLM embeddings, apply hand-off rules, and save decisions.
- Python serviceRetrieves relevant knowledge-base documents and calls the answer provider. Documents and questions are untrusted input; grounding and phrase-copy guards check the draft.
- DatabasePostgreSQL stores support tickets, help articles, staff-only internal notes, embeddings, reviews, allowances, and saved live evaluation results.
Deployment
Vercel runs the public web app, API, and Python service as on-demand functions; Neon hosts PostgreSQL. Only the web app is public. Provider keys stay in the Python service, and an internal secret protects service calls.
Docker Compose runs all four services locally. Kubernetes runs long-lived containers in a temporary CI cluster, where browser tests use a fake provider. Kubernetes is not the public demo host.
Evidence and decisions
Saved answer checks include hand-off decisions, internal-note leak attempts, known failures, and a comparison of word matching against embeddings. These small benchmarks do not prove general accuracy or confidentiality.
Tunely is a fictional music streaming company. This portfolio demo uses fictional support requests and documents, with no real customers or production-scale claims.
Each visitor gets a temporary private workspace. The owner alone can change shared documents and start paid live evaluations. Browsing saved cases and fixture results makes no paid AI calls. Replies stay in the conversation; no email is sent.