---
title: "Real Life Application of a Question Answering System Using"
description: "How an Italian e-invoicing question answering system combines BERT, expanded questions, and fixed answers, and what its evaluation establishes."
canonical: "https://research.elamur.ai/free/en/papers/alloatti-2019-real-life-application-question-answering/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/alloatti-2019-real-life-application-question-answering/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / Real Life Application of a Question Answering System Using BERT Language Model

# Real Life Application of a Question Answering System Using BERT Language Model

Paper · 2019 · Francesca Alloatti, Luigi Di Caro and Gianpiero Sportelli

**Authors:** Francesca Alloatti, [Luigi Di Caro](https://md.research.elamur.ai/free/en/authors/luigi-di-caro/) and Gianpiero Sportelli · **Year:** 2019 · **Venue:** Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/W19-5930/)
- [PDF](https://aclanthology.org/W19-5930.pdf)
- [DOI 10.18653/v1/w19-5930](https://doi.org/10.18653/v1/w19-5930)

## What it is about

How an Italian e-invoicing question answering system combines BERT, expanded questions, and fixed answers, and what its evaluation establishes. · about 36 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

People asking about electronic invoicing rarely phrase their questions exactly as an official guide does. They may describe a customer informally, mention several circumstances together, or ask whether an obligation applies to their particular situation. A useful [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/) system must connect these varied expressions to the right information. Francesca Alloatti, Luigi Di Caro, and Gianpiero Sportelli investigate a practical version of this problem: answering Italian questions about electronic invoicing and digital billing after changes to Italian legislation. Their contribution is a compact application study showing how an existing BERT system, a small collection of initial question–answer pairs, and controlled question expansion can support a working service.

The application selects an existing answer rather than writing a new explanation or locating an answer span inside a document. Its central task is [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/): assign an incoming question to a label associated with a known question and its answer. The authors begin with roughly 300 question–answer pairs, remove unsuitable material, and expand the question side through manual rewriting and generative grammars. These grammars are templates with interchangeable linguistic components, not rules for deciding which answer a user should receive. Expansion produces more than 210.000 pairs, but the final training collection contains 2300 sentences after balancing manually and automatically produced questions. The answer texts remain unchanged.

The authors evaluate the system using a separate collection of 200 questions supplied by volunteers who had not participated in expansion. Their initial BERT experiment without task-specific fine-tuning reaches 3,6 % accuracy in a setting described as running for 40 epochs. With fine-tuning, the first selected answer is correct in 86% of cases; the correct answer appears among the first three selections in 93,6%. A subsequent experiment additionally trains the underlying language component on operational handbooks from the Italian Fiscal Agency before repeating task-specific training, reaching 88 % accuracy for the first answer. A Google DialogFlow comparison reaches 84%. These results support the usefulness of task adaptation in this particular application, while leaving uncertainty about the contribution of individual data-expansion choices and the reliability of small differences between systems.

Practical constraints are central to the paper. The authors report completing data expansion and training within eight days, using a machine described as having CPU 8 core, GPU 28 GB, and RAM 32 GB. An experimental round takes roughly one hour, and answering a question takes an average of 0.2 seconds on a CPU architecture. A Telegram interface makes the application directly accessible and permits positive or negative user feedback. The paper therefore demonstrates an operationally simple route from a restricted question collection to an interactive service. It does not establish reliable handling of unsupported questions, management of conversational context, or correctness beyond the available answer collection. Context handling and further comparisons remain proposed extensions.

### Ideas worth borrowing

Separate answer content from question wording. A service can keep its answers stable while learning to recognize many ways of requesting them. This reduces the problem from producing an explanation to selecting an approved response. It is useful when an organization already has suitable answers but users describe the underlying issues unpredictably. The same separation can support help systems, procedural guidance, and interfaces to documented rules. It also makes errors easier to inspect: a wrong answer may arise from selecting the wrong entry, whereas an inadequate answer may reflect a problem in the maintained content.

Expand recurring language patterns selectively. The paper combines manual rewriting with grammar-based generation because some questions share reusable constructions while others need individual attention. This is a useful allocation principle for [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) and data preparation: automate repetition where the structure is understood, and reserve human work for variation that the template does not capture. The important transferable idea is the division of labor. A generator should express legitimate alternatives to the same request, rather than produce a large collection whose apparent diversity comes mostly from interchangeable surface forms.

Control the influence of synthetic abundance. Automatically generated examples can greatly outnumber manually written ones without adding equally varied evidence. The authors therefore reduce their expanded collection when preparing the final training material. This suggests treating generation method as a relevant property of an example. Researchers building classifiers, linguistic repair systems, or query recognizers can track how much training influence comes from each source. The paper does not prove that its particular balancing choice is optimal, but it identifies a practical risk: ease of production should not determine the effective distribution of the task.

Obtain evaluation language from independent people. The volunteers supplying test questions had not helped expand the training questions. That separation reduces the chance that evaluation merely measures familiarity with the authors’ own paraphrasing habits. It applies wherever developers create much of the training material themselves. Independent question collection can reveal unexpected vocabulary, longer formulations, and combinations of circumstances that templates overlook. Independence of contributors does not guarantee a representative test population, but it provides a stronger test of linguistic coverage than asking the same writers to create both training and evaluation examples.

Distinguish ranking coverage from automatic correctness. The paper reports both the correctness of the first selection and whether the answer appears among the first three selections. These measurements describe different capabilities. A system may have access to the right response while failing to rank it first. This distinction is useful for retrieval, classification, and human-assisted interfaces because it separates candidate availability from final decision quality. It also prevents a shortlist result from being mistaken for the performance of an application that sends a single answer without further checking.

Adapt only as much as the task requires. The main application starts from an existing multilingual BERT resource and performs task-specific training; a later experiment adds training on domain documents. The reusable engineering principle is to distinguish adaptation stages and measure their value separately. Specialized text may improve familiarity with terminology, while labeled questions teach the actual decision. This distinction applies beyond neural methods: adding a domain dictionary, revising recognition rules, and adjusting a selector are different interventions, even when all are loosely described as improving domain knowledge.

Evaluate the service as well as the predictor. The paper reports implementation time, training duration, response latency, and a usable interface alongside answer accuracy. These quantities address different questions about feasibility. A promising classifier may still be inconvenient to maintain or too slow for interaction, while a fast service may provide weak answers. Treating these as separate dimensions gives engineers a clearer account of practical usefulness. The same approach suits bounded assistants, search tools, and language-processing modules whose output must become part of a working workflow.

### How Mova uses it

Mova is a small, transparent language system written in Rust. Its native language path uses explicit structure, rules, learned parameters, and graph knowledge. The relevant transfers from this paper concern bounded question recognition, data construction, evaluation, and operational design. They do not require adopting BERT as Mova’s runtime. The status marks below are proposals based on documented mechanisms; they are not claims that this paper caused an implementation or that its reported improvements transfer to Mova. A mechanism documented elsewhere in Mova may overlap with an idea without constituting the particular application proposed here.

Idea: Keep approved answers separate from question recognition. Where: Data and Fine-tuning Process; Results; Table 1. Area: question answering. Mova: частково є (the `world` readers answer from represented state, and configured operational capabilities have explicit handlers). Mova could add a bounded answer collection whose entries are selected through question frames and declared domain conditions. Recognition would identify the entry, while the entry would retain its answer and source. This could help distinguish a mistaken match from an incorrect maintained explanation. The digest does not establish an equivalent fixed-answer classification service. Why Mova: it offers a transparent task boundary in which the system can explain both what it recognized and which maintained answer it selected.

Idea: Expand wording while preserving answer identity. Where: Data and Fine-tuning Process. Area: data. Mova: частково є (`tools/enrich` prepares source-bound teaching material, and school questions have structured formats). Mova could associate reviewed paraphrases with one underlying question or answer entry, keeping that identity explicit throughout training and evaluation. The paper’s unchanged answers provide the organizing principle; Mova would additionally need checks that a rewrite preserves the relevant participants, conditions, and requested information. Why Mova: multiple formulations could improve access to existing knowledge without silently adding new claims.

Idea: Divide expansion between templates and individual rewriting. Where: Data and Fine-tuning Process. Area: syntax and data. Mova: частково є (`en` parses linguistic structure, while `tools/enrich` separates bounded preparation from teacher review). A proposed expansion workflow could send recurring question structures to a deterministic generator and leave less regular questions for review. Template eligibility should be explicit rather than inferred from superficial similarity alone. The paper motivates the division but does not supply a general test of when a pattern is safe to automate. Why Mova: it concentrates review on uncertain meaning while allowing repeated constructions to receive economical coverage.

Idea: Treat grammar slots as constrained linguistic choices. Where: Data and Fine-tuning Process, the grammar example. Area: syntax and semantic preservation. Mova: частково є (`en` provides morphology and dependency structure; `prag` exposes participant roles). The paper’s interchangeable verbal and nominal components suggest typed slots for Mova question generation. Proposed slot checks could reject incompatible inflections or substitutions that change the request. Such checks would be a Mova extension, not a mechanism evaluated by the authors. Why Mova: structural constraints could make generated examples easier to inspect than unrestricted paraphrase output.

Idea: Clean duplicate and unsuitable questions before expansion. Where: Data and Fine-tuning Process. Area: data quality. Mova: частково є (`tools/enrich` validates prepared material, and `tools/dictindex` preserves exact evidence and stable posting identities). Mova could add an explicit pre-expansion inventory of duplicate questions and rejected formulations. Exact duplicate detection and judgments about poorly written material should remain separate, since the latter require linguistic criteria. The digest does not establish this particular cleaning procedure. Why Mova: expanding a defective seed multiplies its influence and makes the original problem harder to trace.

Idea: Record how every expanded question was produced. Where: Data and Fine-tuning Process; The Fine-tuning. Area: provenance. Mova: вже є (`tools/enrich` binds packets to source fingerprints, and the teacher loop retains annotation versions). Those mechanisms could support a question-expansion record distinguishing original, manually rewritten, and grammar-generated examples. The paper’s balancing decision shows why this distinction matters even when all examples share an answer label. Why Mova: provenance would let later evaluations ask whether success comes from varied evidence or repeated realizations of a small template family.

Idea: Balance generated and manually written evidence. Where: The Fine-tuning. Area: statistics and training data. Mova: частково є (school assessment and training use explicit gates, but the digest does not establish this generation-source balancing policy). A proposed training manifest could report and control the influence of each expansion source. The paper motivates balancing by concern about overfitting; Mova should compare alternative policies rather than assume that a particular balance is universally appropriate. Why Mova: generator productivity should not decide which linguistic patterns dominate learned parameters.

Idea: Keep expansion authors separate from test-question authors. Where: Data and Fine-tuning Process. Area: evaluation design. Mova: частково є (school assessment separates held-out questions from training, and `tools/dictindex` excludes test and exam material). Mova could also record contributor roles when collecting natural questions, making author separation an explicit evaluation property. This is distinct from merely storing training and test files separately. Why Mova: independent writers can expose language that the training authors would not think to generate.

Idea: Preserve natural user formulations during evaluation. Where: Data and Fine-tuning Process; Table 1. Area: pragmatics and evaluation. Mova: частково є (`prag` produces frames and speech-act observations, while the readers operate on structured interpretations). A bounded question benchmark could retain greetings, indirect wording, and multiple related clauses instead of rewriting every request into a canonical sentence. Mova would then be evaluated on whether its structural reading reaches the intended query. Why Mova: clean grammatical examples and actual requests can exercise different parts of the understanding pipeline.

Idea: Measure first-choice correctness separately from shortlist coverage. Where: Results. Area: evaluation. Mova: частково є (the mathematical problem solver has top-K judging, but equivalent fixed-answer ranking measurements are not established in the digest). Mova could report whether the correct entry is selected immediately and whether it remains available among retained candidates. These results should have separate names and should match the deployed interface. Why Mova: the distinction identifies whether improvement is needed in candidate construction or final selection.

Idea: Compare adaptation stages while holding task data steady. Where: Results. Area: experimental design. Mova: вже є (regression gates, held-out comparisons, and bounded self-study distinguish proposed changes from admitted ones). Mova could use that discipline to compare a general reader, a reader with domain lexical additions, and a reader with task-specific decision changes. The paper’s successive BERT experiments motivate the comparison, but its neural adaptation steps are not direct descriptions of Mova’s architecture. Why Mova: separate interventions make improvements more attributable and reduce the chance of crediting knowledge changes for a selector change.

Idea: Use domain documents as evidence distinct from question labels. Where: Results, the experiment using Fiscal Agency handbooks. Area: domain knowledge and data. Mova: частково є (`tools/sources` records provenance, `tools/dictindex` indexes existing parses, and `tools/enrich` stages reviewed teaching material). Mova could use authoritative documents to propose vocabulary or concepts while retaining labeled questions as a separate resource for learning how requests map to answers. The paper reports a combined domain-adaptation experiment rather than measuring these proposed symbolic transfers. Why Mova: terminology and decision supervision serve different purposes and should remain inspectable.

Idea: Distinguish an accepted answer from a high-scoring answer. Where: Related Works. Area: uncertainty and operational safety. Mova: частково є (`layers` can escalate, unsupported configured requests retain failures, and `prag` evaluates confidence against correctness). A bounded question service could require coverage evidence or declared answer conditions before returning its highest-ranked entry. The authors discuss this concern but do not evaluate a rejection mechanism. Why Mova: explicit admission conditions could prevent a plausible ranking from being presented as proof that the question is covered.

Idea: Use external context rules as a separately testable layer. Where: Conclusion and Next Steps, External operation. Area: dialogue and rules. Mova: частково є (`world` maintains contextual state, and configured deputy planning can report missing context). Mova could let declared dialogue facts constrain candidate answer entries, while logging which condition changed the selection. The paper proposes modifying label probabilities through external rules; it does not report a completed experiment. Why Mova: a rule-based context interface fits the project’s emphasis on explicit decisions and allows context errors to be diagnosed separately.

Idea: Represent context as an explicit input to interpretation. Where: Conclusion and Next Steps, Internal operation. Area: dialogue and semantic representation. Mova: частково є (context is an architectural level in `layers`, with working state in `world`, `prag`, and related components). The proposed transfer is to give question interpretation a typed context argument rather than hide prior dialogue in an undifferentiated text string. This is a symbolic analogue of the paper’s proposed context-conditioned classification, not an implementation of its neural proposal. Why Mova: declared context makes missing referents, assumptions, and state dependencies visible.

Idea: Evaluate feedback before admitting a change. Where: Results, the Telegram feedback description. Area: learning workflow. Mova: вже є (`tools/enrich` separates review and staging from admission, and raw worker output is not training gold). Mova could collect positive and negative answer feedback as diagnostic events, preserving the question, chosen answer, and stated objection. A separate review would decide whether the event reveals a recognition error, missing knowledge, or unsuitable answer text. The paper does not describe such a feedback-admission mechanism. Why Mova: user feedback can guide investigation without automatically rewriting knowledge or parameters.

Idea: Measure the deployed answer path’s latency. Where: Results. Area: operational evaluation. Mova: частково є (`tools/jobs` logs estimates and actual resource use, and `tools/twin` supports measured runs and calibration). A question service should measure the path users actually invoke, with its retrieval, interpretation, selection, and response stages identified. The paper’s CPU timing motivates the practical question but provides no Mova latency evidence. Why Mova: native determinism and transparent logic are useful only if the complete service also meets its interaction requirements.

Idea: Report development and training cost alongside accuracy. Where: Introduction; The Fine-tuning. Area: engineering evaluation. Mova: частково є (experiment journals and resource-aware tools retain operational evidence). A proposed application receipt could combine data-preparation effort, hardware configuration, training duration, and answer quality without treating them as interchangeable measures. The authors’ feasibility claim shows why those dimensions belong together. Why Mova: a small system should be judged partly by the resources needed to build, revise, and reproduce a useful capability.

Idea: Compare alternatives on the same collected questions. Where: Results; Conclusion and Next Steps. Area: evaluation. Mova: вже є (paired comparisons and common-question before-and-after assessment are documented principles). The same discipline could compare a rule-based question matcher, a frame-based reader, and another configured recognizer while retaining identical answer definitions. The paper’s DialogFlow comparison is relevant, but its missing configuration details should not become a template for Mova’s reporting. Why Mova: shared questions make a comparison more informative, while retained configurations make it reviewable.

Idea: Preserve concrete question-to-answer traces. Where: Table 1; Figure 1. Area: interpretability. Mova: вже є (native answers retain reasons, and school traces preserve choices and evidence). A fixed-answer application could additionally show the user formulation, interpreted request, selected entry, and returned answer as distinct trace elements. This would extend an existing transparency principle to the paper’s task shape. Why Mova: a reviewer could locate whether failure occurred in reading the question, choosing the entry, or maintaining the response.

Idea: Declare the supported domain before judging success. Where: Introduction; Data and Fine-tuning Process; Results. Area: task specification. Mova: вже є (domain routing and configured operational capabilities have explicit scope and failure boundaries). Mova could apply the same discipline to a question collection by stating what its entries cover and which requests require escalation. The paper demonstrates a restricted application but does not provide a measured out-of-domain boundary. Why Mova: a domain declaration makes an accuracy claim meaningful and gives unsupported requests an explicit outcome.

### The problem and its context

The paper addresses a familiar mismatch between research capabilities and application requirements. General advances in [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/) may look promising, yet an organization still needs a system for a narrow task, with limited examples and little time for development. The authors identify insufficient data, computational expense, development time, and specialized language as obstacles. Their application is intended to show that these constraints need not prevent a usable service.

Electronic invoicing provides a concrete setting. According to the paper, recent Italian legislation created practical uncertainty about digital billing requirements. The relevant language is technical, and questions concern particular obligations rather than broad conversational topics. A general-purpose language resource does not automatically know how a service should distinguish these requests or which maintained answer should follow. The task therefore requires adaptation to both terminology and the available answer categories.

The application is best understood as a specialized FAQ recognizer. A user writes freely, but the system’s response space is already defined by its collected question–answer pairs. The classifier connects the incoming wording to an entry. This matters because the phrase “question answering” covers several different tasks. Selecting an established response is different from searching a large document collection, extracting a passage, or composing an explanation from several sources. The paper’s evidence concerns the first of these.

The example involving private clients illustrates the intended gap between user language and canonical language. The incoming request mentions invoicing for private customers and explains that they have no VAT number. The matched entry frames the issue directly in terms of people without that number. The answer then states that electronic documentation is also required for these clients. The application must recognize that the informal description and the maintained question concern the same obligation.

#### What the authors take from earlier work

The authors place their work within the use of pretrained language representations followed by task adaptation. They cite [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/) alongside other approaches to preparing general linguistic resources and later adapting them to specific jobs. Their interest is practical: starting from existing language competence can reduce the amount of task data and training effort needed for an application.

[BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) supplies the starting point. The paper describes its architecture as a bidirectional encoder built on the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) introduced in [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/). Bidirectional processing means that the representation of text can use surrounding material on both sides. For this application, the important consequence is that the authors begin with an already trained linguistic resource and adapt it to their classification task.

They contrast their service with the passage-answering experiment discussed in the original BERT work and with [BERTserini](https://md.research.elamur.ai/free/en/papers/yang-2019-end-end-open-domain-question/), which they describe as an open-domain question answering system with a chatbot deployment. Their own emphasis is restricted-domain applicability under constrained resources. The paper does not claim to improve open-domain answering. It asks whether a narrower service can be built effectively from scarce initial material.

Domain adaptation provides another comparison. The authors discuss [BioBERT](https://md.research.elamur.ai/free/en/papers/lee-2019-biobert-pre-trained-biomedical-language/) as an example of substantial biomedical pretraining and argue that such preparation carries considerable cost. They also mention [SciBERT](https://md.research.elamur.ai/free/en/papers/beltagy-2019-scibert-pretrained-language-model-scientific/) and [Clinical BERT embeddings](https://md.research.elamur.ai/free/en/papers/alsentzer-2019-publicly-available-clinical-bert-embeddings/) in connection with specialized representations. These are related approaches in their discussion, not competing systems evaluated on the invoicing questions.

#### Why the architecture remains simple

The authors consider recurrent alternatives, including attention-based systems with LSTM or GRU components. Their stated reasons for choosing BERT concern the work required to obtain suitable language representations and the ability to parallelize training. BERT already includes Italian among the languages covered by its multilingual training. Starting there lets them focus on the classification task instead of constructing language competence from their limited invoicing material.

This argument is an engineering rationale instead of an experimental verdict on recurrent architectures. The paper does not train a recurrent competitor on the same questions. Its claim is that the selected route was convenient and effective within the project’s constraints. The planned comparison with other tools acknowledges that the available evidence does not settle which architecture would perform best under matched conditions.

The absence of answer-refinement rules is also part of the intended simplicity. The authors want to see how far the learned classifier can go without adding a separate handcrafted mechanism to correct its output. That does not mean the whole project avoids human design. The answer collection, manual paraphrases, and generative grammars all require deliberate choices. The relevant distinction is between preparing training examples and installing rules that intervene when an answer is selected.

### The method, step by step

The method begins by defining the response space, then expands the language associated with it, trains a question classifier, and places that classifier behind an interactive interface. The answer inventory is central throughout. A generated question is useful only insofar as it remains associated with the correct existing answer. The system is therefore learning a many-to-one relationship between varied expressions and maintained entries.

From invoicing questions to a returned answer The steps in order.

#### Establish the initial question–answer collection

The authors first gather material relevant to electronic invoicing and digital billing. They remove duplicate questions and sentences they regard as poorly written. The resulting collection contains approximately 300 pairs. Each pair associates a question with an answer that the application can return.

This cleaning step precedes expansion, which is methodologically sensible because generation would otherwise reproduce problems in the seeds. The paper does not specify a formal definition of a duplicate or a rubric for judging sentence quality. Its account establishes that cleaning occurred, while leaving the exact procedure and its reproducibility uncertain.

The initial collection defines what the application can answer directly. A classifier cannot select an absent entry merely because it understands the user’s words. This is why answer coverage and question recognition should be considered separately when interpreting the later accuracy figures. The evaluation tests successful matching within the authors’ chosen application, instead of establishing that all invoicing questions have an adequate response.

#### Create alternative expressions of the questions

The authors expand half of the questions manually. The remaining half contain recurring patterns suitable for generative grammars. In this setting, a grammar is a specification of interchangeable linguistic pieces that can be combined into a question. It is not a grammar for analyzing every possible Italian sentence.

The displayed example combines an expression of possibility, a collection-related verb, and an invoice expression. Different choices yield alternative ways of asking whether an electronic invoice can be collected. The important operation is preserving a request while changing how it is expressed. A template family can generate numerous variants cheaply once its components have been chosen.

The paper does not give a complete inventory of the grammars or their alternatives. It also does not explain how every possible combination was checked for grammaticality and unchanged meaning. As a consequence, the reader can understand the generation principle without reconstructing the actual expanded collection. The reported size demonstrates the scale of production, but not the semantic diversity or quality of every produced sentence.

Manual and automatic expansion together produce more than 210.000 question–answer pairs. The answers are not rewritten. This choice keeps the application focused on recognizing alternative questions, instead of learning to produce stylistically varied responses. An expanded question inherits the answer associated with its source entry.

That design also reduces one kind of uncertainty. If the classifier selects the correct label, the returned answer is a maintained text rather than an independently generated explanation. Nevertheless, its appropriateness still depends on the question genuinely matching that entry and on the answer itself being correct and sufficiently complete.

#### Build a balanced training collection

The final training material contains 2300 sentences drawn from the larger expanded collection. The authors explain that automatic generation produced far more material than manual rewriting. They therefore balance the contributions before training, describing the imbalance as a potential source of overfitting.

Here, overfitting means that training could encourage excessive reliance on properties of the available examples, with weaker performance on unfamiliar questions. A large generated collection may repeat a limited set of constructions many times. Its size alone does not establish that it represents the range of real requests.

The balancing decision is one of the paper’s most useful practical observations, but its implementation remains underspecified. The authors do not report the exact selection algorithm, the distribution of examples across answer labels, or the contribution of each template family. They also do not compare alternative sampling policies. The method therefore includes a clearly motivated reduction without supplying evidence that this precise reduction is best.

#### Collect test questions independently

The evaluation corpus contains 200 questions obtained from volunteers. These contributors had not participated in expansion, so they would not already know the formulations in the training material. The authors explicitly use this separation to support the independence of their test language.

This procedure addresses a specific source of optimism. If the same people write training variants and test questions, the test may share their habits even without copying any sentence. Bringing in different writers gives the system a chance to encounter formulations that were not deliberately anticipated.

However, contributor independence is not equivalent to complete distributional independence. The paper does not describe how volunteers were recruited, how they were instructed, or whether every question category was represented proportionally. The test is a valuable external check on the authors’ expansion process, but its relationship to the wider population of intended users remains uncertain.

#### Adapt BERT to predict answer labels

During [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/), the authors add a task-specific layer and modify the underlying parameters for classification. The output categories correspond to the original sentence entries. Predicting a category supplies the connection to an existing answer.

The terminology around the labels is slightly compressed. The paper refers to the 300 original sentences as labels, while its data description introduces roughly 300 question–answer pairs. The safe interpretation is that the original collection supplies the answer-linked categories. The account does not establish a separate semantic organization of intents beyond these entries.

Training minimizes a loss rather than directly maximizing the reported evaluation accuracy. A loss is a numerical objective that indicates how the current output differs from the target. The authors choose cosine proximity, comparing a target representation with a transformed output representation.

They describe the target as a one-hot vector. Such a vector marks the correct category in one position and leaves the other positions unmarked. The network’s output passes through softmax, which converts category scores into a normalized distribution, and the paper states that the logarithm of this output enters the loss.

#### Understand the cosine objective

The displayed equation is a negative cosine comparison:

```
L = −(Σᵢ₌₁ᴺ yᵢ · ŷᵢ) / (√(Σᵢ₌₁ᴺ yᵢ²) · √(Σᵢ₌₁ᴺ ŷᵢ²))
```

Here, L is the loss being minimized. N is the number of vector components, corresponding to the label dimensions. The index i identifies a component. The value yᵢ belongs to the one-hot target vector, and ŷᵢ belongs to the output-side vector described by the authors. The summation symbol adds the componentwise products or squared values across the label dimensions.

The numerator is the dot product of the vectors. Each square-root expression in the denominator measures a vector’s length. Dividing the dot product by both lengths measures alignment rather than raw magnitude. The negative sign converts greater alignment into a smaller objective, which suits a minimization procedure.

The prose description and the equation should be read together. The equation presents a generic negative cosine expression, whereas the surrounding account says that the output-side values involve log-softmax. The paper does not provide enough implementation detail to resolve every question about the exact tensor representation or training code. It would therefore be unsafe to silently replace this objective with a more familiar classification loss.

No comparison of loss functions is reported. The experiment shows that the complete training setup reaches the stated answer accuracy. It does not isolate cosine proximity as the reason for that performance or establish that it is preferable to another objective.

#### Add domain adaptation in a later experiment

The main task-specific result starts from the existing language resource and trains on the invoicing question data. A subsequent experiment additionally trains the language component using operational handbooks from the Italian Fiscal Agency. The classifier is then fine-tuned using the same task data as before.

This sequence distinguishes two kinds of evidence. Domain documents supply technical language and subject-specific usage. Labeled questions supply the relationship between user wording and the response categories. The later experiment combines both, whereas the main task-specific experiment does not require a new domain-pretraining stage.

The distinction matters when reading the authors’ claim that useful results are possible without pretraining. The application still relies on an already pretrained BERT resource. What it avoids in its main successful configuration is additional domain-specific pretraining undertaken for this project.

#### Return answers and collect feedback

The classifier is exposed through Telegram. A user supplies a question, the application identifies a matching entry, and the associated answer is returned. Table 1 illustrates this sequence through a question about invoicing for private clients without a VAT number.

The interface permits positive or negative feedback on the answer. The authors describe this as a means of improving future behavior, but do not specify the update procedure. The paper does not say how feedback is checked, how disagreements are resolved, or when collected judgments enter training.

The final proposed extension concerns dialogue context. An external approach would use rules to modify label probabilities. An internal approach would train the classifier to use context alongside the current text. The first formulation is:

```
p(l | t)
```

Here, p denotes a probability, l is a candidate label, and t is the current text. The vertical bar means that the label probability is conditioned on that text.

The proposed context-aware formulation is:

```
p(l | t ∩ c)
```

The symbol c denotes context, and the intersection notation expresses the authors’ proposal to condition the label decision jointly on text and context. The paper does not define a particular representation of c or a complete training procedure for this extension. These expressions describe planned changes, not measured components of the reported service.

### Experiments and results

The experiments ask whether the application can select the right maintained answer from independently written questions. The central evaluation measure is answer-selection accuracy. Precision and recall are mentioned in the training discussion, but the paper does not report a detailed set of precision and recall results. Its numerical evidence centers on overall accuracy, shortlist coverage, timing, and resource requirements.

#### Data and experimental conditions

The starting collection contains approximately 300 question–answer pairs. Expansion produces more than 210.000 pairs, and balancing yields a final training collection of 2300 sentences. The evaluation uses 200 volunteer-written questions. These quantities describe different stages and should not be treated as interchangeable descriptions of the training set.

In particular, the largest collection is an intermediate product. The reported classifier is not described as being trained on every generated pair. This distinction affects how the study should be understood: extensive generation supplies a pool, while the final training decision deliberately limits its influence.

The paper presents experiments in sequence, using earlier attempts as reference points for later ones. It does not provide the detailed protocol of a large benchmark study. Hyper-parameter settings, repeated-run variation, category-level outcomes, and exact sampling decisions are not supplied. The results are therefore informative about the demonstrated application while offering limited support for fine-grained causal attribution.

#### Main answer-selection comparison

The non-fine-tuned setting performs poorly. Task-specific adaptation produces the principal improvement, while additional domain training gives the highest reported first-answer result. The external intent-matching comparison falls below the task-fine-tuned BERT setting on the reported test accuracy.

Italian e-invoicing test questions: first-answer accuracy Task adaptation is central to the successful reported configurations.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| BERT without task fine-tuning | 3,6 |
| BERT with task fine-tuning | 86 |
| BERT with domain training and task fine-tuning (this paper) | 88 |
| Google DialogFlow intent matching | 84 |

The weakest result is described as occurring without fine-tuning and with 40 epochs. Those conditions are difficult to interpret fully because the paper does not explain exactly what training or evaluation operation those epochs refer to in the absence of task adaptation. The result can be reported faithfully without pretending that the baseline configuration is completely reconstructible.

The 86% result is the main evidence that the adapted system can map independently phrased questions to existing answers. It supports the practical claim that a restricted application can work with modest initial supervision once that supervision is expanded and used for task training. It does not show how much of the result comes from the pretrained representation, the manual paraphrases, the grammars, or the final sampling policy individually.

The domain-trained setting reaches 88 % on first-answer accuracy. Because the authors reuse the task data from the preceding experiment, the comparison provides evidence consistent with a benefit from further domain adaptation. Yet the paper does not report repeated runs or statistical uncertainty. The observed ordering should therefore remain a result of this test, instead of a general guarantee that further domain training will improve any similar service.

Google DialogFlow reaches 84% through an external intent-detection API. This gives the reader a practical comparator beyond the authors’ own sequence of configurations. However, the paper does not document its configuration and training process in enough detail to establish a broadly controlled platform comparison. The result is about the tested setup, not a universal ranking of the services.

#### Correct answers within the shortlist

When evaluation permits the correct answer to occur among the first three selections, the reported value is 93,6%. This measures a different condition from the first-answer score. It shows that some questions have the correct response available in the retained alternatives even when the highest-ranked entry is wrong.

That distinction has a direct application implication. A service that automatically sends its first answer is governed by first-answer correctness. A service that exposes alternatives, asks a clarification, or passes candidates to another decision process might benefit from shortlist coverage. The paper does not evaluate those additional interface strategies, so the shortlist figure should not be presented as their achieved performance.

The gap between these measurements also identifies a possible direction for diagnosis. Some failures may concern ordering among plausible entries rather than complete absence of the right candidate. The paper does not supply item-level rankings or an error taxonomy, so the reader cannot determine which distinctions are responsible or whether context would resolve them.

#### Time and hardware

The authors report a complete project duration of no more than eight days, including expansion and training. Their machine specification is CPU 8 core, GPU 28 GB, and RAM 32 GB. They characterize the computational demands as manageable for the application.

An experimental round takes roughly one hour. This is useful feasibility information, but the paper does not specify every operation included in a round. It should not automatically be interpreted as the duration of an arbitrary retraining job or the complete cost of reproducing the project.

The average response time is 0.2 seconds on a CPU architecture. That result supports the plausibility of interactive use. It remains a narrow timing statement: the paper does not describe the distribution of delays, simultaneous user load, or the contribution of the communication interface to end-to-end waiting time.

These operational results complement answer accuracy rather than validate it. Fast response generation makes a service convenient, but does not establish that unsupported requests are detected or that an answer is legally complete. Conversely, the accuracy figures alone would not establish that the application is responsive enough to use. The paper is strongest when these dimensions are kept separate.

#### What the demonstration establishes

The Telegram deployment shows that the classification pipeline can be connected to a familiar messaging interface. The translated example makes its behavior understandable: a longer, informal question is matched to a concise maintained question and then answered from the collection.

A demonstration example is not an additional quantitative evaluation. It illustrates the intended mapping and helps explain what counts as success. The independent test corpus provides the aggregate evidence, while the example supplies an interpretable instance of the task.

The authors also state that direct comparison with other studies is difficult because of the specialized domain and Italian setting. This is an appropriate restriction on interpretation. Results from unrelated question collections, different answer spaces, or passage extraction would measure different problems even if they used a similar architecture.

### What the ablations show

The paper offers sequential configuration comparisons, but it does not report a systematic component-by-component ablation study.

Its clearest comparison concerns task-specific fine-tuning. The reported performance without it is weak, whereas the adapted classifier performs substantially better on the same application. This supports the authors’ conclusion that adaptation is essential in their setup. It does not isolate a particular parameter group, training objective, or data source as the cause.

The baseline’s incomplete description limits the strength of that conclusion. The reference to 40 epochs alongside an absence of fine-tuning leaves uncertainty about the exact experimental operation. A reader can accept the broad contrast between an unadapted resource and a task-trained classifier while withholding stronger claims about the precise magnitude of a reproducible intervention.

#### Additional domain training

The later configuration adds training on Fiscal Agency handbooks and then repeats task-specific adaptation using the prior question data. This is the closest the paper comes to isolating a further domain-related change. It suggests that technical source material can help even after question classification is already working.

However, there is no reported repeated-run analysis. The study does not establish whether the observed improvement is stable across initializations, alternative samples, or different test questions. Nor does it analyze which kinds of requests improve. The additional training may affect terminology, recurring constructions, or other features, but the paper supplies no controlled breakdown among those explanations.

The experiment also does not show that more domain text is always useful. It tests one source category within one application. The handbooks’ relevance is a plausible reason for selecting them, but the study does not compare relevant and irrelevant documents or investigate the amount of domain material required.

#### Data expansion and balancing

The expansion procedure is important to the system, yet its components are not experimentally separated. There is no reported comparison between training only on the original pairs and training on the expanded questions. There is also no manual-only versus grammar-only comparison.

Consequently, the study cannot quantify the independent contribution of either expansion method. Their combination is part of the successful recipe, but inclusion in that recipe is not equivalent to a measured causal effect. The paper’s practical description is useful; its evidence about which expansion mechanism matters most is limited.

The same applies to balancing. The authors explain why they reduce the generated pool, but do not report a balanced-versus-unbalanced experiment. Their concern about automatic material dominating training is reasonable, yet the claimed overfitting risk is not demonstrated through a published learning curve or controlled comparison.

#### Ranking and competing systems

The first-answer and shortlist measurements reveal an aspect of error structure. They indicate that candidate coverage is stronger than the final automatic choice under the reported conditions. This is an analysis of output ranking, not an ablation of an internal component.

The DialogFlow experiment supplies another reference point, but it is also not an ablation. Changing the full system changes numerous factors at once. Without detailed matched configuration, the comparison cannot tell the reader whether the result arises from language representations, intent definitions, data preparation, or platform-specific training behavior.

The paper likewise provides no evaluated recurrent alternative. Its discussion of recurrent architectures explains the authors’ engineering choice, while the proposed review of other platforms remains future work. Those discussions should not be promoted into experimental evidence about architectures the authors did not test.

#### Context and feedback remain outside the comparisons

The suggested external and internal context mechanisms have no accompanying results. The reported accuracy therefore cannot be credited to dialogue-state rules or context-conditioned training. Their appearance in the conclusion identifies anticipated weaknesses and possible remedies, instead of explaining an observed experimental improvement.

User feedback is similarly unevaluated as a learning mechanism. The interface can collect judgments, but the paper does not compare behavior before and after incorporating them. Its existence shows an opportunity for continued development; it does not establish that automatic improvement has occurred or that feedback is reliable supervision.

### Limitations

The paper is persuasive as a focused feasibility study. Its main limitation is the distance between demonstrating a useful classifier on a small independent question set and establishing a dependable service across the full range of real requests. Some limits are explicitly recognized by the authors; others follow from the experimental information they report.

#### Limits the authors identify

The authors acknowledge concern about out-of-domain input in their related-work discussion. A classifier can assign a high score to an answer even when the user’s request is not properly covered. They suggest that an additional heuristic might improve the relationship between confidence and correctness.

That suggestion is not an implemented rejection mechanism in the reported experiments. The paper does not provide accuracy on unsupported questions, a threshold for withholding answers, or a measure of how frequently an uncovered request receives an inappropriate response. Its successful within-domain matching result therefore leaves an important operational question unresolved.

Context is another stated development target. The authors propose changing label probabilities through rules or training on context alongside the current text. These ideas acknowledge that an isolated question may not contain everything required for a correct decision.

Neither context proposal includes a measured implementation. The study cannot establish whether the service correctly interprets follow-up questions, resolves omitted information, or distinguishes requests whose meaning depends on prior turns. The Telegram interface makes conversation possible, but an interface alone does not demonstrate conversational understanding.

The authors also recognize that cross-study comparison is difficult. Their invoicing collection is domain-specific and Italian, and they report no directly equivalent published benchmark. This constrains claims about relative performance beyond the systems they actually test.

Further comparisons are explicitly planned. The recurrent alternatives discussed earlier are not evaluated, and the review of Amazon Lex is described as ongoing work. The paper therefore leaves open whether another approach could match or exceed the reported results under comparable conditions.

#### Limits visible in the evaluation design

The independent test collection is valuable, but its composition is only briefly described. The paper does not report how questions are distributed across answer categories or how many categories are represented. Overall accuracy may therefore conceal uneven performance across the answer inventory.

The volunteers’ background is also unspecified. Their separation from training-data expansion reduces one source of familiarity, but does not establish that their questions resemble those of the intended professional users. The authors’ description of the test as unbiased should be understood in relation to contributor independence, rather than as proof that all sampling biases have been eliminated.

No uncertainty estimates accompany the accuracy results. The reader cannot assess run-to-run variability or the stability of the ordering between the stronger systems. Reporting a higher observed score is justified; treating that ordering as a dependable general advantage would require additional evidence.

The experiments are described as successive attempts evaluated on the test corpus. The paper does not identify a distinct development collection or a final untouched evaluation stage. This leaves uncertainty about how much the reported test results influenced configuration choices. It does not prove improper evaluation, but it limits confidence in treating the collection as a completely untouched final test.

#### Limits of the data construction account

The initial question collection determines the possible answers, yet the paper gives little information about how its coverage was established. It does not explain whether the entries systematically cover the legislation, represent common requests, or were selected through another process. Answer recognition is only useful where the maintained collection contains a suitable response.

The expansion grammars are described through an example instead of a complete specification. There is no reported audit of grammatical correctness or meaning preservation across the generated pool. A large pool could contain repetitive variants, awkward combinations, or subtle changes in the conditions of a question.

The final training subset is also difficult to reconstruct. The authors give its size and motivation but not a complete sampling policy. Without those details, another implementation could follow the same broad idea while exposing the classifier to a meaningfully different distribution of examples.

The study does not isolate the quality of the maintained answers. Correctly selecting a recorded response is the reported success criterion, but that does not independently demonstrate that every response is complete, current, or appropriate for all circumstances described by users. For a regulatory application, selection quality and content validity remain separate requirements.

#### Limits of the training description

The account omits several settings needed for close reproduction, including detailed optimization choices and the exact classification-layer configuration. The multilingual starting point is described, but the full experimental identity is not specified at the level needed to recreate every reported condition.

The cosine loss description also leaves implementation questions open. The equation expresses negative cosine similarity, while the prose refers to a one-hot target and logarithmic softmax output. The article can explain that stated objective, but cannot resolve unreported coding choices or assume that another conventional objective was actually used.

The paper supplies no comparison of alternative losses. It therefore cannot support a recommendation that cosine proximity is generally better for this task. The loss belongs to the demonstrated configuration; its independent contribution remains unknown.

The absence of additional domain pretraining in the main result should not be confused with learning from scratch. The project benefits from substantial prior linguistic training embodied in its starting resource. Its feasibility claim concerns adapting that resource economically, not reproducing all of its earlier training within the reported project budget.

#### Limits of the operational evidence

An average CPU response time supports interactive feasibility but does not characterize behavior under changing load. There are no reported measurements of concurrent use, unusually long requests, or the variability of response delays. The hardware description does not turn that average into a universal latency guarantee.

The development-time claim also requires context. Completing this project within the stated period demonstrates what the authors achieved with their resources and existing material. It does not establish the same schedule for a new domain whose answers must first be researched, whose terminology is less well covered, or whose content requires a more elaborate review process.

Feedback handling remains insufficiently specified. Positive and negative judgments may reveal useful errors, but the paper does not explain how they become changes to the service. Without that procedure, claims of continuing improvement remain a development intention rather than an evaluated outcome.

Finally, the study provides no sustained deployment analysis. The existence of a working Telegram demonstration is meaningful, but there are no reported long-term usage patterns, maintenance outcomes, or evaluations after regulatory content changes. The evidence supports a practical prototype and a promising restricted application, with dependable ongoing operation still requiring further assessment.

### What came after

No subsequent citing study is identified in the available record, so there is no documented research lineage to describe. The works discussed in the paper’s related-work section are its predecessors or contemporary reference points; they should not be presented as later developments caused by this application.

The clearest continuation is the authors’ own agenda. They propose context-sensitive selection, either through external rules or through a classifier that receives contextual information alongside the current question. They also intend to compare additional tools on the same task. These are stated plans, without accompanying evidence that the extensions were completed or improved the service.

The unresolved questions define what a follow-up evaluation would need to establish: whether independent users remain well served, whether unsupported requests are recognized, whether context resolves ranking errors, and whether feedback leads to verified improvement. The paper’s lasting contribution within this record is the demonstrated combination of restricted answers, expanded questions, task adaptation, and an accessible interface, together with a clear boundary between a successful application experiment and the broader reliability claims it does not yet support.

## Cite

Cite as Francesca Alloatti, Luigi Di Caro and Gianpiero Sportelli. 2019. Real Life Application of a Question Answering System Using BERT Language Model. Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/w19-5930](https://doi.org/10.18653/v1/w19-5930)

```bibtex
@inproceedings{alloatti2019real,
  title = {{Real Life Application of a Question Answering System Using BERT Language Model}},
  author = {Francesca Alloatti, Luigi {Di Caro} and Gianpiero Sportelli},
  booktitle = {Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue},
  year = {2019},
  doi = {10.18653/v1/w19-5930},
  url = {https://doi.org/10.18653/v1/w19-5930}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
