PRIME: Prompt Refinement via Information-driven Methods and Expansion, A Modular Framework for Context-Aware Prompt Amplification | 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 Method Article PRIME: Prompt Refinement via Information-driven Methods and Expansion, A Modular Framework for Context-Aware Prompt Amplification Rajesh More This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8655520/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 While Large Language Models (LLMs) have transformed natural language processing, their effectiveness depends critically on prompt quality. Current Retrieval-Augmented Generation (RAG) systems retrieve documents to generate answers; we propose a fundamentally different approach: using retrieval to construct better questions. This paper introduces PRIME (Prompt Refinement via Information-driven Methods and Expansion), a framework that treats prompt construction as a first-class optimization problem. PRIME implements a modular pipeline with heterogeneous document loaders (10+ formats), pluggable embedding strategies (sparse TF-IDF/BM25 and dense Sentence-BERT/Gemini-Embedding-004/OpenAI), persistent vector stores, and multi-provider LLM generators (GPT-4o, Claude-3, Gemini-2.5-Flash, Gemini-3-Flash-Preview). We formalize prompt amplification mathematically and introduce four novel evaluation metrics: structural coherence (S), semantic specificity (P), contextual completeness (C), and lexical readability (L). Comprehensive experiments across four domains, 12 embedding configurations, 6 LLM backends, and 30 human-evaluated prompts reveal: (1) dense embeddings achieve 37-73% higher retrieval precision; (2) Gemini-3-Flash-Preview achieves 165x expansion ratio with 0.798 quality score; (3) complex queries outperform simple ones by 92%; (4) human evaluators rate PRIME outputs 4.2/5 with 87% inter-rater agreement; and (5) caching provides 1,944x speedup. We present systematic failure analysis identifying when amplification degrades performance. PRIME is released as an open-source library (pip install prompt-amplifier). Artificial Intelligence and Machine Learning PROMPT ENGINE Retrieval Augmented Prompt Engine Prompt Expansion As Service Full Text Additional Declarations The authors declare no competing interests. Ethics Approval Statement This study does not involve human participants, human data, or human subjects. The research is purely computational and methodological in nature, focusing on prompt refinement techniques, retrieval mechanisms, and large language model evaluation using publicly available datasets and synthetic benchmarks. As such, ethics committee or IRB approval was not required. Consent to Participate Statement This study does not involve human participants or patient data. Therefore, informed consent to participate and/or publish was not applicable. 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-8655520","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Method Article","associatedPublications":[],"authors":[{"id":577864183,"identity":"a620ff32-a3c0-4423-94b4-01e848a4e122","order_by":0,"name":"Rajesh More","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABEUlEQVRIie2QMUvDQBiGv3AQlwtZT6L1L3zlQJf8E5cLgXNpUHDJplNcSlxz/yKjYyDQKT8g0qEJgnOlIA04GFPrUHrV0eGe5Q6+e3i/ewEMhv+JAOt+uFgN3PRHsR0w8atCEPBHwUMKbBWb/Um5eCjatnuCS9crZ/Ea/SCtw9mKwsfIzfYrJ5UIuVNBpFIpn6coA1XLUGWAnC2avQoDIT0rgSiv6PkcsAzy+YTDEjDINYsxt7nqukFx3283yvWqrwTvtAoTEpxNik2+U8hXikCt0oSek7BITW1+3P+Fq8UrtzLk46zWLTYJ3rrEjx4paZfr2D9Nq/KF0Hh0pmsMgIqhhR1Q83rgqDg0NRgMBgPAJ85ZX0W5BMjiAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0009-0006-8384-0663","institution":"CWX","correspondingAuthor":true,"prefix":"","firstName":"Rajesh","middleName":"","lastName":"More","suffix":""}],"badges":[],"createdAt":"2026-01-21 05:44:07","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-8655520/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8655520/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":101206878,"identity":"9fe65140-5eee-4492-883b-78251078bd2e","added_by":"auto","created_at":"2026-01-27 09:56:55","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":313472,"visible":true,"origin":"","legend":"","description":"","filename":"PRIMEv2paper.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8655520/v1_covered_9ada77ac-eca0-4000-97bd-50d3d3f1741c.pdf"}],"financialInterests":"\u003cp\u003eThe authors declare no competing interests.\u003c/p\u003e\n\u003cp\u003eEthics Approval Statement This study does not involve human participants, human data, or human subjects. The research is purely computational and methodological in nature, focusing on prompt refinement techniques, retrieval mechanisms, and large language model evaluation using publicly available datasets and synthetic benchmarks. As such, ethics committee or IRB approval was not required.\u003c/p\u003e\n\u003cp\u003eConsent to Participate Statement This study does not involve human participants or patient data. Therefore, informed consent to participate and/or publish was not applicable.\u003c/p\u003e","formattedTitle":"\u003cp\u003ePRIME: Prompt Refinement via Information-driven Methods and Expansion, A Modular Framework for Context-Aware Prompt Amplification\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"cloudwerx","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":"PROMPT ENGINE, Retrieval Augmented Prompt Engine, Prompt Expansion As Service","lastPublishedDoi":"10.21203/rs.3.rs-8655520/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8655520/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eWhile Large Language Models (LLMs) have transformed natural language processing, their effectiveness depends critically on prompt quality. Current Retrieval-Augmented Generation (RAG) systems retrieve documents to generate answers; we propose a fundamentally different approach: using retrieval to construct better questions. This paper introduces PRIME (Prompt Refinement via Information-driven Methods and Expansion), a framework that treats prompt construction as a first-class optimization problem.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003ePRIME implements a modular pipeline with heterogeneous document loaders (10+ formats), pluggable embedding strategies (sparse TF-IDF/BM25 and dense Sentence-BERT/Gemini-Embedding-004/OpenAI), persistent vector stores, and multi-provider LLM generators (GPT-4o, Claude-3, Gemini-2.5-Flash, Gemini-3-Flash-Preview). We formalize prompt amplification mathematically and introduce four novel evaluation metrics: structural coherence (S), semantic specificity (P), contextual completeness (C), and lexical readability (L).\u003cbr\u003e\nComprehensive experiments across four domains, 12 embedding configurations, 6 LLM backends, and 30 human-evaluated prompts reveal: (1) dense embeddings achieve 37-73% higher retrieval precision; (2) Gemini-3-Flash-Preview achieves 165x expansion ratio with 0.798 quality score; (3) complex queries outperform simple ones by 92%; (4) human evaluators rate PRIME outputs 4.2/5 with 87% inter-rater agreement; and (5) caching provides 1,944x speedup. We present systematic failure analysis identifying when amplification degrades performance. PRIME is released as an open-source library (pip install prompt-amplifier).\u003c/p\u003e","manuscriptTitle":"PRIME: Prompt Refinement via Information-driven Methods and Expansion, A Modular Framework for Context-Aware Prompt Amplification","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-01-27 04:57:43","doi":"10.21203/rs.3.rs-8655520/v1","editorialEvents":[{"type":"communityComments","content":1}],"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":"5dd32f86-4432-4d38-8d11-e925a6772ccf","owner":[],"postedDate":"January 27th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":61481378,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2026-01-27T04:57:43+00:00","versionOfRecord":[],"versionCreatedAt":"2026-01-27 04:57:43","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8655520","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8655520","identity":"rs-8655520","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.