Architecture Note · Operations & RevOps
Deterministic AI Tier-1 Support Resolution & Omnichannel Helpdesk
Why prompt-only helpdesk bots leak secrets and invent refund commitments—and the inbound-only, citation-grounded architecture with HTTP 409 human gates that keeps Tier-1 automation auditable.
The Problem: Multilingual Support Queues Meet Unbounded AI
Support organizations handling tickets across email, web chat, WhatsApp, and Slack Connect face two competing pressures: shrinking first-response SLAs across English, German, French, Japanese, and Spanish queues while keeping refunds, billing disputes, and security disclosures under strict human control. Dropping a general-purpose LLM directly onto an inbox trades ticket backlog for legal and financial exposure.
Why Naive AI Wrappers Fail in Service Operations
Prompt-engineered support bots break down along four operational fault lines when connected to live customer channels:
- Unverified commitments and policy drift: Fluent models routinely invent delivery guarantees, fee waivers, or refund approvals that contradict contract terms or live order manifests.
- PII and credential echo leakage: Customers paste IBANs, payment card PANs, and API tokens into tickets; naive wrappers echo those secrets back into outbound replies and logs.
- Nondeterministic routing and missing sign-off gates: Soft prompt instructions cannot stop an automated reply from closing a chargeback, account deletion, or security vulnerability claim without specialist review.
- No tamper-evident QA trail: Without deterministic scoring, immutable event chaining, and formula-safe exports, service leaders cannot prove why a ticket was deflected or who authorized an escalation.
The Deterministic Architecture That Fixes It
Our shipped Tier-1 helpdesk architecture isolates classification, retrieval, policy enforcement, and human sign-off inside a FastAPI and SQLite (WAL mode) boundary backed by tenant-scoped invite tokens.
- Inbound-only channel enforcement and 5-language triage:
POST /api/tickets/triageaccepts onlyemail,web_widget, officialwhatsapp_cloud(WhatsApp Business Cloud API), andslack_connect, rejecting outbound AI calls, SMS, and unofficial bridges at schema validation. Deterministic detectors identifyen,de,fr,ja, oresvia Unicode script ranges, diacritics, and vocabulary scoring, classify sentiment and intent, and assign channel-aware SLA deadlines fromP1-Critical(15–30 minutes) toP4-Low. - Deterministic KB indexing and attributed citations:
POST /api/kb/ingestsplits Markdown headings or JSON articles into section-level records scored by a 128-dimensional signed feature-hashing vector (blake2b) plus Latin and CJK-bigram keyword overlap.GET /api/kb/searchand ticket triage return ranked citations with exactarticle_id,section,excerpt, and match score. - Zero-key offline drafting with deterministic guardrails: Drafts are generated via
OfflineDeterministicAdapter(or an optionalOpenAICompatibleAdapterwith automatic offline fallback). Before persistence,evaluate_policy_guardrailsscans both inbound text and outbound draft forpii_leakage(IBAN shapes, Luhn-checked card PANs, andsk-/ghp_/xox/Bearersecrets),unverified_promisepatterns, andunauthorized_account_changerequests such as MFA bypasses, substituting a localized holding template and loggingguardrail_events. - Fail-closed HTTP 409 human sign-off gates: Sensitive intents (
refund,billing_dispute,account_deletion,security_claim,legal_threat) never auto-resolve. CallingPOST /api/tickets/{id}/escalatewithfinalize=trueorapprove_resolution=truereturnsHTTP 409 Conflictunless bothhuman_approved=trueand a non-emptyreviewer_idare supplied. - Immutable SHA-256 audit chain, ephemeral upload wipe, and safe metrics: Every action appends to an
audit_logstable protected by SQLiteBEFORE UPDATEandBEFORE DELETEabort triggers and verified viaverify_audit_chain. Multipart ticket and KB uploads are written with0600permissions and purged after 3,600 seconds while preserving SHA-256 digests.GET /api/metrics/deflectiontracks deflection rate, CSAT delta, language splits, and SLA compliance, whileGET /api/metrics/audit.csvemits RFC 4180 CSV with OWASP formula-injection neutralization.
Operational Takeaway
Safe Tier-1 deflection treats the LLM as a constrained drafter inside deterministic guardrails rather than an autonomous agent. When retrieval emits exact section citations, regex and Luhn checks strip secrets before send, sensitive intents block behind an HTTP 409 reviewer gate, and every decision joins a SHA-256 hash chain, support leaders capture multilingual speed without surrendering operational control.