Skip to content

kaist-dmlab/QuDAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuDAR: Query-Wise Dual-Perspective Adaptive Retrieval

ACL 2026 Main Conference

1. Overview

Intro

Retrieval-augmented generation systems rely on retrieval quality to ground downstream generation. However, retrieval behavior varies substantially across queries depending on both retriever type and query format. Sparse and dense retrievers capture different signals, and original and expanded queries also play complementary roles.

Intro

Our analysis reveals four key insights. First, sparse-dense hybridization cannot be effectively handled with a single static balance, since the optimal ratio changes across datasets, retrievers, and queries. Second, original and expanded queries also play complementary roles, but their balance cannot be fixed globally because expansion may improve recall while also introducing noise. Third, the optimal hybrid weights vary substantially from one query to another, indicating strong potential for query-wise adaptation. Fourth, the retriever axis and the query-format axis are not independent; they interact with each other and produce a clear combinatorial effect.

These observations suggest that retrieval should not rely on static hybridization along only one axis. Instead, effective retrieval requires jointly considering both retriever type and query format, and adaptively balancing them for each query. QuDAR is motivated by this insight: retrieval should be performed in a query-wise manner by accounting for both axes simultaneously.

2. Method

QuDAR is a lightweight retrieval framework that adaptively combines these two perspectives at the query level. Given four retrieval signals

  • original query + sparse retriever
  • original query + dense retriever
  • expanded query + sparse retriever
  • expanded query + dense retriever

QuDAR dynamically estimates how much each signal should contribute for each query.

Intro

QuDAR supports three variants.

2-1. QuDAR-simple

QuDAR-simple combines the four retrieval signals with lightweight fixed rules.

  • Reciprocal rank fusion
  • Equal-weight score fusion

2-2. QuDAR-confidence

QuDAR-confidence estimates query-specific weights from retrieval confidence. It uses score margins from top-ranked documents and converts them into adaptive fusion weights.

2-3. QuDAR-llm

QuDAR-llm uses an LLM to score the relevance of the top retrieved passages from the four retrieval signals, then converts the scores into query-specific fusion weights.

3. Supported Options

3-1. Sparse Retrievers

  • bm25 as the default sparse retriever
  • splade as the neural sparse retriever

3-2. Dense Retrievers

  • contriever as the default dense retriever
  • e5-base
  • bge-m3

3-3. Query Expansion

  • expansion as the default expanded-query setting
  • prf

Additional retrievers or expansion methods can be added by extending src/qudar/retrievers.py and updating the config file.

4. Datasets

We evaluate QuDAR on four BEIR datasets.

  • FiQA
  • SciDocs
  • Climate-FEVER
  • HotpotQA

The full datasets are not included in this repository. Please download them from the official BEIR release and place them under the following local structure.

data/
├── fiqa/
├── scidocs/
├── climate-fever/
└── hotpotqa/

Small BEIR-style sample files are included under data/samples/ only for smoke testing and structure reference.

For more details, see data/README.md.

5. Repository Structure

QuDAR/
├── configs/
├── data/
├── docs/
├── scripts/
└── src/qudar/
  • configs/: experiment configs
  • data/: sample data scaffold
  • docs/: paper / poster / slides
  • scripts/: helper scripts
  • src/qudar/: main package

6. Setup

cd QuDAR
python -m venv .venv
source .venv/bin/activate
pip install -e .

If you want to use QuDAR-llm, create a local .env file from .env.example and write your own API key.

cp .env.example .env

Then set:

OPENAI_API_KEY=YOUR_API_KEY

7. Build Dense Index

Dense retrieval expects a FAISS index directory.

python -m qudar.build_index \
  --dataset-path data/fiqa \
  --model-name facebook/contriever \
  --output-dir indexes/fiqa/contriever \
  --dim 768

Use the following settings.

  • facebook/contriever with --dim 768
  • intfloat/e5-base-v2 with --dim 768
  • BAAI/bge-m3 with --dim 1024

8. Config

The repository provides config templates rather than machine-specific final configs.

An example is available at configs/fiqa_example.yaml.

Each user should update:

  • dataset.path
  • indexes.dense.path
  • queries.expanded.path
  • output_dir

The config also supports:

  • default_mode: smoke | full
  • smoke_max_queries

9. Quick Start

9-1. Sample Smoke Run

Build a sample dense index:

python -m qudar.build_index \
  --dataset-path data/samples/fiqa \
  --model-name facebook/contriever \
  --output-dir indexes/samples/fiqa/contriever \
  --dim 768

Run smoke evaluation:

python -m qudar.cli --config configs/fiqa_sample_smoke.yaml --smoke

9-2. Full Reproduction Run

python -m qudar.cli --config configs/fiqa_example.yaml --full

9-3. Custom Query Budget

python -m qudar.cli --config configs/fiqa_example.yaml --max-queries 20

9-4. Disable LLM Scoring

python -m qudar.cli --config configs/fiqa_example.yaml --disable-llm

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors