Skip to main content
QUICK REVIEW

[Paper Review] Semantic Caching for OLAP via LLM-Based Query Canonicalization (Extended Version)

Laurent Bindschaedler|arXiv (Cornell University)|Feb 23, 2026
Advanced Database Systems and QueriesComputer Science0 citations
TL;DR

The paper introduces a safety-first middleware cache that canonicalizes SQL and natural language queries into a unified OLAP Intent Signature to enable cross-client semantic caching for dashboard-style OLAP over star schemas, with correctness-preserving derivations and NL safety gating.

ABSTRACT

Analytical workloads exhibit substantial semantic repetition, yet most production caches key entries by SQL surface form (text or AST), fragmenting reuse across BI tools, notebooks, and NL interfaces. We introduce a safety-first middleware cache for dashboard-style OLAP over star schemas that canonicalizes both SQL and NL into a unified key space -- the OLAP Intent Signature -- capturing measures, grouping levels, filters, and time windows. Reuse requires exact intent matches under strict schema validation and confidence-gated NL acceptance; two correctness-preserving derivations (roll-up, filter-down) extend coverage without approximate matching. Across TPC-DS, SSB, and NYC TLC (1,395 queries), we achieve 82% hit rate versus 28% (text) and 56% (AST) with zero false hits; derivations double hit rate on hierarchical queries.

Motivation & Objective

  • Address fragmentation in query caching across heterogeneous BI tools and NL interfaces.
  • Propose a unified, portable key space (OLAP Intent Signature) for SQL and NL queries.
  • Ensure correctness with schema validation, confidence gating, and safe derivations (roll-up, filter-down).
  • Evaluate hit rates, correctness, and backend savings across standard OLAP workloads.
  • Provide a prototype and discuss deployment considerations and limitations.

Proposed method

  • Canonicalize both SQL and NL into a structured OLAP Intent Signature encoded as JSON and hashed to a cache key.
  • Validate signatures against schema: ensure measures, dimensions, time windows, and joins are unambiguous and supported.
  • Store and retrieve results from a cache keyed by the signature hash; execute on backend if cache miss.
  • Use two correctness-preserving derivations (roll-up and filter-down) with explicit preconditions to extend reuse safely.
  • NL requests are mapped via an LLM to a constrained JSON schema with a confidence score used for safety gating.
  • Evaluate NL and SQL variants across TPC-DS, SSB, and NYC TLC workloads; compare to text-based and AST-based caching baselines.

Experimental results

Research questions

  • RQ1What is the hit rate of the OLAP Intent Signature cache across multiple decision-support workloads?
  • RQ2Can correctness-preserving derivations (roll-up, filter-down) extend cache coverage without introducing false hits?
  • RQ3What are the backend compute savings and overheads when using the OLAP Intent Signature cache?
  • RQ4How reliable is NL canonicalization for preventing semantic errors in cache reuse, and how do safety policies affect precision and coverage?
  • RQ5How does the approach perform under hierarchical drill patterns and adversarial NL inputs?

Key findings

  • The proposed LLMSigCache achieves an average hit rate of 82% across NYC TLC, SSB, and TPC-DS, outperforming text-based caching (28.2%) and AST-based caching (55.6%).
  • Backend compute is reduced by 85–90% with the LLMSigCache, comparable to ASTCache on the SQL subset and higher overall due to NL caching.
  • Safe derivations (roll-up, filter-down) raise hierarchical workload hit rate from 37% to 80% with zero false hits.
  • NL semantic accuracy is 44% on adversarial NL queries and 51% on BIRD human-authored questions, motivating safety-gated reuse.
  • At a confidence threshold of 0.5, precision reaches 76.9% with 37% coverage, with schema-specific heuristics further improving precision.
  • Derivations extend coverage for hierarchical drill patterns, significantly boosting hit rates without compromising correctness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.