[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-506019-105":59,"doc-detail-506019-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","query-dependent-prompt-evaluation-and-optimization-with-offline-inverse-rl","QUERY-DEPENDENT PROMPT EVALUATION AND OPTIMIZATION WITH OFFLINE INVERSE RL","","The study enhances large language models’ arithmetic reasoning via zero-shot prompt optimization. It targets an overlooked objective: query dependency, and shows two barriers to economical prompt optimization. First, prompts are hard to evaluate at inference when the golden answer is missing. Second, interactive learning across the vast prompting space becomes resource-intensive. The paper proposes Prompt-OIRL, using offline inverse reinforcement learning from offline prompt demonstrations to learn a reward model that scores query-prompt pairs without accessing models, followed by best-of-N prompt recommendation.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/query-dependent-prompt-evaluation-and-optimization-with-offline-inverse-rl/506019/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/query-dependent-prompt-evaluation-and-optimization-with-offline-inverse-rl/506019.png","ImageObject",300,407,{"name":92,"@type":93},"Patrick","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-15","2026-10-04",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does the paper identify in prompt optimization for arithmetic reasoning?","Question",{"text":113,"@type":114},"It identifies query dependency as an overlooked objective, and shows that current optimization is blocked by two main challenges: hard inference-time evaluation without the correct answer and expensive online prompt search.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"Why is inference-time evaluation difficult in this setting?",{"text":118,"@type":114},"When the golden answer for a query is unavailable, enumerating multiple candidate prompts produces many model responses, but determining which response is correct requires extra non-trivial effort and computation.",{"name":120,"@type":111,"acceptedAnswer":121},"How does Prompt-OIRL reduce the cost of prompt evaluation and optimization?",{"text":122,"@type":114},"Prompt-OIRL learns an offline reward model from available demonstration data, enabling evaluation of any query-prompt pairs without accessing the LLMs, then uses a best-of-N strategy to recommend the optimal prompt.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},506019,1791295319,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":29,"preview_urls":147},549758146520,"https://ap-avatar.wpscdn.com/avatar/80002397d8c0411e94?_k=1775819394049821470","QUERY-DEPENDENT PROMPT EVALUATION AND OPTIMIZATION WITH OFFLINE INVERSE RL  \nHao SunAlihan Hyk, Mihaela van der Schaar DAMTP, University of Cambridge  \nABSTRACT  \nIn this study, we aim to enhance the arithmetic reasoning ability of Large Language Models (LLMs) through zero-shot prompt optimization. We identify a previously overlooked objective of query dependency in such optimization and elucidate two ensuing challenges that impede the successful and economical design of prompt optimization techniques. One primary issue is the absence of an effective method to evaluate prompts during inference when the golden answer is unavailable. Concurrently, learning via interactions with the LLMs to navigate the expansive natural language prompting space proves to be resource-intensive. To address this, we introduce Prompt-OIRL, which harnesses offline inverse reinforcement learning to draw insights from offline prompting demonstration data. Such data exists as by-products when diverse prompts are benchmarked on openaccessible datasets. With Prompt-OIRL, the query-dependent prompt optimization objective is achieved by first learning an offline reward model. This model can evaluate any query-prompt pairs without accessing LLMs. Subsequently, a best-of-N strategy is deployed to recommend the optimal prompt. Our experimental evaluations across various LLM scales and arithmetic reasoning datasets underscore both the efficacy and economic viability of the proposed approach.  \nFigure 1: A motivating example.(Left, Right) No prompt is perfect that works for all queries. The optimal prompt is query-dependent. Yet the seeking of such prompts is hindered by the Challenges 1-2 we identified. Our method optimizes prompt during inference on a query-dependent level effectively and cost-efficiently.  \n1 INTRODUCTION  \nRecent advances in Large Language Models (LLMs), such as ChatGPT (Ouyang et al., 2022), underscore the value of aligning with human preferences (Ouyang et al., 2022; OpenAI, 2023) . Using an offline alignment dataset generated by annotators, the harmlessness, helpfulness, and ability to follow instructions of LLMs can be largely enhanced (Bai et al., 2022) through the technique of RLHF (Christiano et al., 2017) . That said, even for state-of-the-art general-purpose LLMs such as GPT-4, solving intricate problems such as arithmetic reasoning can still be challenging. Further unlocking LLMs’ full potential for those complex tasks remains an open challenge.  \nQuery-Dependent Zero-Shot Prompting for Arithmetic Reasoning: Opportunities and Challenges. Out of the many attempts, prompting—a natural language prefix or instruction that explains how to complete the task — stands out as a lightweight promising solution for eliciting the capabilities of LLMs without model parameter tuning (Wei et al., 2022) . While the advancesin zero-shot prompting strategies (Kojima et al., 2022) highlight the potential in finding effective query-independent solutions, its reliance on manual crafting efforts and the vast search space over natural language intensifies the difficulty in discovering effective prompts (Deng et al., 2022) . This study aims to augment the arithmetic reasoning capacities of LLMs, a capability considered crucial (OpenCompass, 2023; Liu et al., 2023a) . While there is a wealth of both expert-devised and  \n∗[hs789@cam.ac.uk](hs789@cam.ac.uk), Code is available at: [https://github.com/vanderschaarlab/Prompt-OIRL](https://github.com/vanderschaarlab/Prompt-OIRL)  \nmachine-generated prompts in this domain (Kojima et al., 2022; Zhou et al., 2022b; Yang et al., 2023a), our endeavor is to advance further via prompt optimization. Our approach begins with the articulation of an adjusted objective, subsequently highlighting two inherent challenges.  \nAdjusted Objective: Query-Dependent Prompt Optimization. In the literature, research on zeroshot prompting mainly focused on finding prompts that work better on a distributional level rather than an instanc","cbCaiuLFkqPwRmZL","https://ap.wps.com/l/cbCaiuLFkqPwRmZL","pdf",3163212,56,"English","# Abstract\n# Introduction\n## Query-Dependent Zero-Shot Prompting for Arithmetic Reasoning: Opportunities and Challenges\n## Adjusted Objective: Query-Dependent Prompt Optimization\n## Challenge 1: Inference Time Evaluation is Hard\n## Challenge 2: Online Prompt Evaluation and Optimization is Expensive\n# Solution: Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RL","[{\"question\":\"What problem does the paper identify in prompt optimization for arithmetic reasoning?\",\"answer\":\"It identifies query dependency as an overlooked objective, and shows that current optimization is blocked by two main challenges: hard inference-time evaluation without the correct answer and expensive online prompt search.\"},{\"question\":\"Why is inference-time evaluation difficult in this setting?\",\"answer\":\"When the golden answer for a query is unavailable, enumerating multiple candidate prompts produces many model responses, but determining which response is correct requires extra non-trivial effort and computation.\"},{\"question\":\"How does Prompt-OIRL reduce the cost of prompt evaluation and optimization?\",\"answer\":\"Prompt-OIRL learns an offline reward model from available demonstration data, enabling evaluation of any query-prompt pairs without accessing the LLMs, then uses a best-of-N strategy to recommend the optimal prompt.\"}]","QUERY-DEPENDENT PROMPT EVALUATION AND OPTIMIZATION WITH OFFLINE INVERSE RL | PDF",1791156763,141,[148,152,156,160,164,168],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/efd38b8e65c2208be321a686f4225ed5.webp",983,1272,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/8e32891da357b2d0e89b0cde4ebf360a.webp",982,1270,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/b61d8da472ef0eed566a44f679144195.webp",981,1269,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/cbd1cc907636e3659389ce8d240d42d2.webp",980,1268,{"page_no":24,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/46520083b0b548179ac40f27f6fa96aa.webp",979,1267,{"page_no":29,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/503fe956d4949df0b4034731f9a7d36a.webp",978,1265]