Elamur Research

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

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

Summary

A person seeking help with invoicing may describe a business situation without using the terminology of the relevant guidance. Francesca Alloatti, together with Luigi Di Caro and Gianpiero Sportelli, examines the practical problem of matching that description to a suitable answer. Their application concerns Italian electronic invoicing and digital billing following legislative changes. They investigate whether a useful question answering service can be assembled quickly from limited initial material, using BERT to recognize which existing answer a question requires.

The system treats answering as text classification. An incoming message receives a label corresponding to an entry in a maintained question–answer collection. The response comes from that entry; the application does not compose an explanation or extract a passage from a handbook when a user asks something. After cleaning their starting material, the authors have roughly 300 question–answer pairs. They enlarge the question collection through human rewriting and grammar-driven combinations, producing more than 210.000 pairs. They subsequently select 2300 sentences for training, balancing the contributions of the expansion methods because automatic generation supplies disproportionately many examples. The response texts are kept intact throughout this process.

Evaluation uses 200 questions collected from volunteers who were not involved in creating the expanded training questions. The reported unadapted BERT condition obtains 3,6 % accuracy, with the description also referring to 40 epochs. After task-specific training, first-answer accuracy reaches 86%; allowing the correct response to occur within the first three candidates gives 93,6%. A further experiment introduces language training on Italian Fiscal Agency operational handbooks before repeating the task adaptation, producing 88 % first-answer accuracy. An external Google DialogFlow intent-detection comparison obtains 84%. These observations show that the authors’ adapted system can recognize many independently written questions in this restricted setting. They do not determine how much each expansion technique contributes or how stable the ordering between the stronger configurations would be across repeated experiments.

The engineering account is part of the contribution. The reported hardware consists of an 8-core CPU, a GPU with 28 GB, and 32 GB of RAM; expansion and training combined require at most eight days, while each experimental round takes about one hour. At prediction time, the mean wait for an answer is 0. On a CPU architecture: 2 seconds. A Telegram interface exposes the service and lets users express approval or disapproval of its responses. The resulting study demonstrates a feasible path from a small answer inventory to an interactive application. Its evidence remains narrower than a claim of dependable regulatory assistance: unsupported requests, continuing conversations, the maintenance of answer content, and improvement from collected feedback receive no comparable evaluation.

Interesting ideas

Keep the response inventory stable while broadening access. The paper concentrates variation on the questions and leaves their associated answers unchanged. This makes the learning problem easier to define: recognize which maintained entry applies. The approach is useful for support services and procedural information where response wording is deliberately controlled. It also creates a useful diagnostic boundary. An unsuitable response may reflect a recognition mistake, an inadequate inventory entry, or a question outside the inventory’s scope; those are different problems even when the user experiences all of them as a bad answer.

Assign repetitive wording to grammars and irregular wording to people. Some questions contain constructions that can be varied systematically, whereas others resist economical templating. The authors distribute expansion work accordingly. The transferable principle is to choose an acquisition method based on the structure of the material. Repeated patterns can justify a generator whose alternatives are inspected, while less predictable expressions deserve individual attention. This division can help with query collections, classification examples, and linguistic annotation, provided that a generated sentence continues to express the intended request.

Choose training influence independently of production volume. A grammar may emit many sentences with little additional effort, but ease of generation does not make each sentence equally informative. The authors reduce their expanded pool before training because automatic variants would otherwise dominate. This suggests tracking the origin and construction family of examples when sampling a training collection. The paper does not validate a universal balancing rule; its reusable insight is that a data generator’s productivity should not silently become the application’s definition of typical language.

Recruit evaluation writers outside the preparation team. The test contributors did not participate in question expansion. That arrangement challenges the recognizer with phrasing from people who do not already know the developers’ examples. It is particularly useful when training material contains substantial human-authored or templated language. Independent contributors can expose assumptions about vocabulary and question structure that remain invisible within the preparation team. Their independence addresses familiarity with training wording, although representative recruitment and coverage still require separate attention.

Measure immediate selection and candidate availability separately. Finding the answer somewhere in a shortlist is easier than placing it at the top. Reporting both outcomes distinguishes a failure to retain the relevant response from a failure to choose it first. This distinction matters for search, assisted decision interfaces, and classification systems that preserve alternatives. It also keeps evaluation aligned with the user experience: an application that sends a single response cannot claim the performance of a procedure that allows several candidates.

Adapt the decision task before investing in further domain preparation. The authors first establish a successful question classifier using an existing BERT resource, then investigate additional training on technical documents. Their sequence separates learning the answer categories from acquiring further familiarity with domain language. An engineer can borrow that experimental discipline without adopting the same architecture: compare a working general component with a task-adapted version, then test whether domain-specific additions provide further value. The stages should remain separately identifiable so that cost and benefit can be assessed.

Include practical operation in the evaluation. The paper reports project duration, computing equipment, experimental turnaround, and prediction latency alongside answer accuracy. These measurements answer different feasibility questions. A system may be accurate enough for a demonstration but expensive to revise, or inexpensive to train but inconveniently slow to use. Considering the whole service gives a more useful engineering account than an isolated score. The same principle applies to bounded language modules whose predictions must fit into a larger operational workflow.

Deep dive: Real Life Application of a Question Answering System Using BERT Language Model

How BERT matched Italian invoicing questions to fixed answers, how the authors expanded scarce data, and what their tests establish. · about 39 minutes to read

How Mova uses it

Mova is a compact Rust language system whose native processing combines linguistic structure, explicit rules, statistical parameters, and graph knowledge. The relevant connection is methodological: this paper offers a tightly bounded answering task and several practical choices about constructing and testing it. Its BERT results do not establish corresponding performance for Mova. The status judgments below identify overlap with documented Mova mechanisms; they are proposed mappings, not records that this paper produced those implementations. Where a particular application is unconfirmed, its implementation and measured effect remain unknown.

Idea: Define an answer inventory before recognizing requests. Where: Data and Fine-tuning Process; Results. Area: question answering. Mova: частково є (world maintains answerable state, while configured worker capabilities connect supported requests to installed handlers). A proposed information service could register response entries with explicit coverage conditions and source references, then use native question interpretation to select among them. This would require a dedicated application beyond the documented readers. Why Mova: a declared response space gives a logical module a concrete success condition and makes missing coverage easier to distinguish from failed recognition.

Idea: Change question wording without changing response content. Where: Data and Fine-tuning Process. Area: data construction. Mova: частково є (tools/enrich prepares grounded teaching proposals and validates staged material). A proposed expansion packet could retain an answer identifier while attaching reviewed alternative questions. Its checks would need to preserve the conditions that make the answer applicable, rather than merely retain related vocabulary. No equivalent end-to-end expansion service is established by the digest. Why Mova: the system could improve access to an existing explanation without treating every paraphrase as newly acquired knowledge.

Idea: Separate training-time grammars from answer-time rules. Where: Introduction; Data and Fine-tuning Process. Area: system architecture. Mova: вже є (offline teacher preparation is separated from native assessment, and operational adapters have explicit execution interfaces). The paper’s grammar use suggests recording whether a rule constructs examples or decides an answer. Mova could expose this distinction in application documentation and traces. The authors’ absence of an output-refinement layer does not imply an absence of human-designed preparation. Why Mova: clear placement of rules prevents training aids from being mistaken for the mechanism responsible for a runtime conclusion.

Idea: Send recurring constructions to a bounded generator. Where: Data and Fine-tuning Process. Area: syntax and data. Mova: частково є (en supplies structural analysis, and tools/enrich bounds proposal preparation). A proposed generator could accept only declared question families whose structure is understood, while forwarding other formulations for review. The paper motivates this allocation of effort but provides no automatic eligibility test. Mova would therefore need to justify its own eligibility conditions. Why Mova: repetition can be handled economically while uncertain constructions remain visible instead of being forced through an unsuitable template.

Idea: Give interchangeable components linguistic constraints. Where: Data and Fine-tuning Process, the displayed grammar. Area: morphology and syntax. Mova: частково є (en exposes morphological information, and prag derives roles from parsed structure). Mova could represent template alternatives as constrained choices, checking that verbal and nominal substitutions fit their construction and preserve the requested action. These checks would be a proposed extension; the paper does not describe a typed slot system. Why Mova: explicit compatibility conditions would make generated questions inspectable and reduce accidental changes introduced by unconstrained substitution.

Idea: Keep human rewriting available for difficult variation. Where: Data and Fine-tuning Process. Area: data acquisition. Mova: частково є (tools/enrich supports teacher review of prepared proposals, separate from validation and admission). A question-expansion workflow could flag seeds that do not fit a safe generator and request individually reviewed alternatives. The relevant transfer concerns division of work, rather than accepting unrestricted generated language. Why Mova: structurally unusual requests can receive attention without requiring the native generator to pretend that every expression belongs to a known family.

Idea: Remove defective seeds before multiplication. Where: Data and Fine-tuning Process. Area: data quality. Mova: частково є (tools/enrich validates staged artifacts, while tools/dictindex retains exact occurrences and source identities). Before expanding questions, Mova could report duplicate candidates separately from formulations needing linguistic revision. Exact identity and judgments about suitability would need different checks. The particular cleaning policy used by the authors is not fully specified. Why Mova: resolving a seed-level problem early avoids producing a large, apparently varied collection that repeats the same underlying defect.

Idea: Record expansion provenance as training metadata. Where: Data and Fine-tuning Process; The Fine-tuning. Area: provenance. Mova: вже є (tools/enrich uses fingerprints, and the annotation workflow preserves versions). Those facilities could record a question’s seed, generator family, review event, and production method. This is a proposed application of existing provenance mechanisms, not evidence of a deployed question-expansion register. Why Mova: later sampling and error analysis could distinguish genuine linguistic breadth from repeated output of a productive construction.

Idea: Balance evidence sources before fitting parameters. Where: The Fine-tuning. Area: statistics and training. Mova: частково є (training changes face held-out checks, but generation-source balancing for this task is not documented). A proposed manifest could make the contribution of human and automatic examples explicit, then compare sampling policies. The paper gives a motivation for balancing without proving that its selected policy is optimal. Why Mova: transparent sampling would prevent the easiest examples to manufacture from determining the linguistic distribution seen by a learner.

Idea: Keep the generated pool distinct from admitted training material. Where: The Fine-tuning. Area: data lifecycle. Mova: вже є (tools/enrich distinguishes prepared proposals, reviewed outputs, and staged drafts, with admission remaining separate). A question application could similarly preserve the larger candidate pool while publishing a smaller, versioned training selection. The paper’s intermediate and final collection sizes motivate that distinction. Why Mova: generation can remain exploratory without giving every candidate the authority of an accepted training example.

Idea: Separate test contributors from expansion contributors. Where: Data and Fine-tuning Process. Area: evaluation design. Mova: частково є (assessment material is isolated from training, and dictionary indexing excludes school examination text). Mova could additionally record who contributed to wording preparation and who supplied evaluation requests. This is a different property from keeping files in separate directories. Why Mova: contributor separation can reveal unfamiliar ways of asking about known content, which is precisely the access problem a question recognizer must solve.

Idea: Evaluate complete user messages. Where: Table 1; Data and Fine-tuning Process. Area: pragmatics and evaluation. Mova: частково є (prag extracts structured events and speech-act information from parsed text). A proposed benchmark could preserve polite openings, explanations, and related clauses around the main request. The objective would be to test whether native interpretation identifies the relevant question without a preparatory rewrite. Why Mova: a logical module needs evidence that it can reach the operative request through ordinary surrounding language, not only through canonical assessment sentences.

Idea: Test reformulations that express equivalent conditions. Where: Table 1. Area: semantics. Mova: частково є (prag supplies participant roles and world represents entities and states). The private-client example suggests evaluating whether different descriptions of a relevant condition lead to the same response entry. For Mova, proposed equivalence checks should be grounded in declared concepts and domain facts rather than word overlap alone. Why Mova: users may name a category or describe its relevant property, and the recognizer should expose the knowledge connecting those expressions.

Idea: Distinguish the target category from its textual realization. Where: The Fine-tuning, the label-vector description. Area: knowledge representation. Mova: вже є (compiled concept identifiers and structured world representations separate identities from ordinary surface wording). A bounded answer service could give each response category a durable identifier and associate alternative questions with it. The authors’ answer-linked labels motivate the task shape, although their label organization is only briefly described. Why Mova: explicit identities make it possible to revise wording without silently changing what the application is trained to select.

Idea: Report immediate accuracy and shortlist coverage independently. Where: Results. Area: evaluation. Mova: частково є (the mathematical solver retains competing branches and uses top-K judging). A question-selection application could report whether its chosen entry is right and whether a suitable entry survives among alternatives. No corresponding fixed-answer benchmark is confirmed in the digest. Why Mova: these measurements separate a failure of candidate construction from a failure of final judgment, giving later rule or parameter work a more precise target.

Idea: Match the evaluation rule to the deployed response. Where: Results; the Telegram application description. Area: operational evaluation. Mova: частково є (worker protocols distinguish receipts and admitted outcomes). If Mova returns a single maintained response, its headline score should assess that response; an alternative-sensitive score should be labeled separately. This is a proposed reporting rule grounded in the paper’s different answer-selection measurements. Why Mova: a favorable diagnostic should not replace the success criterion experienced by the person using the service.

Idea: Compare adaptation stages with the task collection held steady. Where: Results, the handbook-training experiment. Area: experimental design. Mova: вже є (regression gates and before-and-after checks require comparable assessment conditions). Mova could compare native task configuration, domain vocabulary additions, and decision-parameter changes as separately identified interventions. This would be a symbolic and statistical analogue of the authors’ adaptation sequence. Why Mova: keeping the task evidence stable makes it easier to identify which kind of change produced an observed benefit.

Idea: Preserve the distinction between documents and labeled requests. Where: Results, Italian Fiscal Agency handbooks. Area: domain learning. Mova: частково є (tools/sources records origin, tools/dictindex retrieves parsed evidence, and tools/enrich stages reviewed teaching proposals). Domain documents could support terminology and concept proposals, while labeled requests teach response selection. These roles should remain separate in manifests and evaluation. Why Mova: textual familiarity with a subject and knowledge of which answer a request needs are related but nonidentical capabilities.

Idea: Use authoritative material without inferring correctness from origin alone. Where: Results, the additional domain-training source. Area: evidence handling. Mova: вже є (source credit is retained, and dictionary-index provenance is explicitly distinct from admission). Mova could use official documents as attributed evidence while still checking the exact proposed lexical or conceptual addition. The paper selects reliable handbooks but does not independently measure factual correctness after adaptation. Why Mova: respected provenance helps locate evidence, while explicit admission determines what the native system is entitled to conclude.

Idea: Treat the highest score as a candidate judgment. Where: Related Works, discussion of out-of-domain instability. Area: uncertainty. Mova: частково є (layers supports escalation, configured planning preserves unsupported outcomes, and prag reports confidence–correctness analyses). A bounded answer service could require demonstrated coverage before admitting the leading response. The paper raises this concern but evaluates no rejection rule. Why Mova: a logical module should be able to explain why an answer applies, rather than equate winning a ranking with satisfying the request.

Idea: Apply dialogue state through explicit external conditions. Where: Conclusion and Next Steps, External operation. Area: dialogue and rules. Mova: частково є (world stores contextual state, and configured task planning can retain missing_context). Mova could let declared dialogue facts restrict candidate entries, with the responsible condition included in the selection trace. The paper proposes changing label probabilities externally; no performance result is attached to that proposal. Why Mova: inspectable context conditions would allow a reviewer to distinguish a faulty rule from a faulty reading of the current message.

Idea: Make contextual dependence part of the interpretation interface. Where: Conclusion and Next Steps, Internal operation. Area: semantic representation. Mova: частково є (layers identifies context as a computational level, supported by world, prag, and related state). A proposed question interpreter could accept a typed context argument and state which fields it used. This transfers the distinction between text-only and context-conditioned decisions without requiring the authors’ neural architecture. Why Mova: explicit dependencies expose missing referents and assumptions before they become an unsupported answer.

Idea: Store feedback before deciding how to learn from it. Where: Results, positive and negative Telegram feedback. Area: learning workflow. Mova: вже є (review, staging, admission, and parameter revision are distinct operations; raw outputs do not automatically become supervision). A response-feedback event could retain the request, selected entry, returned text, and user judgment for later investigation. The paper supplies no evaluated feedback-update procedure. Why Mova: feedback can identify useful work without granting every approval or objection direct authority over knowledge and rules.

Idea: Diagnose recognition errors separately from content defects. Where: Table 1; Data and Fine-tuning Process. Area: error analysis. Mova: частково є (fast-reader analysis distinguishes representation, inference, parameter, and parsing failures). A fixed-response service could add explicit categories for a wrong match, an absent entry, and an inadequate maintained answer. Such a taxonomy is a Mova hypothesis rather than a reported analysis in the paper. Why Mova: different failures demand different repairs, and a single incorrect-answer flag cannot identify the responsible mechanism.

Idea: Measure the complete interactive path. Where: Results, CPU response timing. Area: performance engineering. Mova: частково є (tools/jobs records actual resource use, and tools/twin supports measured execution and calibration). A proposed question-service receipt could time interpretation, candidate access, judgment, and delivery under a declared configuration. Its measured behavior would remain unknown until run. Why Mova: the service’s usefulness depends on the time users actually wait, while stage measurements reveal where optimization would help.

Idea: Include preparation and revision cost in application evidence. Where: Introduction; The Fine-tuning. Area: engineering evaluation. Mova: частково є (experiment journals preserve work outcomes, and resource tools record estimates and actuals). Mova could attach preparation effort, training duration, and hardware context to an application assessment rather than publishing accuracy alone. The authors’ schedule is evidence for their project, not a forecast for Mova. Why Mova: a small language system should make the cost of acquiring and maintaining a capability inspectable.

Idea: Compare alternatives using a shared task definition. Where: Results, DialogFlow comparison; Conclusion and Next Steps. Area: comparative evaluation. Mova: вже є (paired testing and common-question comparisons are documented practices). A bounded task could compare native frame matching with another recognizer while preserving the response inventory and assessment requests. The paper motivates the practical comparison but leaves important comparator settings unspecified. Why Mova: shared inputs make differences meaningful, and retained configurations keep a platform comparison from becoming an unexplained score ordering.

Idea: Trace the passage from request to selected entry. Where: Figure 1; Table 1. Area: interpretability. Mova: вже є (native decisions retain reasons, and school traces preserve choices with evidence). A response-selection trace could show the original message, interpreted question, candidate identity, and associated response as distinct objects. This extends an existing transparency principle to the paper’s application shape. Why Mova: the trace would let a reviewer inspect whether the system misunderstood the language or chose incorrectly after an adequate interpretation.

Idea: State the application’s coverage boundary. Where: Introduction; Related Works; Results. Area: task specification. Mova: вже є (configured capabilities declare supported operations, and domain routing records its decisions). An answer inventory could specify covered subject matter and a supported outcome for requests that lack a suitable entry. The paper’s restricted setting supports this need but supplies no measured boundary detector. Why Mova: explicit scope makes both success and abstention understandable, especially when technically related questions require different expertise.

Idea: Keep loss optimization separate from application success. Where: The Fine-tuning, the cosine objective. Area: mathematics and evaluation. Mova: вже є (parameter experiments face held-out behavioral gates instead of being accepted solely from an internal objective). Any proposed statistical question selector should report its fitting objective separately from correct response selection. The authors’ cosine loss is not evidence that Mova should adopt that objective. Why Mova: improved internal fit can be useful, but the admitted claim must concern the behavior the logical module is supposed to deliver.

The problem and its context

The motivating difficulty is a gap between a general language technology and a small, urgent application. The authors describe organizations needing a specific function without possessing a large task corpus or an expansive development budget. Progress in natural language processing does not automatically remove those constraints. A practical project still needs examples, an answer space, a training procedure, and an interface that people can use.

Their chosen setting makes the constraints concrete. Italian legislative changes concerning electronic invoicing have prompted questions among professionals. The subject has technical vocabulary, and requests concern whether particular procedures or obligations apply. A service must connect an account of someone’s situation with the relevant maintained information. Merely recognizing that a sentence discusses invoicing is insufficient.

The paper’s running application example concerns private customers and the absence of a VAT number. The user asks about issuing an invoice, describes the customer category, and adds the relevant identifying circumstance. The maintained question expresses the issue more directly. Successful answering requires the system to connect these formulations before returning the associated response about the electronic document.

This is a constrained interpretation problem. The application is not asked to derive the answer from legislation during interaction. Its response inventory has already been assembled. The difficult step is choosing the appropriate entry despite variation in how people describe their circumstances. That restriction makes the task tractable while also defining its limits.

The role of existing language preparation

The authors situate their approach among systems that begin with broad linguistic training and subsequently adapt to a particular task. They cite Deep Contextualized Word Representations and other work in explaining this pattern. The attraction is practical: a project can start from an existing resource instead of acquiring all of its linguistic behavior from scarce application examples.

BERT provides that starting resource. The paper describes it as a bidirectional encoder derived from the Transformer architecture associated with Attention Is All You Need. In the authors’ account, the already available multilingual preparation includes Italian. Their project can therefore concentrate on learning the distinction between response categories.

The relevant prior question-answering applications do not all ask the same thing. The BERT work discussed by the authors includes selecting an answer span inside a Wikipedia passage. They also cite BERTserini as an open-domain answering system deployed through a chatbot. The invoicing study instead emphasizes a narrowly defined service built under immediate resource constraints.

That contrast is important when assessing novelty. The contribution is not a new general architecture or a replacement for open-domain answering. It is evidence about adapting an existing technique to a concrete information service. The question is whether modest initial supervision, expanded strategically, can support useful matching in a specialized Italian application.

Why not undertake extensive specialized preparation first?

The related-work discussion identifies substantial domain preparation as an alternative. BioBERT is presented as a biomedical example whose strong domain behavior depends on extensive pretraining. The authors regard the computational and time requirements of that route as relevant obstacles for smaller projects.

They also discuss SciBERT and Clinical BERT embeddings as examples of specialized representations. These works establish the surrounding interest in domain-sensitive language resources. They are not evaluated against the invoicing service, and their inclusion should not be read as an experimental comparison.

The paper’s initial aim is less demanding: use the available encoder, adapt it to the answer-selection task, and inspect the outcome. A later experiment does introduce additional domain text. This ordering makes the main feasibility claim easier to understand. The authors are testing whether useful application behavior requires a large new domain-pretraining effort, not whether language pretraining itself can be dispensed with.

Alternatives and anticipated weaknesses

Recurrent architectures are another possibility considered by the authors. Their discussion mentions attention-based recurrent systems and LSTM or GRU additions. They reject that route for this project on the grounds of the training data they expect to need and the time consequences of training constraints.

This is a design argument, not a measured result from their invoicing corpus. No recurrent system is trained and scored alongside BERT in the reported experiments. The rationale helps explain their choice but cannot establish that a recurrent implementation would necessarily be less accurate or more expensive under matched conditions.

The authors also recognize a more general weakness: the response with the greatest confidence need not be an appropriate answer to the actual request. Their discussion of JESSI concerns instability outside the training domain. They suggest an additional heuristic as a possible remedy, while leaving it outside the demonstrated architecture.

The central compromise is therefore explicit. A simple trained classifier offers a quick route to a usable service, but simplicity does not solve every reliability problem. The paper examines how far that route goes on independently written domain questions and leaves context, broader comparisons, and improved decision safeguards for subsequent work.

The method, step by step

The workflow connects a maintained response collection to a classifier trained on alternative questions. Its crucial organizing relationship is between a question variant and the response entry that variant is supposed to select. Generation, sampling, training, and evaluation all depend on preserving that relationship.

Building the invoicing answer selector

The steps in order.

Building the invoicing answer selectorStep 1: Assemble domain question–answer entries1. Assemble domain question–answer entriesStep 2: Remove duplicate and unsuitable wording2. Remove duplicate and unsuitable wordingStep 3: Produce human and grammar-based variants3. Produce human and grammar-based variantsStep 4: Select balanced training questions4. Select balanced training questionsStep 5: Adapt BERT to entry labels5. Adapt BERT to entry labelsStep 6: Retrieve the selected response6. Retrieve the selected responseStep 7: Present answers and collect judgments7. Present answers and collect judgments

Establish the entries that can be selected

The authors gather sentences relevant to electronic invoicing and billing regulations. They remove repeated questions and material judged badly written. The cleaned starting collection contains approximately 300 pairs, with a question associated with an answer in each entry.

These entries do more than provide examples. They establish the available response categories. An incoming message must be linked to one of them for the application to return its maintained answer. The study does not describe a mechanism that creates an additional category during interaction.

Cleaning before expansion is significant because every subsequent variant depends on its seed. If an initial question is unclear or associated with the wrong response, producing more versions does not repair the association. The paper reports the cleaning operation but gives no detailed acceptance rubric or reproducible duplicate-detection policy.

Nor does it explain how the response inventory’s subject coverage was assessed. The collection is coherent with the application domain, but a reader cannot infer that it exhausts the regulatory issues users may raise. The method is best understood as matching against a defined collection whose broader completeness remains unspecified.

Enlarge the language associated with each entry

The expansion procedure divides the initial questions according to whether they exhibit recurrent linguistic patterns. Human rewriting handles one portion; generative grammars handle the other. The authors describe each portion as half of the questions.

A generative grammar here is a compact arrangement of replaceable expressions. The illustrated construction combines a possibility expression, a verb concerning collection, and an invoice noun phrase. Changing the permitted components yields related questions about obtaining or collecting an electronic invoice.

The point is linguistic variation under a stable target. A new question should still lead to the response associated with its source entry. This differs from generating new facts, inventing responses, or deriving legal rules. The grammar supplies training utterances; it is not a runtime decision procedure for the user’s case.

The account does not enumerate every alternative available in the grammar. It therefore shows how combination works without making the expanded material fully reconstructible. It also leaves open how agreement, naturalness, and preserved meaning were checked across combinations.

Manual expansion serves a complementary function. A person can rewrite a question without restricting the operation to the slots of a recurring pattern. The paper does not provide a detailed protocol for this work, so it is unclear how strongly the rewritten questions differ in syntax, vocabulary, or level of formality.

Together, the expansion methods produce more than 210.000 sentence pairs. The answer side is carried through unchanged. Accordingly, the enlarged collection contains many formulations associated with the existing response categories, rather than a comparably enlarged inventory of distinct answers.

Reduce the pool before fitting the classifier

The training collection actually used contains 2300 sentences. This is a selected collection from the much larger expansion output. The distinction matters: the largest reported data quantity describes a production pool, not the amount of language used in the final fitting procedure.

The authors’ reason for reduction is imbalance. Grammar-based generation produces considerably more material than manual rewriting. Without intervention, automatically constructed patterns would dominate training. They describe balancing as a way to avoid overfitting.

Overfitting is the possibility that fitted behavior reflects the peculiarities of the available examples more strongly than the task users actually present. In this application, many combinations from the same construction may repeatedly emphasize a narrow pattern. Their number can make that pattern influential without proving that it is typical of volunteer questions.

The paper supplies the final size and the balancing rationale but not an exact sampling algorithm. It does not report how examples are allocated among response labels, how template families are represented, or whether the selection is repeated. These omissions do not invalidate the reported application result, but they prevent precise reconstruction of an important preparation step.

Obtain questions from independent contributors

The authors collect a separate evaluation set of 200 questions through volunteers. The contributors have not helped expand the training material. This is intended to prevent knowledge of existing formulations from shaping the test.

The procedure addresses a realistic problem in developer-written evaluation. A person who has spent time producing alternatives may ask test questions in much the same style, even without deliberately reusing a sentence. Different contributors provide a more demanding check of whether the recognizer extends beyond that preparation style.

The separation is nonetheless specific. It concerns participation in expansion, not every possible relationship between training and test distributions. Recruitment, contributor expertise, prompt instructions, and category coverage are not described in sufficient detail to establish representative sampling.

The evaluation questions are subsequently used to check the classifier’s output. The study does not identify a separate development collection for selecting among experimental choices. That is a reporting limitation to retain when interpreting the sequence of configurations.

Turn question recognition into label prediction

Task adaptation uses fine-tuning: the authors add a classification layer and update the underlying parameters for the intended job. The label corresponds to an original entry, which in turn supplies the answer.

Their account refers to the 300 initial sentences as labels. Read alongside the earlier description of question–answer pairs, this indicates an entry-based classification problem. The paper does not present a further hierarchy of intents or a formal ontology grouping several entries under shared concepts.

An incoming question is thus mapped into a distribution over labels. Selection identifies the entry whose stored response should be sent. The response is not itself a sequence predicted by the classifier. This makes the quality of the label decision central to the application’s measured behavior.

The paper emphasizes that training does not directly optimize reported accuracy, precision, or recall. Instead, an objective assigns a loss to the relationship between the target and current output. The fitting process seeks to reduce that loss.

Read the stated cosine objective carefully

The chosen objective is described as cosine proximity. Its mathematical form is a negative normalized dot product:

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

L denotes the loss. The vectors are y, the target, and ŷ, the output-side representation. Their components are yᵢ and ŷᵢ. The index i ranges over N components, and Σ indicates addition across those components. The square roots in the denominator give the vectors’ Euclidean lengths.

The target is described as one-hot: its marked component identifies the appropriate label, while the remaining components are unmarked. This supplies a vector representation of the required category rather than a textual representation of the answer.

The numerator measures how the vectors align through componentwise products. Normalization removes the effect of their overall lengths from that alignment measure. With the leading negative sign, stronger alignment produces a smaller loss value, consistent with minimization.

The surrounding prose adds an important implementation detail: the output-side quantity is described through the logarithm of the softmax output. Softmax turns category scores into normalized values. The logarithm then transforms those values before the stated comparison.

The mathematical display is a general cosine expression, while the prose describes the quantities entering it. The paper offers no code-level account that settles every detail of their interaction. A faithful explanation should retain that uncertainty rather than substitute another classification objective because it would be more familiar.

There is also no objective-function comparison. The eventual accuracy belongs to the complete reported setup. It does not establish that cosine proximity is necessary for the result or preferable to alternative fitting criteria.

Add technical documents in the later configuration

After the main task-adapted experiment, the authors investigate further training on domain material. The documents are operational handbooks issued by the Italian Fiscal Agency. Following that training, they repeat task adaptation using the same question data as in the preceding trial.

This procedure introduces a different kind of information. The handbooks contain technical domain language; the labeled questions define the choice among response entries. Their roles should remain distinct even though both contribute to the same final system.

The paper does not provide enough detail about the handbook collection, training schedule, or additional objective to reproduce this stage exactly. Its reported result therefore supports a comparison between described configurations, with a limited account of the intervening operation.

The terminology about achieving good behavior without pretraining also needs care. BERT already brings earlier linguistic preparation. What the initial successful application avoids is an additional domain-specific preparation effort within this project. It does not obtain its language representations solely from the invoicing questions.

Connect prediction to an interactive service

The demonstration uses Telegram as the interaction channel. The user sends a message; the application selects an entry and returns its associated response. The paper’s translated example shows that an extended request about private clients can be connected to a more direct maintained question concerning the absence of a VAT number.

That example illustrates the mapping the classifier is intended to learn. It does not reveal a separate inference engine deriving invoicing obligations. The answer is already attached to the selected entry.

Users can also provide positive or negative feedback. The authors describe those judgments as contributing to future improvement, but do not specify the processing steps between a judgment and a changed predictor. No measured update cycle is given.

A useful distinction therefore remains between an interface feature and a demonstrated learning mechanism. The paper establishes the availability of feedback collection. It does not quantify whether the service becomes more accurate after using that feedback.

The proposed treatment of dialogue context

The conclusion identifies context as an extension. Its external proposal would introduce rules that affect label probabilities. Its internal proposal would train the system to consider contextual information together with the current sentence.

The starting conditional expression is:

p(l | t)

Here, p is a probability, l denotes a label, and t denotes the current text. The vertical bar expresses conditioning: the label assessment depends on the text supplied.

The proposed expression is:

p(l | t ∩ c)

The additional symbol c represents context. The intersection sign is the authors’ notation for bringing context and current text jointly into the decision. They do not define a concrete mathematical set operation or provide a context encoding.

These expressions clarify the intended conceptual change. A text-only decision would become a context-sensitive decision. They do not describe a completed experiment, and the reported answer accuracies should not be attributed to either proposed context mechanism.

Experiments and results

The quantitative evaluation concerns selecting an appropriate maintained response for a question. It does not assess newly written explanations, passage extraction, or a conversation containing several dependent turns. Keeping that unit of success clear is essential because the same phrase, question answering, can refer to very different experimental tasks.

The main collection sizes describe distinct stages. Roughly 300 original pairs establish the entries; more than 210.000 expanded pairs form an intermediate pool; 2300 sentences constitute the final training material. The independently contributed evaluation collection contains 200 questions. Treating the expanded pool as the final training corpus would misrepresent a deliberate choice in the procedure.

What is compared

The study reports successive experiments. The earliest unadapted condition acts as a reference, followed by task-specific fitting and then further domain training. An external intent-detection service supplies an additional practical comparison.

The results are primarily reported as accuracy. Though the training discussion mentions precision and recall, corresponding detailed result tables are absent. There are no category-level scores or uncertainty intervals.

The strongest first-answer result belongs to the configuration with additional domain preparation. The chart separates that condition from task adaptation alone and from the external comparator.

Volunteer invoicing questions: first-answer accuracy

The adapted configurations select suitable entries much more often than the reported unadapted condition.

Volunteer invoicing questions: first-answer accuracyUnadapted BERT: 3,6Unadapted BERT3,6Task-adapted BERT: 86Task-adapted BERT86Domain-trained and task-adapted BERT (this paper): 88Domain-trained and task-adapted BERT(this paper)88Google DialogFlow: 84Google DialogFlow84
The numbers
System or settingaccuracy %
Unadapted BERT3,6
Task-adapted BERT86
Domain-trained and task-adapted BERT (this paper)88
Google DialogFlow84

The 3,6 % condition is described as lacking fine-tuning, with 40 epochs also mentioned. The account does not clarify what exactly proceeds over those epochs under that condition. The figure is therefore a reported baseline observation whose full configuration remains uncertain.

The 86% first-answer result supplies the principal evidence for the application. It shows that the trained selector often reaches the expected response even when the evaluation questions come from contributors outside the expansion process. This is a stronger test than evaluating only on the authors’ generated alternatives.

It is still an aggregate result for the complete recipe. The experiment does not allocate credit among the starting encoder, human rewrites, grammar-generated examples, cleaning, sampling, and fitting objective. All are involved in the successful setup, but their separate contributions are unmeasured.

The benefit of retaining alternatives

The authors also inspect whether the expected answer occurs among the first three candidates. Under that evaluation rule, the reported accuracy is 93,6%. This should be interpreted as shortlist success, not as the accuracy of the single response automatically sent to the user.

The measurement reveals that some relevant entries remain available even when another entry is ranked ahead of them. It therefore gives useful information about the selector’s behavior beyond its top choice.

However, the paper does not evaluate a method for resolving those cases. It reports no clarification dialogue, user choice among candidates, or secondary checking mechanism. A stronger shortlist result demonstrates potential access to the answer, while the procedure for exploiting that access remains unspecified.

Nor is there a breakdown of why nearby candidates compete. They could concern related obligations, similar wording, or distinctions missing from the question, but the study supplies no error categories supporting a particular explanation. Context is a proposed avenue, not an experimentally established solution.

Additional training on domain language

The handbook experiment reaches 88 % first-answer accuracy after additional domain training and repeated task adaptation. The question data are retained from the earlier trial, making the sequence informative about adding domain material to an already successful application.

The authors characterize the result as a further improvement. That is an accurate description of the observed ordering. It does not establish the stability of the ordering because repeated runs and uncertainty estimates are not reported.

The experiment also does not reveal which questions benefit. There is no analysis separating technical terminology, unusual phrasing, or particular response categories. Domain familiarity is a plausible mechanism, but the evidence does not locate the change at that level of detail.

The external intent-detection comparison

Google DialogFlow obtains 84% through an external API used for intent detection. This gives the application a comparator outside the authors’ BERT configurations and supports their claim that the selected route is practically competitive in their test.

The comparison is not fully specified. The account does not provide sufficient detail about comparator configuration, preparation, or tuning to treat the score ordering as a general platform ranking. It records what happened in this application experiment.

The authors plan further comparisons, including consideration of Amazon Lex. Those plans do not add an experimental result. They indicate that the question of which tool works best with the task collection remains open.

Development effort and computational requirements

The reported project duration includes both expansion and training and does not exceed eight days. According to the hardware specification, the CPU has 8 cores, the GPU has 28 GB, and RAM totals 32 GB. These details support the paper’s feasibility argument by giving some context for what the authors regard as affordable development.

A round of experimentation takes approximately one hour. The paper does not break that duration into preparation, fitting, and evaluation stages. It is consequently useful as an account of their turnaround, but insufficient for predicting the cost of a different training schedule.

Prediction is evaluated separately from development. The average answer time is 0.2 seconds using a CPU architecture. This supports the practicality of a responsive demonstration without requiring GPU execution for each request.

An average does not characterize every operational condition. The paper gives no load test, delay distribution, or concurrent-user analysis. It also does not isolate communication overhead from computation. Its timing evidence is meaningful but bounded.

What the demonstration adds

The Telegram integration shows that the predictor can be exposed through an accessible messaging channel. The translated invoice example makes its intended behavior legible: the original request, selected maintained question, and returned response are visible as distinct parts of the interaction.

That illustration is explanatory evidence rather than an additional benchmark. It helps identify what the application is doing, but does not establish the frequency of success beyond the reported evaluation.

The authors themselves caution that comparison with other studies is difficult because their specialized Italian domain lacks a directly equivalent experimental setting. That caution is appropriate. Different answer inventories, languages, or units of correctness can produce scores that look similar while assessing materially different abilities.

What the ablations show

No systematic ablation study is reported; the paper instead offers a progression of configurations, a shortlist analysis, and an external-service comparison.

The main configuration contrast concerns task adaptation. In the reported unadapted condition, answer selection is weak. After fitting to the question-label task, performance is substantially stronger. This supports the authors’ practical conclusion that task-specific preparation is central to their application.

The exact baseline procedure remains incompletely explained, however. The reference to epochs without fine-tuning prevents a precise reconstruction of what changed. The broad result is clear, but a stronger claim about a fully controlled intervention would require additional settings and procedure details.

The domain-training comparison

Adding Fiscal Agency handbooks is the most focused further change described. Task questions are reused after the additional language-training stage, which helps separate that stage conceptually from collecting a new set of labeled requests.

Even so, the comparison lacks repeated trials and a question-level account of changed outcomes. The observed result is compatible with useful domain adaptation, but the study does not establish how consistently it helps or what aspect of the input it improves.

There is also no control using unrelated documents. As a consequence, the experiment cannot distinguish all possible explanations for the added training benefit. The relevance of the handbooks motivates their use, while the causal role of their particular content remains less directly tested.

What remains untested in expansion

The application depends heavily on expanded questions, yet no original-only training condition is reported. The paper therefore cannot quantify the benefit of expansion relative to using the cleaned seed collection alone.

Human rewriting and grammar generation are likewise not separated experimentally. The reader learns that the methods complement each other operationally, but not whether either is essential or whether a different allocation would perform better.

Balancing is explained as protection against overfitting, without a published comparison against the full or unbalanced generated pool. There is no learning curve showing the effect of progressively adding automatic examples. The rationale is useful engineering judgment rather than a measured finding about the optimal data composition.

These absences matter because the expanded pool is visually striking. A large intermediate quantity can draw attention away from the smaller selected collection that actually shapes training. The reported result validates the complete procedure at application level, not the assumption that generating more variants necessarily produces better recognition.

Ranking analysis is different from component removal

Comparing first-answer correctness with shortlist success reveals a distinction in output behavior. It indicates that final ordering is responsible for some failures under the reported evaluation conditions. It does not identify a component whose removal or addition causes those failures.

Similarly, the DialogFlow comparison changes an entire system. It cannot isolate the value of the encoder architecture, training objective, sampling policy, or interface. Its value is practical comparison, with causal interpretation limited by the number of things that differ.

The recurrent alternatives mentioned in the discussion are not evaluated. Their expected costs are part of the authors’ design rationale, not an ablation result. The same boundary applies to future context mechanisms: a proposed remedy should not be used to explain the performance of a system that does not yet include it.

Feedback is a capability, not a measured intervention

The interface collects favorable and unfavorable judgments, but the experiments do not compare operation before and after feedback incorporation. There is no reported test of an update rule or an estimate of feedback reliability.

As a result, the study establishes an avenue for collecting diagnostic information. It does not show continuous improvement from that information. Distinguishing these claims is important because adding a feedback button is much simpler than demonstrating that feedback produces reliable changes without introducing new errors.

Limitations

The strongest supported conclusion is about feasibility: the authors build and evaluate a restricted Italian response-selection service with modest initial supervision and a short reported development period. Dependability across unanticipated requests is a broader question. The paper explicitly recognizes some of that distance, while other limitations follow from missing experimental details.

Boundaries acknowledged by the authors

Out-of-domain behavior is an explicit concern in the related-work discussion. The authors recognize that an apparently confident selection may be inappropriate when the request does not fit what the system has learned. They suggest a heuristic to improve decision quality.

No such safeguard receives an evaluation in the reported system. There is no separate unsupported-question collection, no rejection criterion, and no measurement of how often the application answers when it should refrain. High within-domain selection accuracy cannot fill that gap.

The authors also identify context management as future development. A user may rely on information supplied earlier, and a text-only classifier may not have what it needs in the current message. The proposed external and internal treatments respond to this issue conceptually.

Neither proposal is accompanied by an implemented result. The service therefore cannot be credited with resolving context-dependent follow-ups on the evidence reported. Messaging access supports successive exchanges, but it does not on its own establish that previous turns affect interpretation correctly.

The difficulty of comparison across studies is another stated limit. The domain is specialized, the interaction language is Italian, and the authors do not identify an equivalent benchmark for directly positioning their accuracy against unrelated published systems.

Their plans to compare other tools also acknowledge an incomplete assessment of alternatives. The reported external-service result is informative, but the study does not establish that BERT is the best possible choice for the collection or for similarly constrained projects.

Evaluation coverage visible to a careful reader

The independent contributors provide a useful test of unfamiliar wording. Their questions are not enough, on their own, to establish representative coverage of professional demand. The paper does not report contributor characteristics, recruitment procedures, or the instructions used to elicit questions.

The distribution across response entries is also unspecified. Aggregate accuracy cannot tell the reader whether difficult categories are well represented or whether some entries receive little evaluation. The study offers no category-level results to expose unevenness.

The test collection is used across successive experiments. A distinct development set and an untouched final evaluation are not described. This leaves uncertainty about whether observed test outcomes informed later decisions. It is a limitation of what can be verified, not evidence that the authors deliberately contaminated evaluation.

Statistical uncertainty is absent from the reporting. No repeated-run variation or confidence intervals accompany the accuracy values. The strongest configurations can be ordered by their observed scores, but the reliability of that ordering is not established.

The evaluation also focuses on matching the expected answer. It does not separately assess response completeness, legal currency, or suitability under circumstances omitted from the maintained entry. A correct match can still deliver an inadequate explanation if the inventory itself needs revision.

Reproducibility of data preparation

The seed collection is described by topic and approximate size, without a full account of acquisition or coverage criteria. Another team could assemble a collection about the same subject while choosing materially different questions and answers.

The cleaning criteria remain informal. Removing duplicates and unsuitable sentences is sensible, but the paper does not explain how borderline cases were handled. Reproducing the broad operation does not guarantee reproducing its outcomes.

The grammar description is illustrative rather than exhaustive. There is no full inventory of permitted expressions or a reported audit of all combinations. The reader cannot determine how many generated variants are natural, redundant, or subtly different in meaning.

Balancing introduces another unreconstructed decision. The final training size is given, but the exact sampling distribution and selection procedure are not. Since those choices affect which patterns influence training, they are material to close replication.

These reporting limits should be separated from the application result. They do not show that the data were poor. They show that the evidence is insufficient to independently inspect several choices that may have helped produce the observed accuracy.

Reproducibility of training

The architecture description identifies a classification layer and updates to the underlying parameters, but omits many implementation settings. Detailed optimization choices, the complete layer configuration, and the exact identity of each starting checkpoint are not specified sufficiently for exact reconstruction.

The loss description is another source of uncertainty. Its display gives negative cosine alignment, while its prose refers to logarithmic softmax values. The paper does not provide implementation detail that resolves all questions about the actual output-side vector.

A reader should therefore explain the stated objective without silently replacing it. Equally, the reported success cannot justify recommending that objective over alternatives because no objective comparison is supplied.

The unadapted baseline is particularly difficult to reconstruct because the account pairs an absence of fine-tuning with an epoch count. Its low score is a factual report, but the experimental operation behind it is not sufficiently clear for a strong mechanistic interpretation.

The main feasibility claim also depends on an existing pretrained resource. The project’s schedule does not include recreating all earlier linguistic training. It concerns adaptation and application development from that starting point.

Operational reliability beyond a demonstration

The response-time measurement supports interactive plausibility, but it is not a service guarantee. There are no reported measurements under concurrent load, no description of long-tail delays, and no sustained availability analysis.

The hardware listing provides context without fully specifying execution conditions for every stage. It would be inappropriate to generalize the reported average latency to arbitrary deployments or to assume the same turnaround under different training choices.

The development schedule likewise describes this project. It does not establish how long another domain would take if its initial answers were unavailable, required extensive expert review, or could not be expanded through recurring patterns.

Feedback introduces further unanswered questions. The paper does not describe verification of user judgments, conflict handling, or safeguards around updates. Its statement that feedback will improve subsequent behavior remains insufficiently operationalized to assess.

Maintenance of regulatory content is not studied. A classifier may continue recognizing the same question even after its associated answer needs revision. Because recognition quality and answer validity are distinct, ongoing operation would require evidence about both.

Finally, the absence of handcrafted answer refinement should not be mistaken for an absence of human effort. People choose the entries, rewrite questions, define grammar alternatives, and balance the collection. The demonstrated economy comes from a particular organization of that effort, not from eliminating it.

What came after

No subsequent citing study is identified, so a documented chain of later research cannot be described. The works discussed earlier belong to the paper’s background and comparisons; they provide no evidence of developments caused by this application.

The authors’ own proposed continuation has clear directions. They want context to influence selection, either through rules outside the classifier or through training that receives contextual information together with the current text. They also plan broader tool comparisons, with Amazon Lex among the platforms under consideration. These are research intentions, without accompanying outcomes establishing implementation or improvement.

The open questions are therefore concrete. A follow-up would need to determine whether contextual information resolves actual selection failures, whether uncovered requests can be recognized, and whether collected user judgments lead to verified improvements. It would also need to make comparisons reproducible by retaining the answer inventory, question collection, and configuration details.

The paper’s demonstrated contribution remains the application it reports: a maintained set of responses made accessible through expanded question language, task-specific adaptation, and a working messaging interface. Its significance lies in showing that this restricted route can succeed under the authors’ reported constraints, while leaving broader conversational and operational reliability to further evidence.

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

@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}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/alloatti-2019-real-life-application-question-answering/