Skip to main content
The knowledge base (KB) is the brain of your agent. Each topic defines a single intent — how users might phrase it, what the agent should say, and what it should do next. Well-structured entries keep answers clear, safe, and meaningful.

How retrieval works

retrieval The agent does not see the entire knowledge base every time. Instead, it uses retrieval-augmented generation (RAG) to find the best match for the user’s message.
  1. The retriever compares the message to the topic’s name, sample questions, and content — with higher weighting given to the name and sample questions.
  2. It returns the top few matching topics.
  3. The model selects one and generates a reply (and may trigger an action, function, or flow transition).

Types of knowledge base entries

Below are the broad categories that most knowledge base entries tend to fall into.

Simple FAQ

Used when the agent just needs to answer a question with no follow-up or action required.

Single turn

One message in, one message out.
  • Add a short, helpful reply in content.
  • Leave actions empty.
Example – Pet policy (single turn) simple_FAQ_single_turn-pet_policy

Multi turn

Ask a clarifying question before giving the answer.
  • Use branching inside content to structure the reply.
  • Leave actions empty.
Example – Pet policy (multi-turn) multi-pet_policy

Handoff

Used when the agent should offer to connect the user to a human agent.

Offer

Agent replies, then offers to transfer.
  • content: Include the answer and the offer.
  • actions: Trigger transfer_call (or another handoff function) only if the user accepts.
Example – Spa booking handoff_offer-spa

Direct

Immediate transfer with no agent reply.
  • Leave content empty.
  • Always run transfer_call in actions.
Example – Billing handoff handoff-direct-billing

Conditional

Transfer based on user clarification — for example, group size or request type.
  • content: Ask a disambiguating question.
  • actions: Map each answer to the correct destination.
Example – Room reservations handoff_conditional-room_reservation

Outbound messaging

Used when you want to follow up with a link or information by text or chat (SMS or WhatsApp).

Offer

Offer to send a link via message.
  • content: Include a short message and ask for consent.
  • actions: If accepted, call start_sms_flow.
Example – Golf info SMS_offer-golf

Conditional

Let the user choose which message to receive.
  • content: Ask a branching question.
  • actions: Map answers to different sms_ids.
Example – Tee time booking SMS_conditional-golf_booking

Info only

Used for static reference material (like opening hours or prices). No interaction or action required.
  • Fill content.
  • Leave actions empty.
Example – Opening hours misc_info_dump_opening_hours

Best practices

Do this:
  • Use specific topic names.
  • Add 5–10 realistic sample phrasings.
  • Keep replies short, helpful, and on-brand.
  • Use actions only when necessary.
  • Split multi-part flows into separate turns or topics.
Avoid this:
  • Bundling multiple intents into one topic.
  • Running more than one action per turn.
  • Using vague topic names like Misc, Help, or Info.

Resources