Preface

When a user initiates a conversation with a chatbot, they typically express a goal or requirement, often referred to as intent. Most conversational systems are designed to fulfill a specific task (e.g., book a flight, order coffee, get product details). However, users rarely provide all the required information in one turn. This means the system must ask follow-up questions until it has gathered enough details to act.

##### Example of a conversational system ######

User: I want a coffee

Bot: Sure! We serve espresso, latte and cappucino, which type of coffee do you want ? 

User: I want cappuchino

Bot: what cup size do you need? choose from small (6oz) , medium (8oz) and large (12oz).

User: I want Small

....... ## Further Questions?

This process of progressively gathering information is known as slot filling.

Turn Speaker Utterance                        System Action
1     User   I want a coffee                  Intent: Order_Coffee, Slots filled: None
2     Bot    Sure! We serve espresso, latte,
             and cappuccino. Which type of 
             coffee do you want?              Missing Slot: coffee_type
3     User   I want cappuccino                Slot filled: coffee_type: cappuccino
4     Bot    What cup size do you need? 
             Choose from small(6oz),
             medium(8oz) and large (12oz).    Missing Slot: cup_size
5     User   I want Small                     Slot filled: cup_size: small

n     n     n                                 System is ready to fulfill the order.

There are several ways to implement this logic. While enterprise platforms such as Google Dialogflow and Azure Conversational Language Understanding (CLU) provide full-featured NLU (Natural Language Understanding) and slot-filling pipelines, it's also possible to build lightweight intent parsers manually, especially for deterministic, domain-specific use cases.

Lets discuss few approaches for parsing user intent and taking action accordingly.

None
Converstational Slot filling

Approach 1: Keyword/ Regex based Parser

A keyword-based parser is a rule-driven approach that looks for specific words or patterns in user input to determine intent.

Typical steps include:

  1. Tokenization: Converting user input into a sequence of tokens. (In practice, NLP libraries such as spaCy or NLTK are more effective than regex for robust tokenization.)
  2. Intent Matching: Using rules or regex patterns to map tokens to known intents.

Example of slot definitions for a rule-based system:

None
Custom Parser

If required slots are missing, the system asks the user for more information.(e.g. the blob_storage.required and api.required fields)

blob_storage: {
 required: [ 'storage_account', 'container' ],
 optional: [ 'access_tier' ]
 },
api: { required: [ 'api_name', 'operation' ], optional: [ 'policy' ] }

There is also a very good Open Source Project for intent parsing : Adapt Intent Parser from Mycroft AI

None
Mycroft Adapt Intent Parser

Approach 2: LLM based Parser

Large Language Models (LLMs) can interpret user input more flexibly than keyword rules. They excel at recognizing intent in varied, natural expressions.

A practical way to use LLMs for slot filling is:

  1. Slot Extraction: Configure a prompt that asks the model to extract all required fields from the user's request.
  2. Iterative Questioning: If required slots are missing, the system asks clarifying questions until all fields are filled.

This way we reduce the number of LLM calls and still be able to gather further details in a conversational manner. With LLM there is a chance to get stuck in a feedback loop. This hybrid approach avoids the excessive LLM calls: the LLM is used primarily for parsing intent, while a deterministic slot manager tracks what information is still needed.

None
LLM Based Slot identification

Choosing the Right Approach

  • Commercial NLU Tools (Dialogflow, Azure CLU, Rasa): Best for production-ready conversational agents with built-in training, slot filling, and integration support.
  • Custom Keyword/Regex Parsers: Useful for small, domain-specific applications where rules are simple and predictable.
  • LLM-Based Parsing: Powerful for flexible, natural interactions — especially when user input is highly varied. Combining LLMs with slot-filling logic provides both robustness and efficiency.

Conclusion

Extracting user intent and filling slots is central to conversational systems.

  • Rule-based parsing offers determinism and control.
  • LLM-based parsing provides flexibility and naturalness.
  • Hybrid strategies often deliver the best of both worlds.

If you're starting to build a conversational agent, begin with clearly defining your intents and slots, then choose the parsing approach that best balances accuracy, cost, and complexity for your use case.