cs.IRMar 26, 2026

Cost-Aware Query Routing in RAG: Empirical Analysis of Retrieval Depth Tradeoffs

Authors: Sanjay Mishra

Organizations: Raleigh, NC, USA

Abstract

Retrieval-augmented generation (RAG) faces a fundamental three-way tension: deeper retrieval improves factual grounding but inflates token costs and end-to-end latency. Static retrieval configurations cannot resolve this tension across heterogeneous query workloads -- simple definitional queries waste budget on unnecessary context, while complex analytical prompts are underserved by shallow retrieval. This paper introduces Cost-Aware RAG (CA-RAG), a per-query routing framework that selects from a discrete catalog of strategy bundles -- each coupling a retrieval depth (from retrieval-free direct inference to top-k=10k{=}10 dense retrieval) with a fixed generation profile -- by maximizing a scalar utility that linearly combines an estimated quality prior with normalized penalties for predicted latency and total billed tokens. CA-RAG is implemented with FAISS-backed dense retrieval and OpenAI chat/embedding APIs, and evaluated on a 28-query benchmark spanning four bundles. The router dynamically exercises all bundles, achieving 26% fewer billed tokens than always-heavy retrieval and 34% lower mean latency than always-direct inference while maintaining equivalent answer quality. Per-query delta analysis reveals that savings are non-uniform and concentrated in simpler queries, motivating complexity-aware guardrails. Sensitivity analysis confirms that the same bundle catalog supports multiple cost-latency-quality operating points through weight adjustment alone. All results are generated directly from logged CSV artifacts for full reproducibility. CA-RAG provides a transparent, auditable foundation for cost-conscious LLM deployments.

Figures & tables

Explore similar work

CardsList
  1. Quantifying the Accuracy and Cost Impact of Design Decisions in Budget-Constrained Agentic LLM Search

    Mar 9, 2026Kyle McCleary, James GhawalyAgentic SearchAgentic RAG

  2. LiteRAG: Cost-Efficient Graph-Based Retrieval-Augmented Generation

    Sep 9, 2026Daniel Alejandro Coll Tejeda, Pedro García López, Daniel Barcelona-PonsMulti-Hop QARetrieval-Augmented Generation

  3. Know Before You Fetch: Calibrated Retrieval-Budget Allocation for Retrieval-Augmented Generation

    Jun 29, 2026Zhe Dong, Fang Qin, Manish Shah +1Retrieval-Augmented GenerationSelective Prediction