AI mode lets the system handle conversation traffic that follows known patterns: opening hours, directions, simple booking, common FAQ. When the conversation drifts into clinical territory, refund disputes, complex pricing, or any low-confidence intent, the system hands off to a human with full context. The AI never gives clinical advice. This article walks the four team modes, the knowledge base, the confidence-driven handover, the clinical guardrails, the voice and image handling, and the governance discipline that keeps the AI useful and safe.
Where it lives#
- Settings → Messaging → Team mode: configure per team how AI participates.
- Settings → Messaging → Knowledge base — Coming soon, not built yet. There is no knowledge-base page in Hoopoe today; what the AI knows lives in the external workflow. See Knowledge base below.
- Settings → Messaging → Escalation rules: configure when AI must hand off (Coming soon for visual builder).
- Marketing → Messaging → conversation: see AI activity in the chat thread.
- Reports → Messaging → AI quality — Coming soon, not built yet. Confidence, handover rate and resolution rate are not reported today. See AI quality metrics below.
The four team modes#
AUTO_ONLINE#
- Conversations route to online team members based on workload. The model default is Open pool, not Auto-online.
- AI suggestions optional (toggle separately).
- Human reps work each conversation; AI offers draft replies if enabled.
SUPERVISOR_MANUAL#
- Supervisor assigns each conversation manually to a rep.
- Used for small teams or specialised handling.
- AI suggestions optional.
OPEN_POOL#
- Conversations land in a shared pool.
- Any team member can claim the conversation.
- Useful for night shift, on-call, smaller teams.
FULL_AI#
- AI handles every incoming message.
- Escalates to human only when escalation rules fire.
- Used for high-volume FAQ-heavy clinics or first-line filtering.
- Always with strict clinical and safety guardrails.
The stored mode is set per team. A team can also have a daily AI coverage window, including an overnight window. Within that window its effective mode becomes Full AI; outside it the stored mode applies. A team AI opt-out, booking gate, channel defaults, tenant policy, and a deliberate conversation override can also affect handling. Ask an administrator to verify the effective policy instead of relying only on the mode label.
AI suggest vs AI autonomous#
AI suggest#
- Toggle on any team mode except FULL_AI.
- AI drafts a reply, agent reviews, edits, sends.
- Lower risk, slower throughput.
- Useful for teams adopting AI for the first time.
AI autonomous (FULL_AI)#
- AI sends replies on its own for known intents.
- Hands off to a human when escalation rules fire.
- Higher throughput, requires governance.
- Common for clinics handling 100+ inbound per day on FAQ-heavy services.
Knowledge base#
What it contains#
- Clinic FAQ: opening hours, location, parking, services offered.
- Service catalogue: what each service involves, typical duration, prep instructions.
- Pricing: ranges or specific prices the AI can quote (configurable per service).
- Insurance accepted: list of insurers the clinic works with.
- Provider profiles: who works at the clinic, specialities, languages.
- Policies: cancellation, refund, photo consent, marketing.
How AI uses it#
- Retrieval-augmented generation (RAG): AI searches the knowledge base before replying.
- Cites the source in the reply (FAQ entry, service definition).
- If no match found, AI refuses to answer and escalates.
Maintaining the knowledge base#
- Tenant admin or marketing manager keeps it up to date.
- Stale entries trigger AI to give wrong info, monitor quality reports.
- Version control of changes.
- Coming soon: in-product editor with search and category browse.
Confidence-driven handover#
What confidence means#
- AI scores each inbound message: how sure is it of the right reply.
- Score 0 to 1.
- Above threshold (default 0.8): AI replies.
- Below threshold: AI hands off to human with reason "low confidence".
What drives low confidence#
- Unfamiliar question (not in knowledge base).
- Ambiguous phrasing.
- Mixed-language or non-native input.
- Detected sentiment (angry, distressed).
- Clinical keywords.
- Pricing for high-value services.
Configurable thresholds#
- Per team, per intent.
- Stricter for clinical teams, looser for reception.
- Per-tenant default at onboarding.
Escalation rules#
Deterministic escalation#
- Trigger on keyword: "refund", "complain", "lawyer", "headache", "pain", "side effect".
- Trigger on sentiment: angry, distressed, dissatisfied.
- Trigger on patient segment: VIP, complaint history, controlled-substance flag.
- Trigger on time: after-hours, weekend.
- Trigger on conversation length: more than N AI turns without resolution.
Natural-language escalation guidance#
- Admin writes plain-language rules: "If patient asks about pricing for surgery, hand off to sales rep."
- AI interprets and applies.
- More flexible than deterministic rules but needs review.
Patient-requested escalation#
- Patient says "I want to talk to a human", "is there a person there".
- AI immediately hands off, no negotiation.
- Critical for trust.
Clinical and safety guardrails#
Never give clinical advice#
- AI refuses to diagnose, recommend treatment, interpret symptoms.
- Offers to book a consult instead.
- "I can help you book an appointment to discuss this with one of our doctors."
Never quote pricing above threshold#
- For routine services, AI can quote.
- For surgical or high-value services (configurable threshold), AI defers to sales rep.
- Prevents over-commitment.
Never approve refunds or commitments#
- AI logs the request, hands off to manager.
- Reduces dispute risk.
Never verify identity#
- AI does not handle identity-sensitive flows.
- OTP-in-chat verification for PHI requests routes to a structured flow with human oversight (Coming soon).
Never share other patient information#
- AI strictly conversation-scoped.
- Cannot pull another patient's data.
- Hard data isolation.
Voice and image handling#
Voice notes#
- Patient sends voice note via WhatsApp.
- System transcribes to text.
- AI processes text the same as typed messages.
- Original audio retained for reference.
- Confidence on transcription affects overall confidence.
Image triage#
- Patient sends skin photo, dental photo, wound photo.
- AI never auto-replies with clinical interpretation.
- AI either books a photo-review consult or flags for clinician inbox.
- Image stored on patient record with consent gating.
- Multi-image album supported.
Handover seam#
What the human receives#
- Full conversation history.
- AI summary of what was discussed (Coming soon as structured summary).
- Patient context: profile, last visit, active plans, balance.
- AI confidence score and reason for handover.
- Suggested next reply (the AI was about to send but did not).
What the patient experiences#
- One conversation thread (no separate AI / human channels).
- Brief notice "Let me get our team to help with this" before handover.
- Human takes over within seconds for online teams.
- Brief delay acceptable, longer delay drives no-reply churn.
Multi-language handling#
The BE carries the patient's preferred language (customer.preferred_language), which drives template variant selection and the language code passed to the AI workflow. Auto-detect of the inbound message language is performed by the AI workflow, not by Hoopoe. If the workflow detects a different language than the patient profile says, it picks how to respond.
Template variants are managed per language in the template store. If no variant exists for the patient's language, the resolver falls back to the tenant default, then to English. A missing variant never blocks delivery, the closest match goes out.
AI quality metrics#
- Confidence distribution: where most replies sit.
- Handover rate: % of conversations escalated.
- AI resolution rate: % of conversations AI closed without handover.
- Time to resolution: AI-handled vs human-handled.
- Post-handover CSAT: did the human satisfy after AI escalated.
- Hallucination detection: flagged replies that referenced false information.
- Patient acceptance: did the patient continue the AI conversation or ask for human.
Handover seam, what actually happens#
- The AI workflow processes an inbound, decides to escalate, and posts back to Hoopoe with
should_escalate=true+ a reason + a confidence value + an optional draft reply. - Hoopoe writes a system message into the conversation: "AI escalated conversation to human agent due to: <reason>". The message is visible to staff in the thread.
escalated_atis set,is_ai_handledis cleared. The conversation shows up in the inbox's Escalated filter.- If the team is in Auto-assign to least-busy online agent, the next online agent is assigned. Otherwise the chat stays in the pool until someone claims it.
- The patient sees the AI's last reply, if any. They do not see a system-message annotation, that is staff-only.
- Authorised staff can use the AI control in the conversation header to hand that chat to AI. To take it back, select a human assignee. This is a per-conversation override; the backend determines whether you have assignment rights. Check the resulting handling state before leaving the thread.
Governance discipline#
- Every AI message logged with confidence and citation source.
- Random sampling for quality review.
- Knowledge base versioning with rollback.
- Per-rule audit on escalation triggers.
- Patient complaint about an AI message: review the full chain.
- AI disable per tenant or per team in minutes if needed.
- Use the conversation header to hand a chat to AI or assign a human takeover, subject to assignment permissions.
Setup checklist (when AI rolls out)#
- Choose an assignment mode per team. Use Open pool or Auto-assign as the human default; reserve Full AI for the reception team during pilot.
- Enable AI suggestions on at least one human team to test draft quality before going autonomous.
- Approve a set of utility templates in Meta Business Manager so the AI has approved copy for outside-window replies.
- Configure target response time and working hours per team, the SLA alerts depend on both.
- Pilot Full AI on Reception only.
- Watch the Escalated filter daily for the first two weeks, manual sampling of AI threads is the quality bar until the dashboard ships.
Coming soon (consolidated)#
- Knowledge base in-product editor.
- Confidence scoring on every inbound message.
- Visual escalation rule builder.
- Natural-language escalation guidance editor.
- AI summary on handover (structured).
- Voice note transcription.
- Image triage with clinical-review flag.
- Multi-language auto-detect and reply.
- Per-conversation AI pause toggle.
- OTP-in-chat verification flow for PHI requests.
- AI quality dashboard with hallucination detection.
- Per-tenant LLM provider choice (OpenAI / Anthropic / custom).
- AI training fine-tune on tenant past conversations.
- Sentiment analysis with badge in inbox.
- Auto-tag by intent (booking, refund, complaint, clinical).
Common mistakes#
- FULL_AI on clinical teams: clinical advice risk. Use AUTO_ONLINE with AI suggest.
- Knowledge base outdated: AI gives wrong info, trust erodes.
- No escalation rules: AI handles everything, including refund disputes.
- No knowledge base: AI either refuses everything or hallucinates.
- Ignoring AI quality once the dashboard ships: drift unnoticed.
- Patient requests human, AI keeps trying: trust lost immediately.
- AI quoting surgery price: over-commitment. Threshold-gate pricing.
- AI giving clinical advice "as a friend": regulator complaint. Hard refuse, every time.
How AI mode connects#
- Messaging inbox: AI handles or hands off.
- Knowledge base: RAG source — Coming soon, not built yet. Today the retrieval happens in the external workflow.
- Teams: mode is per team.
- Escalation rules: deterministic and natural-language.
- Templates: AI uses approved utility templates within window.
- Booking: AI offers slots (Coming soon).
- Patient record: AI reads context, never edits.
- Audit log: every AI message captured.
- Reports: AI quality dashboard — Coming soon, not built yet.
