Communications

AI Suggest

← Back to Communications

AI Suggest is the per-message reply drafter. When a guest sends a WhatsApp message, the system queues an AI suggestion against the thread; you accept, edit, or override before sending.

Where it appears

  • Reservation → Messages tab — each unanswered inbound has an AI Suggest button.
  • WA Comm screen (/v28/wa-comm) — cross-reservation operator view, same suggest action per thread.
  • Pulse → Recent messages card — quick-access to threads where the AI hasn't confidently auto-replied.

How a suggestion is built

  1. The platform picks the most recent inbound guest message.
  2. Resolves the guest language (see Languages).
  3. Resolves the outbound language (host's comm language unless the guest's is in noTranslateLanguages).
  4. Loads: - Recent thread history (the last ~20 messages, in original language). - The FAQ knowledge base for this property + tenant (see FAQ Knowledge Base). - The reservation context (dates, mood, recent ops state).
  5. Asks the LLM to draft a reply in the resolved outbound language.
  6. Returns the draft for review.

Acceptance flow

You see:

Guest (Marina) · ru:
  "В квартире нет горячей воды. Что делать?"

Suggested reply (en):
  "Hi Marina — sorry about the hot water. The boiler is in the
  utility cupboard near the front door — please flip the red
  switch and wait 5 minutes. If it still doesn't work, let me
  know and I'll send a technician."

[ Accept and send ]  [ Edit ]  [ Reject ]
  • Accept and send — the draft goes out as-is, marked AI in the thread.
  • Edit — opens the draft in the editor; modify and send.
  • Reject — discard the suggestion; reply manually.

Language coverage

The detector + outbound picker is documented at length in docs/language-resolution.md. The short version:

  • Guest's language is detected from the most recent inbound message's detectedLanguage (LLM-tagged at arrival), with country and phone-prefix as fallbacks.
  • Host's communication language is the assigned teammate's language column.
  • If they match OR the guest's is in the teammate's noTranslateLanguages → reply in the guest's language.
  • Otherwise → reply in the teammate's language.

Synthetic system notes are NOT signals

The thread contains internal annotations the platform writes for AI context ("Guest asked for early check-in; ops approved"). These are never sent to the guest and are not mixed into the language-detection signal (fixed in #156). Before the fix, those system notes — written in the operator's language — could flip the AI's reply into the wrong language.


When the AI declines to suggest

For some messages the AI returns "I'm not confident enough to draft a reply" with a reason. Common cases:

  • The message is a one-word emoji or sticker.
  • The message asks for legal/financial advice that needs a human.
  • The thread history conflicts with the FAQ.

In these cases you draft the reply manually. The conversation history is still useful — copy-paste the suggestion shell and write your own body.


Quality controls

  • AI-sent replies always carry an AI tag in the thread.
  • After a few iterations, you can tune the assistant via Admin → LLM Prompts.
  • Frequent rejections of suggestions are a signal that the FAQ knowledge base needs updating — see FAQ Knowledge Base.

  • #156 — AI Suggest language no longer polluted by synthetic system messages.
  • #185Add FAQ entry flow (which is how operators contribute back to the AI's knowledge).
  • #74 — XSS via LLM output rendering (defence-in-depth, no operator-visible change).
  • #78 — LLM prompt injection via FAQ + guest messages (defence-in-depth).
Source: the FlatsBratislava operator manual.