NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Query Attribute Modeling: Improving search relevance with Semantic Search and Meta Data Filtering

Karthik Menon, Batool Arhamna Haider, Muhammad Arham, Kanwal Mehreen, Ram Mohan Rao Kadiyala, Hamza FarooqarXiv 2025 · DOI

Abstract

Traditional search systems often struggle to balance the literal precision of keyword matching with the contextual depth of semantic vector search. We present Query Attribute Modeling (QAM), a hybrid search framework that leverages Large Language Models (LLMs) to decompose natural language queries into structured metadata filters and semantic intent. By prioritizing "hard" metadata constraints before applying "soft" semantic ranking, QAM achieves significant performance gains over baseline methods, including a 52.99% mAP@5 on e-commerce datasets.

Introduction

Search technology has transitioned from basic keyword matching (e.g., BM25) to sophisticated semantic vector searches. However, semantic search often suffers from "fuzziness," failing to respect explicit user constraints such as brand or price range. In e-commerce, where queries like "LEGO sets under $40 for ages 5-8" are common, standard hybrid approaches that merely blend results often fail to enforce these hard requirements. QAM addresses this by treating metadata as a primary retrieval component rather than an afterthought.

Methodology

The QAM framework utilizes a four-stage pipeline to refine search results:

  1. Query Decomposition: An LLM (GPT-4) parses the raw query into structured Metadata Tags (e.g., brand, price) and Semantic Elements (the underlying intent).
  2. Metadata Filtering: A "hard" filter is applied to the database, immediately discarding products that do not meet explicit criteria. This reduces noise and computational overhead for subsequent steps.
  3. Review Similarity Search: Semantic embeddings (nomic-embed-text-v1) compare query intent against product reviews to capture qualitative nuances often missed in product titles.
  4. Final Ranking: A Cross-Encoder (msmarco-MiniLM-L12-en-de-v1) re-ranks the filtered candidates by processing query and product descriptions simultaneously to capture fine-grained relationships.
The QAM architecture flowchart illustrating the path from user query to top N candidates through decomposition and filtering.

Experimental Setup

Evaluation was conducted using the Amazon Toys Reviews dataset, comprising 10,000 unique items and over 40,000 reviews. A set of 200 high-quality queries targeting both explicit attributes and subjective intent was generated using GPT-4o. Relevance was determined using an "LLM-as-a-Judge" approach with GPT-4 to provide nuanced evaluation beyond simple click-through data.

Results

QAM consistently outperformed keyword, semantic, and standard hybrid search baselines across all evaluated metrics. Notably, QAM achieved a Mean Average Precision (mAP@5) of 52.99%, representing a 28.67% improvement over BM25 and a 9.96% improvement over standard RRF-based hybrid search. Precision at k (P@3) also saw a significant jump to 46.67%.

Precision at k (P@k) and Mean Average Precision at k (mAP@k) comparisons across different search methodologies, showing QAM's superior performance.

Discussion and Conclusion

The success of QAM highlights that pre-pruning the search space with metadata allows semantic models to focus on contextual relevance without being distracted by irrelevant candidates. While the use of LLMs and Cross-Encoders introduces latency, future work will explore integration with high-performance vector databases like Qdrant to optimize retrieval. QAM demonstrates that structured query decomposition is a powerful alternative to purely "fuzzy" vector-based retrieval in constrained domains like e-commerce retail.

Summary updated

BibTeX
@misc{menon2025query,
  author = {Karthik Menon and Batool Arhamna Haider and Muhammad Arham and Kanwal Mehreen and Ram Mohan Rao Kadiyala and Hamza Farooq},
  title = {{Query Attribute Modeling: Improving search relevance with Semantic Search and Meta Data Filtering}},
  year = {2025},
  eprint = {2508.04683},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.04683},
}
Figure