Dialogue parameter extraction: a hybrid of LLM and rules for chatbots

Customers leave a chatbot if it asks the same question again or loses request details. We develop slot filling turnkey: a hybrid of rules and a language model extracts parameters from live dialogue and significantly reduces manual handling of requests. We will discuss your task and come back with an evaluation and plan.

Dialogue parameter extraction: a hybrid of LLM and rules for chatbots

NLP and Text ProcessingMedium~2-3 days
Frequently Asked Questions

Why slot filling in a chatbot falls apart in live dialogs

In a demo, slot filling in a chatbot looks reliable: the assistant asks a question, the user answers with a single value, the slot closes, and the dialog moves on.

On live traffic, an utterance almost never arrives in the expected form — and extracting dialog parameters begins to lose values at every step.

Free-form wording produces compound and relative values: "after lunch on Friday," "like last time," "in about two hours." Dictionaries and rules cover enumerating variants, but not their combinations.

The second common breakdown is multiple entities in one utterance: "delivery to Minsk on Thursday, two addresses, one from 10 to 12" — the first is extracted, the rest remain as unfilled slots, and the form asks again for what the person has already stated.

Refusals and deferrals break the logic differently: "I don't know yet," "let's do it later" — and the model confidently writes a value into the slot because the form requires completion.

A topic switch within a single message ("is card payment possible?" in the middle of data collection) resets the already collected set, and the user returns to the first question.

In Rasa and related dialog platforms, this is immediately visible in logs: the slot is empty, the form loops on re-prompting, and the number of steps to completion grows.

Entity recognition errors accumulate: the share of dialogs where all required slots are filled without connecting an operator falls, while escalations and repeated clarifications eat up the effect of automation.

Below, we examine how a hybrid of rules and a language model closes these four scenarios — and what exactly changes in parameter extraction.

What slot filling in a chatbot delivers with a hybrid approach

Parsing dialog parameters with a single language model produces variable results: the same phrase in a different context fills a slot differently, and some utterances go to re-prompting.

On a long scenario, this is visible in dialogs where the client names the city, date, or service category for the third time.

A hybrid nlp approach divides the work explicitly. Dictionaries, regular rules, and normalization cover predictable constructs — addresses, dates, numeric ranges, service names.

The language model is connected only where the template did not work: free-form wording, multiple parameters in one utterance, a nonstandard order of utterances.

The first measurable effect is parameter extraction accuracy.

Typical cases are covered by a deterministic rule, and the model does not "override" them; on an annotated sample of real dialogs, the share of correctly filled slots grows, and disputable answers are marked for review rather than silently entering the scenario.

The second is the share of dialogs completed without re-prompting.

The robustness of dialog parsing rests on normalization: typos, transliteration, and slang are brought to canonical form before being written to the slot, so "tomorrow," "tomorow," and "for tomorrow" produce one date rather than three clarifying questions in a row.

The third is the load on the language model. The model is called only on complex branches, so response latency is predictable, and bot behavior is controllable: a rule can be adjusted the same day without retraining and without the risk of breaking neighboring slots.

Parameter extraction modes: rules, model, hybrid

The choice of slot extraction mode is based not on the model's "strength" but on input predictability. We look at three things: how closed the slot value list is, how often the user paraphrases the same idea, and what the scenario does with an unparsed utterance. The answers determine where rules end and where the model is connected.

Option When it fits Limitations
Rules and dictionaries Closed value list: cities, plans, codes, dates; similar utterances Breaks on paraphrases and typos — each new wording is a template fix
Language model Free speech, long utterances, many synonyms, rare scenarios Result is non-deterministic, response arrives with latency, invented values are possible — a validator is needed
Hybrid Typical utterances are covered by rules, the model works on the unparsed remainder More complex design: arbitration between layers and logging of who filled the slot are needed

Hybrid dialog parsing is conveniently built layer by layer: the deterministic layer parses template utterances and fills the slot from a dictionary, while the language model is called only for what it could not handle.

Its answer is checked by type and allowed values, so random text does not enter the slot. Slot filling remains observable: you can see which branch filled the parameter, and unparsed cases go to the log and become new templates.

Switching between modes does not require rewriting the dialog scenario — only the parsing layer changes, while the slot filling interface remains the same.

Therefore, it is reasonable to start with rules and enable the model selectively when logs show the share of utterances that the deterministic layer does not cover.

How we implement parameter extraction: project stages

Slot filling is not enabled as a ready-made module: extraction quality depends on which parameters the process needs and how clients phrase them. Therefore, implementing nlp parsing starts from real dialogs, not from a scheme invented in a vacuum, and each step has a checkpoint.

  1. Dialog audit. We export the history of requests, group it by scenarios, and produce a list of target slots with the share of cases where they are stated explicitly.
  2. Dialog annotation. We write instructions for annotators: slot boundaries, value types, ambiguous cases. Part of the corpus is annotated by two people — discrepancies are resolved before training, otherwise the model learns noise.
  3. Parameter schema. We fix types, required status, normalization (phone, date, reference values), and behavior for contradictions when the client names different values in one conversation.
  4. Rule setup. Identifiers, dates, and values from reference books are covered by deterministic rules — they are predictable and serve as a foundation for the model.
  5. Model setup. We fine-tune extraction on the annotated corpus for free-form wording, set a confidence threshold, and use re-prompting instead of inserting a guess.
  6. Conversational assistant acceptance. We run a holdout sample: share of dialogs with fully filled slots, errors by each parameter, manual review of disputable cases.
  7. Handover to support. We hand over the slot schema, rules, annotation instructions, quality metrics dashboard, and the retraining policy for new wording.

The order of stages cannot be rearranged: rules without annotation do not cover live speech, and a model without validation inserts plausible but incorrect values.

Deliverables: schemas, rules, annotation, policies

The package is assembled so that the solution can be changed without our involvement: the customer's engineer opens the schema, sees where a parameter came from, and edits it where intended, not in the bot code. Below is what remains with you after a slot filling project.

  • Dialog parameter map — a table with all slots: name, type, required status, source (direct answer, model inference, default value), validation rules, and assistant behavior when the user refuses to answer.
  • Entity dictionary — normalized value forms, synonyms, and typos that are recognized as the same slot; it is updated without rebuilding the logic.
  • Routing schema — a diagram of transitions between dialog states indicating when the model is connected and where deterministic rules operate.
  • Annotation set — reference dialog examples with assigned slots, split into training and validation parts; it serves both for fine-tuning and for regression runs.
  • Change policy — the order of changes: who adds a slot, how it is checked, which test confirms that the new logic has not broken neighboring branches.
  • Conversational assistant documentation — description of exchange contracts with your systems, response formats, handling of partially filled requests, and handoff of the dialog to an operator.
  • Operations manual — how to read logs, where to view the share of successfully extracted parameters, and by which signs to understand that parsing quality has degraded.

Each artifact is versioned together with the code, so changes are traceable: you can see what was changed and why, and you can return to the previous state of the logic.

This set is sufficient to add new slots and scenarios on your own — or, if you decide to continue with us, we will pick up the work without reverse engineering.

Case study: how dialog parsing accuracy increased

The project began with a support chatbot where slot filling rested entirely on rules: regular expressions, synonym dictionaries, a rigid sequence of questions.

On template phrases this worked, but as soon as a user answered at length or named parameters in a different order, parsing broke. The share of correctly filled slots stayed around 62%, and every fifth dialog went to re-prompting.

We did not discard the rules: they remained the deterministic layer for normalization and predictable entities — order numbers, dates, cities from the reference book. The model was added on top and took on free-form wording, typos, and parameters named in previous utterances.

Both results are merged by confidence: in case of disagreement, the more reliable source wins, and the disputable slot is marked for clarification. Rule-based annotation was built on spaCy — the external response contract did not change.

Parsing accuracy was measured on the same set of real dialogs — before and after implementing the hybrid approach.

Metric Before After
Correctly filled slots 62% 91%
Dialogs with re-prompting by parameter 21% 6%
Parsing utterances with typos and slang 48% 87%

The gain came not from connecting the model itself, but from the confidence threshold and merge rules: without them, the model filled slots more readily but made mistakes more often.

After tuning the thresholds, the share of scenarios reaching the target action on the first pass grew from 71% to 94%, and handoff to an operator decreased almost by half.

How does a hybrid approach differ from a pure language model?

The difference is visible where slot filling stops being a demonstration: one parameter comes from a free-form utterance, another from a button, a third surfaces in the middle of a clarifying question.

A pure language model handles wording that is not in the annotation, but it does not guarantee the same result on the same input and does not explain why the slot was filled in a particular way.

A hybrid approach divides the work: rules and a finite state machine hold critical parameters and the order of steps, the model parses free text, and a validator decides what enters the dialog state. Comparison of natural language processing approaches is conveniently reduced to three axes.

The main work is at the junction: rules take priority over model candidates, value conflicts are resolved by source and recency, and every decision is written to the log.

The dialog becomes reproducible: a failure repeats on the same input, and a rule fix closes a class of errors rather than one conversation.

For support, this shifts the load from analyzing "why the model answered that way" to maintaining rules and regression scenarios. In Rasa, such sets are described declaratively — an engineer makes the change without retraining the model.

Technical concerns: limitations and robustness of the approach

Slot filling in a chatbot does not cover everything: a hybrid has boundaries.

Slots without lexical markers — "do it like last time," "a more expensive one for us" — are not extracted by rules; here a model with dialog history is needed, while rules only check that the value falls within the allowed set.

If a feature is spread across three utterances or two parameters are hidden in one phrase, accuracy drops. This is a limitation of nlp parsing, not a configuration error: we mark such branches as a manual review zone rather than disguising them as automation.

Typos are removed by normalization and fuzzy matching: keyboard layout, repeated letters, word merges, numbers spelled out. The match threshold is configured for the customer's dictionary, and disputable matches are logged — they show where the dictionary needs to be extended.

Dialog data remains in the customer's environment: logs and extracted parameters are stored on their side, retention period and anonymization are set by policy, and only quality metrics without utterance text go outside.

What happens when business rules change?

Rules are stored separately from the model and described declaratively. Editing a dictionary or condition takes hours, retraining is not required: we run the regression dialog set, check that the share of correctly filled slots has not dropped, and deploy.

How to roll back if quality has degraded?

Configuration and model are versioned together, rollback is switching to the previous version. Dialog history is preserved, and there are no lost requests.

Let's discuss your dialog parameter extraction task

An accurate assessment of a parameter extraction task rests on data, not on the description "we want a smart bot." To return with a work plan and annotation scope rather than an approximate estimate, we need a minimum of context. Below is what to send and what to clarify.

  • 30-50 real dialogs with annotation: what value should have been extracted in each case. Separately — examples where a parameter is named indirectly, through negation, or with a typo.
  • List of parameters: required and optional, rules for a conflict in one message — ask again or take the default value.
  • Domain entities and dictionaries: service names, synonyms, abbreviations, a mix of Latin and Cyrillic, your audience's slang.
  • Channels and response format: text, buttons, voice transcription; in what form the system expects the result — structured json or fields in CRM.
  • Target metrics for each parameter: acceptable error share, what is more important — precision or recall, how the bot behaves at low parsing confidence.
  • Constraints: where data can be processed, how long to store logs, who grants access to annotation and the test environment.
  • Current environment: what already works — rules, scripts, prompts — and on which platform the conversational assistant runs.

If the discussion is about developing an NLP solution from scratch, add the target load and the languages you will have to work with.

From this we assemble the hybrid scheme: rules cover predictable parameters and validation, the language model covers variable wording, and uncertain parsing goes to a clarifying question.

This keeps slot filling in a chatbot controllable: you can see which parameter was extracted and on what basis. Describe your task and discuss a conversational assistant with us — we will return with a scope estimate and a work plan.

AI Development Areas

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1543
  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1394
  • Website development for BELFINGROUP
    Website development for BELFINGROUP
    1081
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1374
  • B2B Advance company logo design
    B2B Advance company logo design
    816
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1142