Insights

Designing chatbot conversations: intents, slot filling and retries

How to design a chatbot that completes tasks: detect intent, ask for missing details, validate answers, retry with better wording and hand over cleanly.

A chatbot earns its keep when it completes a task, not when it sounds clever. For an enquiry, a booking or a service request, that means collecting a handful of details accurately and handing over cleanly. This guide covers the design pattern behind reliable task chatbots: intents, slot filling, validation, retries and the right place for a language model.

Start with intents

An intent is what the visitor wants: book a consultation, ask a question, get pricing or speak to a person. Detect it from the first message and keep the list short. Five to eight intents cover most websites. Always include an intent for “talk to a person” and a sensible response for messages the bot cannot classify.

  • Use simple, testable rules for clear cases and a model only for ambiguous wording.
  • Treat an unknown intent as a recoverable event with a helpful re-prompt, not an error.
  • Let the visitor change their mind at any point.

Fill slots one question at a time

A slot is a detail the bot needs, such as the service wanted, the size of the team or a preferred weekday. Define each slot with a name, a type, a validator and a question. Then follow three habits.

  1. Take what is already given. If the first message says “a customer chatbot for about 40 staff on Friday”, fill three slots and ask for nothing. Asking again feels careless.
  2. Ask for one thing at a time. Short questions with suggested answers keep people moving, especially on a phone.
  3. Do not ask for what you do not need. Avoid names, contact details and anything sensitive inside the chat. The contact form is the right place for those, with a clear privacy notice.

Validate every answer

Each slot needs a validator. A team size must be a number in a sensible range. A preferred day must be a weekday the business can honour. A service must match one of the options you offer. Validation protects the downstream process and tells you when the bot has misunderstood.

Retry with better wording, then hand over

When an answer fails validation, do not repeat the same question. Re-ask with wording that explains the format that helps, such as “A rough number helps, for example 25”. Count retries per question and set a limit, commonly three. When the limit is reached, hand over gracefully to a person or a form and say so plainly. A visitor who reaches a human after three tries is far happier than one who is trapped in a loop.

Count guardrail events as retries too. A blocked message, a refused instruction or an off-topic request is still a turn that did not move the conversation forward, and the limit stops abuse from running indefinitely.

Where a language model helps

The most dependable design keeps the conversation in ordinary code and calls a model only at specific points:

  • Rephrase the next question so it sounds natural and reflects what the visitor has already said.
  • Interpret free text when rules cannot read an answer, such as “a fair few of us”, returning a value that your validator then checks.
  • Summarise the collected details for the visitor to confirm.

Every model reply must pass through the same validators and output moderation as any other input. If the model is slow or unavailable, fall back to scripted wording so the journey still completes. The reference architecture for a customer chatbot with slot filling and guardrails on AWS shows how the pieces fit together.

Confirm before handing off

Read the details back in a sentence and let the visitor change any one of them without starting again. Then hand off with a clear next step, such as the contact form or a staff queue.

Make the behaviour visible

Teams trust a chatbot they can inspect. A trace that shows the detected intent, the slots filled, the retry count, each guardrail decision and each model call turns a black box into something a product owner can review and improve. Try it on our AI agents and chatbots page, where the Mini Bot demo includes a live trace panel.

Test the journey, not just the replies

  • Script complete conversations, including mistakes, odd answers and retries.
  • Test the hand-over paths as carefully as the happy path.
  • Replay real, anonymised conversations after each change.

This guide covers flow control only. The controls that constrain what the bot may accept, do and say are a separate layer, covered in guardrails for customer-facing chatbots, or talk to us about a chatbot for your organisation. You can also call 0402 401 584.

More insights

Let’s talk about your next project

Talk to an Adelaide-based team. We reply within one business day.