Generate-then-Retrieve: Intent-Aware FAQ Retrieval in Product Search

Zhiyu Chen, Jason Ingyu Choi, Besnik Fetahu, Oleg Rokhlenko, Shervin Malmasi

Abstract

In modern e-commerce, search engines are primarily optimized for keyword-based product discovery. However, a significant subset of user queries involves service-related or technical questions that are poorly served by traditional product ranking algorithms. This paper details a "Generate-then-Retrieve" pipeline designed to integrate FAQ answers into product search results. By employing a high-precision intent classifier to filter queries and a generative model to reformulate keyword searches into natural language questions, the system achieves a 13% improvement in retrieval accuracy (Hit@1) and a 95% reduction in computational latency.

1. Introduction

Traditional e-commerce search architectures are built to match short, keyword-heavy queries (e.g., "noise cancelling headphones") with product catalogs. As user behavior evolves, search bars are increasingly used for troubleshooting and information seeking (e.g., "how to reset headphones"). When these "question-intent" queries are processed by standard product search engines, the results are often irrelevant, leading to a poor user experience.

Simply querying an FAQ database for every search is computationally expensive and risks cluttering the interface; research indicates that for 98% of typical shopping queries, an FAQ result would be irrelevant. The challenge is twofold: accurately identifying when a user is asking a question (Intent Awareness) and bridging the linguistic gap between shorthand keywords and long-form FAQ prose (Semantic Alignment).

2. The Generate-then-Retrieve Pipeline

To address these challenges, we propose a three-stage modular pipeline designed for high precision and low latency.

2.1 Intent Classification (The Gatekeeper)

The first stage utilizes a fine-tuned RoBERTa-large model to classify incoming queries as either "question intent" or "non-question intent." To maintain the integrity of the shopping experience, the system only triggers FAQ retrieval if the model's confidence exceeds a 0.9 probability threshold. This selective triggering ensures that FAQ results do not distract users during standard product discovery.

2.2 Query Reformulation (The "Generate" Step)

There is a significant mismatch between how users search and how FAQs are written. A user might type "apple tv bluetooth," whereas the relevant FAQ is titled "How do I connect a Bluetooth device to my Apple TV?". To bridge this gap, the pipeline employs a sequence-to-sequence Transformer model (BART or T5) to rewrite keyword queries into grammatically correct, natural language questions. This step is critical for improving the performance of downstream retrieval models.

2.3 FAQ Retrieval (The "Retrieve" Step)

The reformulated question is then used to query the FAQ database. The researchers evaluated several ranking strategies, including BM25 for lexical matching, Sentence-BERT (SentTrans) for dense vector retrieval, and a BERT-Rerank cross-encoder model to maximize precision in the final results.

3. Experimental Setup and Datasets

The system was trained and validated using several specialized datasets:

  • Intent Classification: A dataset of 18,972 queries was developed. Due to the sparsity of question-intent queries in live traffic, the authors used the RAKE keyword extraction algorithm on public product questions to bootstrap the data, followed by iterative human annotation.
  • Reformulation: 1,500 pairs of keyword-to-question mappings were used to fine-tune the BART and T5 models.
  • FAQ Corpus: Evaluation was conducted against an internal Amazon FAQ database.

4. Key Results and Insights

The "Generate-then-Retrieve" approach yielded significant improvements across both technical and user-centric metrics.

4.1 Retrieval Accuracy

The inclusion of the "Generate" step proved vital. Using T5-based query reformulation improved Hit@1 by 13% compared to using raw keyword queries. The combination of T5 reformulation and a BERT-Reranker provided the highest Mean Reciprocal Rank (MRR), ensuring that the most relevant answer appeared at the top of the results.

4.2 Computational Efficiency

By using the intent classifier as a high-precision gatekeeper, the system avoids invoking heavy generative and ranking models for the vast majority of search traffic. This architectural choice resulted in a 95% reduction in latency compared to a baseline system that attempted FAQ retrieval for every query.

4.3 User Impact

In a live A/B test on a major e-commerce platform, the system demonstrated high utility. 71% of users who were presented with the FAQ results provided explicit positive feedback. This suggests that the system successfully identifies and satisfies informational needs without introducing "search friction."

5. Conclusion and Future Work

The proposed pipeline demonstrates that generative models can effectively bridge the gap between keyword-based search and structured knowledge bases. By focusing on precision and selective triggering, the system provides relevant answers while maintaining the speed and focus of a product search engine.

Future research will focus on handling query ambiguity—where a single keyword might map to multiple distinct questions—and exploring end-to-end training architectures to further optimize the transition between intent detection and answer retrieval.

Summary updated

BibTeX
@inproceedings{chen2023generate,
  author = {Zhiyu Chen and Jason Ingyu Choi and Besnik Fetahu and Oleg Rokhlenko and Shervin Malmasi},
  title = {{Generate-then-Retrieve: Intent-Aware FAQ Retrieval in Product Search}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-industry.73},
}
Figure