atlas

Research map / Large language models / Retrieval and knowledge

UQE: A Query Engine for Unstructured Databases

NeurIPS 2024 · Large language models › Retrieval and knowledge · approach: Domain-specific QA datasets · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes the Universal Query Engine (UQE), which runs SQL-like queries with natural-language predicates over unstructured tables by combining statistical sampling, online active learning, and a compiler-style planner to cut LLM calls.

Problem

Analytics (counting, retrieval, grouping) over large collections of unstructured data such as images, dialogs and reviews is costly because LLMs must be run over every row, and long-context LLMs and RAG do not handle aggregation over whole databases well.

Approach

Treats LLM predicates as expensive oracles: uses stratified importance sampling over multimodal embeddings for unbiased aggregation estimates and online active learning with a cheap surrogate for recall-oriented retrieval, orchestrated by a SQL-style compiler that plans clause order and fusion so only a budgeted number of rows reach the LLM.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use UQE instead of UDF for conditional aggregationIMDB · IMDB, sentiment_positiverelative error: 13.67% ± 6.24% -> 5.75% ± 3.43%Helped
Use UQE instead of UDF for conditional aggregationABCD · ABCD, account_access and single_item_queryrelative error: 18.99% ± 9.85% -> 11.75% ± 9.78%; 26.95% ± 22.16% -> 12.32% ± 10.53%Helped
Use UQE instead of UDF for conditional aggregationAirDialog · AirDialog, book, no_flight, and no_reservationrelative error: 10.15% ± 7.64% -> 4.98% ± 2.26%; 21.08% ± 16.78% -> 8.78% ± 8.12%; 21.19% ± 12.10% -> 7.23% ± 5.40%Helped
Use UQE with GPT-4o instead of UDF-gpt-4oClevr · Clevr, # spheres > 3relative error: 19.35% ± 13.81% -> 15.14% ± 10.71%Helped
Use UQE instead of MIPSSemantic retrieval · ABCD, account_accessF1: 0.961 -> 0.940 ± 0.019Hurt
Use UQE instead of MIPSSemantic retrieval · AirDialog, no_reservationF1: 0.965 -> 0.969 ± 0.004Helped
Use UQE instead of MIPSSemantic retrieval · IMDB and remaining ABCD, AirDialog, and Clevr conditionsF1Helped
Use UQE instead of lc-claude-3-opusAbstraction and aggregation · AirDialog, ABCD account_access, and ABCD single_item_queryEMD: 0.121 ± 0.014 -> 0.111 ± 0.019; 0.113 ± 0.010 -> 0.110 ± 0.016; 0.011 ± 0.006 -> 0.005 ± 0.002Helped
Replace stratified sampling with uniform random sampling (ablation)UQE aggregation sampling · Aggregation queries over three text datasetsestimation varianceHurt
Replace online learning with uniform random sampling (ablation)UQE non-aggregation retrieval · Semantic retrieval queriesrecallHurt
Reduce retrieval budget from 256 to 128 (ablation)UQE · IMDB semantic retrievalF1: 0.978 -> 0.974Hurt
Reduce retrieval budget from 128 to 64 (ablation)UQE · IMDB semantic retrievalF1: 0.974 -> 0.921Hurt

Surprising findings

Limitations

Experimental setup

Datasets: IMDB ABCD AirDialog Clevr AudioMNIST

Benchmarks: IMDB ABCD AirDialog Clevr AudioMNIST

Metrics: relative error F1 score earth mover's distance cost per query latency

Baselines: lc-gpt-4-turbo lc-claude-3-opus UDF MIPS lc-gpt-4o UDF-gpt-4o Gemini Pro 1.5

Builds on: SQL importance sampling Bayesian optimization RAG

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy