AI Chat+5 min read· Updated 2026-11-18
AI Providers, Tuning & Smart Handoff
Configure OpenAI, Azure OpenAI, or Google AI providers, tune RAG retrieval parameters, customize your AI Persona, and control the 5 smart handoff rules.
Multi-provider AI & RAG configuration
Omni Chat Stack abstracts LLM and embedding providers through AIProviderFactory (supporting OpenAI, Azure OpenAI, and Google AI). Admins configure provider preferences, persona instructions, and RagConfig retrieval tuning inside Settings → AI (/settings/ai) and Knowledge → AI Settings (/knowledge).
| Setting Endpoint | Scope | Purpose |
|---|---|---|
| GET / PUT /api/v1/settings/ai-config | Admin / Supervisor | Enable AI auto-reply, set confidence thresholds, model selection, and handoff behavior. |
| GET / PUT /api/v1/settings/ai-persona | Admin / Supervisor | Customize business tone, greeting, escalation instructions, and brand voice. |
| GET /api/v1/settings/ai-metrics | Admin / Supervisor | Review AI resolution rates, token usage, and interaction audit logs (AiInteractionLog). |
The 5 smart handoff triggers
handoffService evaluates every AI turn against 5 rule types. When triggered, the conversation transitions from AI_HANDLING to AGENT_HANDLING and assigns an available human agent:
1. Low Confidence
Score below threshold
2. Explicit Request
"Talk to human"
3. Sensitive Topic
Billing / refunds / legal
4. Repeat Failure
Unresolved multi-turn
5. Frustration
Negative sentiment → Agent
- Low Confidence: Triggered when RAG retrieval scores or model certainty fall below your configured threshold.
- Explicit Keywords: Triggered immediately when a customer writes phrases like "human", "agent", "manager", or "support person".
- Complex / Sensitive Topics: Detects billing disputes, refunds, legal escalations, or custom high-risk topics.
- Repeated Failed Attempts: Escalates automatically after consecutive unresolved turns in the same thread.
- Customer Frustration: Sentiment detection catches anger or urgency and routes immediately to a live teammate.