A Context-Aware Reinforcement Learning Framework for Adaptive Multimodal Prompt Optimization | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article A Context-Aware Reinforcement Learning Framework for Adaptive Multimodal Prompt Optimization Shashank R, Shreeshanth R, Rajagopal M, Karthi G, Rajakrishnammal A This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9637361/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Prompt engineering plays a crucial role in enhancing the efficacy of generative AI systems; however, current solutions are often designed manually and are inflexible. This paper presents a Context-Aware Prompt Optimizer (CAPO), a comprehensive model that unifies contextual memory, reinforcement learning, and multimodal processing capabilities for the purpose of optimizing prompts in an automated manner. The model is designed to formulate prompt optimization in the form of a Markov decision process, whereby Proximal Policy Optimization is employed to optimize prompts via feedback-driven rewards. The model is tested against benchmark datasets such as CNN/DailyMail, SQuAD v2.0, and HumanEval which cover text summarization, question-answering, and code generation applications. The findings indicate that CAPO outperforms baseline models in terms of accuracy at 91.7%, enhanced BLEU and ROUGE metrics. Statistically significant improvements in all areas were also found (p < 0.01), and ablation studies further validate the importance of various components. CAPO achieves an improvement in accuracy of up to 9.2% compared to reinforcement learning (RL)-based methods. Overall, CAPO enhances prompt clarity and output relevance, among other improvements. Generative AI Prompt Engineering Context-Aware Systems Reinforcement Learning Multi-Modal AI Semantic Analysis Prompt Optimization Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9637361","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":638477621,"identity":"8c624257-3d17-4a49-bea3-e9579bc6457b","order_by":0,"name":"Shashank R","email":"","orcid":"","institution":"Saveetha Engineering College","correspondingAuthor":false,"prefix":"","firstName":"Shashank","middleName":"","lastName":"R","suffix":""},{"id":638477622,"identity":"de9f1a9e-d348-4e15-a34d-67b91609c3bb","order_by":1,"name":"Shreeshanth R","email":"","orcid":"","institution":"Saveetha Engineering College","correspondingAuthor":false,"prefix":"","firstName":"Shreeshanth","middleName":"","lastName":"R","suffix":""},{"id":638477623,"identity":"9848b076-0098-4eb1-8aa3-d01ccfd45372","order_by":2,"name":"Rajagopal M","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABD0lEQVRIiWNgGAWjYJACAzDJztj4+M8PGyCLsfEAcVqYmZsNeHvSQFoaCGqBAGb2NgketsNgNl4turMPPyj48csmj7+ZsU1Cgue83dr2w0BbamyicWkxO5dmYNjbl1YscZix2cLA4nbytjOJQC3H0nIbcGk5w2AA9MLhxIbDjI03EnhuJ5sdAGphbDiMRwv7B8O/QC3zDzM2SBxgO5dsdv4hIS08BsY8Pw4nbjjM2CTZwHbAzuwGQVt4CoxlG9KKDYF+MWbsSU4wuwG0JQGvX9i3Gb75Y5Mnd7z94WOGH3b2ZufTHz74UGODUwsQsBkwtjEkwHiJYJUJONRCAfMDhj8INfb4FY+CUTAKRsFIBACGrmi5TBDjzAAAAABJRU5ErkJggg==","orcid":"","institution":"PERI Institute of Technology","correspondingAuthor":true,"prefix":"","firstName":"Rajagopal","middleName":"","lastName":"M","suffix":""},{"id":638477624,"identity":"91718c64-1d89-45e0-8ef6-55774d0f8a5d","order_by":3,"name":"Karthi G","email":"","orcid":"","institution":"Saveetha Engineering College","correspondingAuthor":false,"prefix":"","firstName":"Karthi","middleName":"","lastName":"G","suffix":""},{"id":638477625,"identity":"39957487-2d1e-49f2-8e2b-bba34f1a22cc","order_by":4,"name":"Rajakrishnammal A","email":"","orcid":"","institution":"Saveetha Engineering College","correspondingAuthor":false,"prefix":"","firstName":"Rajakrishnammal","middleName":"","lastName":"A","suffix":""}],"badges":[],"createdAt":"2026-05-07 05:23:15","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9637361/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9637361/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":109068024,"identity":"f462f583-ee35-4f77-ab99-fdc12aa5a86b","added_by":"auto","created_at":"2026-05-12 10:03:00","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":618584,"visible":true,"origin":"","legend":"","description":"","filename":"Manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9637361/v1_covered_d1a771fb-5842-4f5d-bc1f-7099b9555c64.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"A Context-Aware Reinforcement Learning Framework for Adaptive Multimodal Prompt Optimization","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Generative AI, Prompt Engineering, Context-Aware Systems, Reinforcement Learning, Multi-Modal AI, Semantic Analysis, Prompt Optimization","lastPublishedDoi":"10.21203/rs.3.rs-9637361/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9637361/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003ePrompt engineering plays a crucial role in enhancing the efficacy of generative AI systems; however, current solutions are often designed manually and are inflexible. This paper presents a Context-Aware Prompt Optimizer (CAPO), a comprehensive model that unifies contextual memory, reinforcement learning, and multimodal processing capabilities for the purpose of optimizing prompts in an automated manner. The model is designed to formulate prompt optimization in the form of a Markov decision process, whereby Proximal Policy Optimization is employed to optimize prompts via feedback-driven rewards. The model is tested against benchmark datasets such as CNN/DailyMail, SQuAD v2.0, and HumanEval which cover text summarization, question-answering, and code generation applications. The findings indicate that CAPO outperforms baseline models in terms of accuracy at 91.7%, enhanced BLEU and ROUGE metrics. Statistically significant improvements in all areas were also found (p\u0026thinsp;\u0026lt;\u0026thinsp;0.01), and ablation studies further validate the importance of various components. CAPO achieves an improvement in accuracy of up to 9.2% compared to reinforcement learning (RL)-based methods. Overall, CAPO enhances prompt clarity and output relevance, among other improvements.\u003c/p\u003e","manuscriptTitle":"A Context-Aware Reinforcement Learning Framework for Adaptive Multimodal Prompt Optimization","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-05-12 02:35:37","doi":"10.21203/rs.3.rs-9637361/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"5fd225e3-9339-41c5-ab3c-fd61295d94da","owner":[],"postedDate":"May 12th, 2026","published":true,"recentEditorialEvents":[{"type":"editorAssigned","content":"","date":"2026-05-07T09:55:41+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-05-07T09:54:54+00:00","index":"","fulltext":""},{"type":"submitted","content":"Journal of Ambient Intelligence and Humanized Computing","date":"2026-05-07T05:12:24+00:00","index":"","fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-05-12T02:35:38+00:00","versionOfRecord":[],"versionCreatedAt":"2026-05-12 02:35:37","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9637361","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9637361","identity":"rs-9637361","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.