Online‐optimized RAG for tool use and function calling
Decision Sciences · 2026-11-03
DOI: 10.1111/deci.70053 ↗At a glance
Journal article in Decision Sciences, published online on 2026-11-03. Written by Yu Pan and 2 co-authors. 59 references. The full text is freely available (open access, CC BY 4.0).
Abstract (original language)
In many applications, retrieval‐augmented generation (RAG) drives tool use and function calling by embedding the (user) queries and matching them to prespecified tool/function descriptions. In this article, we address an embedding misalignment issue that often arises in practical applications due to imperfect embedding models or noisy descriptions; such misalignment may lead to incorrect retrieval and task failure. We introduce Online‐optimized RAG (ORAG), a deployment‐time framework that adapts item embeddings from binary feedback attributed specifically to retrieval correctness. ORAG applies lightweight online gradient updates with negligible per‐query latency and requires no changes to the underlying large language model (LLM). The method supports single‐ and multihop tool use, dynamic tool inventories, and ‐retrieval with reranking. We provide a problem‐dependent theoretical analysis that quantifies how the method's performance depends on the initialization quality of the embeddings and other related quantities. Across diverse tool‐use and document‐retrieval scenarios, ORAG generally improves retrieval and tool‐selection accuracy, providing a simple, practical path toward self‐improving RAG systems. We further evaluate the method under varying query recurrence, feedback‐error patterns, learning‐rate settings, and changing tool inventories to identify the conditions under which online optimization is most appropriate.
Cite
APA
Pan, Y., Li, X., & Wang, H. (2026). Online‐optimized RAG for tool use and function calling. Decision Sciences. https://doi.org/10.1111/deci.70053
Vancouver
Pan Y, Li X, Wang H. Online‐optimized RAG for tool use and function calling. Decision Sciences. 2026. doi:10.1111/deci.70053
BibTeX
@article{Pan2026,
author = {Pan, Yu and Li, Xiaocheng and Wang, Hanzhao},
title = {Online‐optimized RAG for tool use and function calling},
journal = {Decision Sciences},
year = {2026},
doi = {10.1111/deci.70053}
}
EUVIMED