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

Database-Augmented Query Representation for Information Retrieval

Soyeong Jeong, Jinheon Baek, Sukmin Cho, Sung Ju Hwang, Jong Cheol Park2025

Abstract

Information retrieval models that aim to search for documents relevant to a query have shown multiple successes, which have been applied to diverse tasks. Yet, the query from the user is oftentimes short, which challenges the retrievers to correctly fetch relevant documents. To tackle this, previous studies have proposed expanding the query with a couple of additional (user-related) features related to it. However, they may be suboptimal to effectively augment the query, and there is plenty of other information available to augment it in a relational database. Motivated by this fact, we present a novel retrieval framework called Database-Augmented Query representation (DAQu), which augments the original query with various (query-related) metadata across multiple tables. In addition, as the number of features in the metadata can be very large and there is no order among them, we encode them with the graph-based set-encoding strategy, which considers hierarchies of features in the database without order. We validate our DAQu in diverse retrieval scenarios, demonstrating that it significantly enhances overall retrieval performance over relevant baselines.

Introduction: The Short Query Challenge

In Information Retrieval (IR), the "short query" problem is a classic hurdle. When a user types a few words into a search bar, they often leave out critical context. For example, a user asking about "autoencoders" on a technical forum might be a beginner or an expert; knowing their past posts, the tags they follow, or the comments they’ve made can drastically change what counts as a "relevant" result.

Existing solutions usually fall into two camps:

  1. LLM-based Expansion: Using a model like GPT-4 to "guess" what else the user might mean. This is often too generic because the LLM lacks access to specific user history or private database context.
  2. Single-Source Expansion: Pulling data from just one place (like a user profile). This ignores the rich web of connections in modern relational databases where users are linked to purchases, categories, and interactions across multiple tables.

Methods: The DAQu Framework

The core of this research is the DAQu framework, which introduces a two-stage approach to query augmentation designed to leverage the full relational structure of a database.

Overview of the DAQu framework, illustrating how a user query is mapped to relational database tables and encoded via a graph-based strategy.

Relational Linking and Graph-Structured Encoding

Instead of just looking at the query text, DAQu identifies the "row" in the database associated with that query and follows foreign key links to gather metadata from other tables (e.g., a user’s bio, their previous tags, and recent comments). To process this data effectively, the authors use a Graph-Structured Set-Encoding strategy:

  • Layer 1 (Intra-column): It encodes and aggregates all elements within a specific category (e.g., all of a user's past tags) into a single vector.
  • Layer 2 (Inter-column): It aggregates these category-level vectors into one final "metadata representation" that is combined with the original query vector.

This approach ensures order invariance—because database records don't have a natural order, the model uses mean-pooling to ensure the output remains consistent regardless of row sequence. To handle massive data volumes, the framework employs a "two-stage sampling" strategy during training, updating weights based on a subset of attributes to maintain efficiency.

Experimental Setup and Datasets

The researchers evaluated DAQu on seven different retrieval tasks across three major real-world relational database sources:

  • Stack Exchange: Tasks focused on finding the "Best Answer" or "Any Answer" to a post, leveraging tables for posts, users, votes, and comments.
  • Amazon Product Catalog: Focused on "Future Purchase Retrieval," linking user reviews to product descriptions and categories.
  • H&M: A fashion retail dataset used to predict future purchases based on a customer's transaction history and article metadata.

Key Results and Insights

DAQu consistently outperformed traditional dense retrieval models and LLM-based expansion methods. As shown in the comprehensive results table below, DAQu achieves significant gains across multiple base retrievers (DPR, Contriever, BGE-M3).

Comprehensive performance comparison of DAQu against various baselines across StackExchange, Amazon, and H&M datasets using different base retrievers.

Major Findings

  • Relational Context > Generic Knowledge: Specific data from a database (like a user's actual purchase history) is far more useful for retrieval than the "hallucinated" context an LLM generates when asked to expand a query.
  • Robustness to Noise: DAQu is remarkably robust to noise. While simple text-based expansion can be distracted by irrelevant words in user comments, DAQu’s latent vector representation focuses on relevant signals.
  • Performance Gains: On the Stack Exchange "Answer Retrieval" task, DAQu improved Recall@10 by up to 18.73% compared to standard dense retrieval models. It also proved efficient; using just 3 metadata features per category during inference provided a "sweet spot" for accuracy and computational cost.

Conclusion and Future Work

DAQu demonstrates that the structure of a database contains vital information that IR models should respect. By treating the database as a graph rather than a flat text source, DAQu provides more personalized and context-aware search results. Future research will focus on "data pruning" to further reduce computational overhead and integrating DAQu into Retrieval-Augmented Generation (RAG) pipelines to help LLMs generate even more precise, personalized answers.

Summary updated

BibTeX
@misc{jeong2025database,
  author = {Soyeong Jeong and Jinheon Baek and Sukmin Cho and Sung Ju Hwang and Jong Cheol Park},
  title = {{Database-Augmented Query Representation for Information Retrieval}},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.840},
}
Figure