IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2606.07392.html

Online Pandora's Box for Contextual LLM Cascading

Author

Listed:
  • Alexandre Belloni
  • Yan Chen
  • Yehua Wei

Abstract

Motivated by Large Language Model (LLM) cascading, we propose an online contextual Pandora's Box model for adaptively querying and selecting LLM APIs. In each period, a decision-maker observes a request context and faces a two-phase decision problem. In the query phase, the decision-maker sequentially queries APIs, where each query reveals a generated output and the decision-maker incurs an (output-dependent) cost. In the selection phase, the decision-maker selects one of the generated outputs to deploy and observes only the downstream reward of the deployed output. This output-mediated feedback structure differs from classical online contextual Pandora's Box models, in which opening a box directly reveals its reward. Rather than estimating the full conditional output and cost distributions of each API, we directly model the reservation index and develop a learning approach for the query phase. Specifically, we impose a parametric structure on the contextual reservation index functions induced by the classical Weitzman's policy. Our policy combines generalized method of moments (GMM) type estimation of these reservation indices with UCB-style confidence bounds for both these indices and the shared output-level reward evaluator. Under regularity conditions, we prove that the resulting policy achieves dimension-dependent $\widetilde O(\sqrt T)$ cumulative regret over a horizon of $T$ periods.

Suggested Citation

  • Alexandre Belloni & Yan Chen & Yehua Wei, 2026. "Online Pandora's Box for Contextual LLM Cascading," Papers 2606.07392, arXiv.org, revised Aug 2026.
  • Handle: RePEc:arx:papers:2606.07392
    as

    Download full text from publisher

    File URL: https://arxiv.org/pdf/2606.07392
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Weitzman, Martin L, 1979. "Optimal Search for the Best Alternative," Econometrica, Econometric Society, vol. 47(3), pages 641-654, May.
    2. Hansen, Lars Peter, 1982. "Large Sample Properties of Generalized Method of Moments Estimators," Econometrica, Econometric Society, vol. 50(4), pages 1029-1054, July.
    3. Yang Chen & Samuel N. Kirshner & Anton Ovchinnikov & Meena Andiappan & Tracy Jenkin, 2025. "A Manager and an AI Walk into a Bar: Does ChatGPT Make Biased Decisions Like We Do?," Manufacturing & Service Operations Management, INFORMS, vol. 27(2), pages 354-368, March.
    4. Lee, Lung-fei & Yu, Jihai, 2010. "Estimation of spatial autoregressive panel data models with fixed effects," Journal of Econometrics, Elsevier, vol. 154(2), pages 165-185, February.
    5. Paat Rusmevichientong & John N. Tsitsiklis, 2010. "Linearly Parameterized Bandits," Mathematics of Operations Research, INFORMS, vol. 35(2), pages 395-411, May.
    6. Doval, Laura, 2018. "Whether or not to open Pandora's box," Journal of Economic Theory, Elsevier, vol. 175(C), pages 127-158.
    7. Zenan Chen & Jason Chan, 2024. "Large Language Model in Creative Work: The Role of Collaboration Modality and User Expertise," Management Science, INFORMS, vol. 70(12), pages 9101-9117, December.
    8. Wang Chi Cheung & Will Ma & David Simchi-Levi & Xinshang Wang, 2022. "Inventory Balancing with Online Learning," Management Science, INFORMS, vol. 68(3), pages 1776-1807, March.
    9. Lin Fan & Peter W. Glynn, 2025. "The Fragility of Optimized Bandit Algorithms," Operations Research, INFORMS, vol. 73(6), pages 3173-3198, November.
    10. Lin, Xu & Lee, Lung-fei, 2010. "GMM estimation of spatial autoregressive models with unknown heteroskedasticity," Journal of Econometrics, Elsevier, vol. 157(1), pages 34-52, July.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Chen, Lifeng & Wang, Kaifeng, 2022. "The spatial spillover effect of low-carbon city pilot scheme on green efficiency in China's cities: Evidence from a quasi-natural experiment," Energy Economics, Elsevier, vol. 110(C).
    2. Moscone, Francesco & Tosetti, Elisa & Canepa, Alessandra, 2014. "Real estate market and financial stability in US metropolitan areas: A dynamic model with spatial effects," Regional Science and Urban Economics, Elsevier, vol. 49(C), pages 129-146.
    3. Wang, Wei & Lee, Lung-Fei & Bao, Yan, 2018. "GMM estimation of the spatial autoregressive model in a system of interrelated networks," Regional Science and Urban Economics, Elsevier, vol. 69(C), pages 167-198.
    4. Fang Lu & Guoliang Tian & Jing Yang, 2024. "GMM estimation and variable selection of partially linear additive spatial autoregressive model," Statistical Papers, Springer, vol. 65(4), pages 2253-2288, June.
    5. Wang, Wei & Lee, Lung-fei, 2013. "Estimation of spatial panel data models with randomly missing data in the dependent variable," Regional Science and Urban Economics, Elsevier, vol. 43(3), pages 521-538.
    6. Zihao Chen & Xingyu Fu & Pin Gao & Ying-Ju Chen, 2026. "Sound of Silence: When to Conceal Attribute Information? The Roles of Consumer Search, Inventory, and Channel Structure," Manufacturing & Service Operations Management, INFORMS, vol. 28(3), pages 783-801, May.
    7. Michele Aquaro & Natalia Bailey & M. Hashem Pesaran, 2015. "Quasi Maximum Likelihood Estimation of Spatial Models with Heterogeneous Coefficients," CESifo Working Paper Series 5428, CESifo.
    8. Ziv Scully & Laura Doval, 2024. "Local hedging approximately solves Pandora's box problems with nonobligatory inspection," Papers 2410.19011, arXiv.org, revised Jan 2025.
    9. Pak Hung Au & Mark Whitmeyer, 2018. "Attraction versus Persuasion: Information Provision in Search Markets," Papers 1802.09396, arXiv.org, revised May 2022.
    10. Hedyeh Beyhaghi & Linda Cai, 2023. "Recent Developments in Pandora's Box Problem: Variants and Applications," Papers 2308.12242, arXiv.org.
    11. Jiankun Chen & Yanli Lin & Yang Yang, 2025. "Modeling and Estimating Two-Layer Network Interactions with Unknown Heteroskedasticity," Economics Discussion / Working Papers 25-03, The University of Western Australia, Department of Economics.
    12. Tizheng Li & Xiaojuan Kang, 2022. "Variable selection of higher-order partially linear spatial autoregressive model with a diverging number of parameters," Statistical Papers, Springer, vol. 63(1), pages 243-285, February.
    13. Badi H. Baltagi & Peter H. Egger & Michaela Kesina, 2022. "Bayesian estimation of multivariate panel probits with higher‐order network interdependence and an application to firms' global market participation in Guangdong," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(7), pages 1356-1378, November.
    14. Michele Aquaro & Natalia Bailey & M. Hashem Pesaran, 2015. "Quasi Maximum Likelihood Estimation of Spatial Models with Heterogeneous Coefficients," Working Papers 749, Queen Mary University of London, School of Economics and Finance.
    15. Zhengyu Zhang, 2013. "A Pairwise Difference Estimator for Partially Linear Spatial Autoregressive Models," Spatial Economic Analysis, Taylor & Francis Journals, vol. 8(2), pages 176-194, June.
    16. Baltagi, Badi H. & Yang, Zhenlin, 2013. "Heteroskedasticity and non-normality robust LM tests for spatial dependence," Regional Science and Urban Economics, Elsevier, vol. 43(5), pages 725-739.
    17. Andre Chagas & Carlos Azzoni & Alexandre Almeida, 2015. "A Spatial Difference-in-Difference Analysis to Measure the Sugarcane Producing Impact in Respiratory Health," ERSA conference papers ersa15p511, European Regional Science Association.
    18. Petrikaitė, Vaiva, 2022. "Escaping search when buying," International Journal of Industrial Organization, Elsevier, vol. 82(C).
    19. Deleidi, Matteo & Mazzucato, Mariana & Semieniuk, Gregor, 2020. "Neither crowding in nor out: Public direct investment mobilising private investment into renewable electricity projects," Energy Policy, Elsevier, vol. 140(C).
    20. Áureo de Paula, 2015. "Econometrics of network models," CeMMAP working papers CWP52/15, Centre for Microdata Methods and Practice, Institute for Fiscal Studies.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2606.07392. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: https://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.