How does Kerabie's AI know what to say?
Last updated 29 November 2026 · 20 views
Kerabie's AI chatbot combines three layers to generate accurate, on-brand responses: your decision flows, your knowledge base, and Google Gemini.
Layer 1: Escalation detection
Before anything else, every message is checked for escalation phrases — words like "talk to a person", "speak to a human", or "not helpful". If detected, the bot immediately escalates to an available agent without trying to answer.
This is intentional: we prioritise respecting visitor intent over trying to contain the conversation.
Layer 2: Decision flows
Decision flows are structured conversation scripts you create in Automations → Flows. They take priority over the AI.
If a visitor's message matches a flow trigger keyword, the flow runs and the AI doesn't intervene. Flows are useful for:
Flows are fast and fully predictable — you control every word the bot says.
Layer 3: Knowledge base AI (Gemini)
When no flow matches, the AI searches your published knowledge base articles for content relevant to the visitor's question.
How it works:
Conversation history: The last 10 messages in the conversation are also passed to Gemini as context, enabling multi-turn conversations where the bot remembers what was said earlier.
Why the AI stays grounded
The system prompt explicitly instructs Gemini to answer only from the provided knowledge base articles and to say "I'm not sure about that — let me connect you with an agent" if it cannot find an answer. This prevents hallucination and keeps responses factual.
Layer 4: Fallback escalation
If the AI response contains uncertainty phrases, the system automatically routes the conversation to the agent queue rather than delivering a low-confidence answer.
What affects response quality
| Factor | Impact |
|---|---|
| KB article count | More articles = higher containment rate |
| KB article detail | Longer, more specific articles = better answers |
| KB article titles | Natural-language titles match visitor questions better |
| Personality prompt | Shapes tone, language, and topic boundaries |
| Conversation history | Previous messages give the AI better context for follow-up questions |
Response time
AI responses typically arrive in 1.5–3 seconds. This includes KB search, Gemini API call, and response delivery.