[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-503526-105":59,"doc-detail-503526-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","casper-bridging-discrete-and-continuous-prompt-optimization-through-feedback-guided-gradient-descent-503526","CASPER - Bridging Discrete and Continuous Prompt Optimization through Feedback-Guided Gradient Descent","","Workflow automation is critical across industries, yet existing pipelines struggle with generative tasks such as summarization and extraction without specialized tooling. Although LLM agents can help, prompt engineering remains expensive and often yields suboptimal results. CASPER bridges discrete and continuous prompt optimization via feedback-guided gradient descent in embedding space, using error analyses as optimization signals and fluency regularization to maintain comprehensible prompts while accelerating convergence with failure-focused synthetic data.",{"@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/casper-bridging-discrete-and-continuous-prompt-optimization-through-feedback-guided-gradient-descent-503526/503526/",{"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/casper-bridging-discrete-and-continuous-prompt-optimization-through-feedback-guided-gradient-descent-503526/503526.png","ImageObject",300,407,{"name":92,"@type":93},"McQueen","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-06","2026-10-03",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",12,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does CASPER address in prompt engineering for LLM agents?","Question",{"text":113,"@type":114},"CASPER addresses the high manual cost and unreliability of prompt engineering, where discrete search can overfit without convergence guarantees and continuous embedding optimization can produce incoherent prompts.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does CASPER combine discrete and continuous prompt optimization?",{"text":118,"@type":114},"CASPER represents prompts as continuous embeddings and uses feedback-guided gradient descent, projecting detailed LLM textual error analyses into embedding space to steer optimization toward effective prompts.",{"name":120,"@type":111,"acceptedAnswer":121},"What mechanisms help CASPER improve both fluency and convergence speed?",{"text":122,"@type":114},"CASPER adds fluency regularization to penalize incomprehensible token updates and accelerates convergence by generating synthetic data that oversamples failure cases, improving performance even with sparse industrial datasets.","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},503526,1791296607,{"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":19,"preview_urls":147},5909890329169,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","CASPER: Bridging Discrete and Continuous Prompt Optimization through  \nFeedback-Guided Gradient Descent  \nAryan Jain, Pushpendu Ghosh, Promod Yenigalla  \nRBS Tech Sciences, Amazon  \n{arynjn, gpushpen, [promy}@amazon.com](promy}@amazon.com)  \nAbstract  \nWorkflow automation is critical for reducing manual efforts in industries, yet existing pipelines fail to handle generative tasks like summarization and extraction without pre-built tools, forcing human intervention. While LLMbased agents offer solutions, their creation depends heavily on prompt engineering—aresource-intensive process often yielding suboptimal results. Current automated approaches face a fundamental trade-off: discrete optimization produces overfitted prompts without convergence guarantees due to non-convex landscapes, while continuous gradient-based methods generate semantically incoherent prompts through embedding optimization. We propose CASPER, a framework bridging discrete and continuous prompt optimization through feedback-guided gradient descent in embedding space. CASPER employs a feedback module producing detailed error analyses that capture failure modes as optimization signals. These insights are projected with prompt tokens into embedding space to steer gradient descent. To preserve interpretability, we incorporate fluency regularization that penalizes incomprehensible tokens. We further accelerate convergence through synthetic data generation that oversamples failure cases, while also addressing data scarcity in industrial settings. We evaluate CASPER on WDC, DROP, GSM8K with F1 improvements of 2.3%, 1.6%, 2.3% and VQA, internal benchmarks showing accuracy improvements of 1.1%, 3%, demonstrating cross-domain generalizability.  \n1 Introduction  \nModern industries are increasingly shifting towards automation of redundant workflows through agentic solutions. However, they face a fundamental obstacle: workflows now depend on generative AI capabilities—summarization, information extraction, and content generation which are non-deterministic in nature. While Large Language Model (LLM)  \nagents offer a path toward end-to-end automation, their effectiveness critically hinges on prompt engineering, a process demanding extensive manual effort, domain expertise, and costly iterative refinement to achieve task-optimal performance.  \nThis challenge persists despite recent automated prompt optimization advances. Discrete optimization approaches (Zhou et al., 2023 ; Yang et al., 2024) iteratively refine prompts through LLMgenerated feedback, but the non-convex optimization landscape offers limited control, frequently yielding overly complex, suboptimal prompts without convergence guarantees. Continuous optimization methods (Wen et al., 2023 ; Pryzantet al., 2023) learn soft prompt embeddings through gradient-based optimization, enabling targeted search through continuous embedding space. However, these produce model-specific prompts that hamper cross-model portability and often yield incomprehensible results, impacting scalability and interpretability.  \nOur key insight is that discrete and continuous prompt optimization approaches are complementary; by representing prompts as continuous embeddings and optimizing via gradients while injecting the LLM’s textual feedback about its errors to accelerate convergence to the optimal prompt, we treat it as a co-optimization problem where textual feedback guides gradient descent toward effective convergence.  \nOur main contributions include: 1) A novel framework combining textual feedback as optimization signals for gradient-based prompt refinement, enabling faster convergence than continuous methods. 2) A failure amplification data generation strategy that synthetically boosts error case distributions, accelerating gradient optimization while also making it achievable with sparse industrial datasets. 3) A fluency-preserving loss function that penalizes random token insertion during gradient descent, ensuring optimized pro","cbCaik7fnLFGSRWR","https://ap.wps.com/l/cbCaik7fnLFGSRWR","pdf",2644002,13,"English","# 1 Introduction\n# 2 Related Works","[{\"question\":\"What problem does CASPER address in prompt engineering for LLM agents?\",\"answer\":\"CASPER addresses the high manual cost and unreliability of prompt engineering, where discrete search can overfit without convergence guarantees and continuous embedding optimization can produce incoherent prompts.\"},{\"question\":\"How does CASPER combine discrete and continuous prompt optimization?\",\"answer\":\"CASPER represents prompts as continuous embeddings and uses feedback-guided gradient descent, projecting detailed LLM textual error analyses into embedding space to steer optimization toward effective prompts.\"},{\"question\":\"What mechanisms help CASPER improve both fluency and convergence speed?\",\"answer\":\"CASPER adds fluency regularization to penalize incomprehensible token updates and accelerates convergence by generating synthetic data that oversamples failure cases, improving performance even with sparse industrial datasets.\"}]","CASPER - Bridging Discrete and Continuous Prompt Optimization through Feedback-Guided Gradient Descent | PDF",1791057594,33,[148,152,156,160],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/6d6384001a638c88e60a6e1f171cf92b.webp",983,1390,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d389721b6f97ef2449326259472d2f89.webp",982,1388,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1653548947ef382c26429a7ca3b8b23f.webp",981,1387,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/1166ed7bc47d90350933307eec9abe82.webp",980,1385]