Building Chatbots from Forum Data: Model Selection Using Question Answering Metrics

Martin Boyanov, Preslav Nakov, Alessandro Moschitti, Giovanni Da San Martino, Ivan Koychev

Introduction

Building specialized chatbots for niche domains like insurance or local travel is a significant challenge in natural language processing. The primary bottleneck is the scarcity of high-quality dialog datasets, which are expensive and time-consuming to curate. While Community Question Answering (cQA) forums like StackOverflow or Qatar Living offer a wealth of domain-specific knowledge, they are inherently "noisy." Forum posts often contain long, multi-paragraph responses with irrelevant chatter, making them difficult for standard sequence-to-sequence (seq2seq) models to process.

Furthermore, evaluating chatbot performance remains problematic. Standard metrics like BLEU, which measure n-gram overlap with reference answers, often fail to correlate with human judgments of conversational quality. This paper proposes a pipeline to leverage noisy forum data and introduces a novel model selection strategy based on extrinsic Question Answering (QA) metrics.

Methodology

The authors developed a three-stage pipeline to transform raw forum data into a functional chatbot:

1. Salient Sentence Pair Selection

To address the noise in forum posts, the researchers did not use entire threads. Instead, they decomposed questions and answers into individual sentences. Using word embeddings (word2vec), they identified the single most similar question-sentence and answer-sentence pair for each interaction. This filtering process extracts the "core" information, discarding irrelevant context and noise.

2. Sequence-to-Sequence Modeling

The core architecture is a standard encoder-decoder model equipped with an attention mechanism and Gated Recurrent Units (GRUs). This model learns to map the extracted question sentences to their corresponding answer sentences.

3. Extrinsic Model Selection

The paper's most significant contribution is its approach to model selection. Traditionally, models are selected based on intrinsic metrics like validation loss or BLEU scores. The authors instead used an extrinsic QA task: the chatbot generates an answer for a given question, and this generated answer is used to rank existing human-provided answers from the forum. Model performance is then measured by Mean Average Precision (MAP)—how well the generated answer helps identify "Good" human responses.

Experimental Results

The models were trained on data from the Qatar Living forum and evaluated using the SemEval-2016 Task 3 dataset.

Quantitative Performance and the "BLEU Trap"

The model optimized for MAP achieved a score of 63.45%, significantly outperforming the baseline of 52.80%. Crucially, the researchers found that optimizing for BLEU actually degraded performance in human evaluations. BLEU tends to favor longer, grammatically correct responses that may lack factual relevance to the specific question.

Human Evaluation

To validate the extrinsic selection strategy, the authors conducted a manual evaluation using 100 questions: 50 derived from the forum and 50 new conversational queries.

Manual evaluation results comparing models optimized for different metrics across different question sets.

As shown in the evaluation results, the model optimized for MAP consistently outperformed those optimized for BLEU or seq2seq loss. Human annotators rated the MAP-optimized model's answers as "Good" approximately 47-49% of the time across both forum-style and conversational questions.

Qualitative Analysis

The qualitative differences between the optimization strategies are stark. Models optimized for BLEU often produce generic or irrelevant "safe" responses, whereas MAP-optimized models provide more specific, informative answers.

Example responses from models optimized for BLEU, seq2seq loss, and MAP, illustrating the superior relevance of MAP optimization.

In the examples above, the MAP-optimized model correctly identifies specific entities (e.g., "al sharq spa", "dr. choc") or provides more accurate factual information compared to the BLEU-optimized model, which often defaults to generic phrases like "i think it is a good place."

Discussion and Limitations

While the MAP-based selection strategy represents a significant step forward, several challenges remain:

  • Repetition: The model occasionally generates repetitive phrases (e.g., "food is good for food").
  • Logical Reasoning: The system struggles with complex constraints, such as exclusions (e.g., "other than the Corniche").
  • Genericness: Despite improvements, the model still occasionally falls back on uninformative "safe" responses.

Conclusion

This research demonstrates that forum data can serve as a viable surrogate for dialog data when combined with effective sentence selection and extrinsic evaluation metrics. By moving away from standard translation metrics like BLEU and toward task-oriented metrics like MAP, researchers can build more relevant and informative domain-specific chatbots.

Summary updated

BibTeX
@inproceedings{boyanov2017building,
  author = {Martin Boyanov and Preslav Nakov and Alessandro Moschitti and Giovanni Da San Martino and Ivan Koychev},
  title = {{Building Chatbots from Forum Data: Model Selection Using Question Answering Metrics}},
  booktitle = {RANLP},
  year = {2017},
  url = {https://openreview.net/forum?id=WHHbxnufHBm},
}
Figure