Retrieval-Augmented Generation in Large Language Models through Selective Augmentation | 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 Retrieval-Augmented Generation in Large Language Models through Selective Augmentation Joao Quintela, Marquinhos Sapateiro This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-4652959/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 The increasing complexity and demands of natural language processing tasks have driven the need for more advanced and contextually aware language models. The integration of selective augmentation within Retrieval-Augmented Generation (RAG) frameworks represents a significant advancement, enhancing the relevance and accuracy of generated responses by dynamically incorporating pertinent information during inference. This research carefully developed and implemented a selective augmentation algorithm tailored to GPT-Neo, demonstrating substantial improvements in performance metrics such as BLEU, ROUGE, and F1 scores. Data preprocessing and model fine-tuning were conducted rigorously, ensuring a robust foundation for the selective augmentation mechanism. Experimental results confirmed that the enhanced RAG model not only provided more accurate and contextually relevant responses but also exhibited superior coherence compared to the baseline model. The implications of these findings are profound, suggesting that selective augmentation can significantly elevate the capabilities of language models, making them more reliable and effective for a wide range of applications. This study contributes valuable insights into the optimization of augmentation processes, paving the way for future advancements in natural language processing technologies. Artificial Intelligence and Machine Learning RAG selective augmentation coherence relevance NLP Full Text Additional Declarations The authors declare no competing interests. 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-4652959","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":320111786,"identity":"47fd1011-bb83-4641-bf24-08c52b80d9db","order_by":0,"name":"Joao Quintela","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie3RsUrDQBjA8S8cXJZrgltKsH2FC4HgoPgqOQJ1SaHgqlUIXBahawqCr1CX6GYlEJcsjpLFUsjkkCxBIYO56paks2D+yx338eM4DqCv7w8mXwMgQsUOrcGuVwVQvBthuZ1IgtwKgrBdEwoY8AQExmgPqcTu5y5BiLUj0EV8b7N1Z5dsgYilbR6rEZaT8r34DMcKAikv3Ca5iU3TpS9s6dWEJdTEZPpgBHZqcARouAybJLAt3aUxW0WCcMo4TEOd2KlUE4wGbeSs1ElNnqJBKMgVVz8yQU67yEHgWjW5YCtESkFsrLlYENZFdJKcm4SuzSDCzhHjpsG1zBoGk9ThSPLa3qLI/v2WVPPDhe+9vn3x0VhVnUzLj9OTO997zosm+S1qPRWf1tl8z6yvr6/v3/cNMGNlNmJd32IAAAAASUVORK5CYII=","orcid":"https://orcid.org/0009-0004-6732-9211","institution":"","correspondingAuthor":true,"prefix":"","firstName":"Joao","middleName":"","lastName":"Quintela","suffix":""},{"id":320111787,"identity":"415ef338-8a34-461e-9e9d-849f3d9a81fb","order_by":1,"name":"Marquinhos Sapateiro","email":"","orcid":"https://orcid.org/0009-0006-3561-3482","institution":"","correspondingAuthor":false,"prefix":"","firstName":"Marquinhos","middleName":"","lastName":"Sapateiro","suffix":""}],"badges":[],"createdAt":"2024-06-28 07:44:03","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-4652959/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-4652959/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":59452402,"identity":"d62fb152-8add-4d3a-ad74-db2dcda96eb1","added_by":"auto","created_at":"2024-07-02 02:35:59","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":186505,"visible":true,"origin":"","legend":"","description":"","filename":"joao.pdf","url":"https://assets-eu.researchsquare.com/files/rs-4652959/v1_covered_216a6aac-a233-48cf-a938-1749bfacb4e7.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eRetrieval-Augmented Generation in Large Language Models through Selective Augmentation\u003c/p\u003e","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":"RAG, selective augmentation, coherence, relevance, NLP","lastPublishedDoi":"10.21203/rs.3.rs-4652959/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-4652959/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThe increasing complexity and demands of natural language processing tasks have driven the need for more advanced and contextually aware language models. The integration of selective augmentation within Retrieval-Augmented Generation (RAG) frameworks represents a significant advancement, enhancing the relevance and accuracy of generated responses by dynamically incorporating pertinent information during inference. This research carefully developed and implemented a selective augmentation algorithm tailored to GPT-Neo, demonstrating substantial improvements in performance metrics such as BLEU, ROUGE, and F1 scores. Data preprocessing and model fine-tuning were conducted rigorously, ensuring a robust foundation for the selective augmentation mechanism. Experimental results confirmed that the enhanced RAG model not only provided more accurate and contextually relevant responses but also exhibited superior coherence compared to the baseline model. The implications of these findings are profound, suggesting that selective augmentation can significantly elevate the capabilities of language models, making them more reliable and effective for a wide range of applications. This study contributes valuable insights into the optimization of augmentation processes, paving the way for future advancements in natural language processing technologies.\u003c/p\u003e","manuscriptTitle":"Retrieval-Augmented Generation in Large Language Models through Selective Augmentation","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-07-02 02:27:52","doi":"10.21203/rs.3.rs-4652959/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":"6b9ed7e0-a95a-4659-8682-3860fa5d8bf6","owner":[],"postedDate":"July 2nd, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":33848820,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2024-07-02T02:27:52+00:00","versionOfRecord":[],"versionCreatedAt":"2024-07-02 02:27:52","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-4652959","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-4652959","identity":"rs-4652959","version":["v1"]},"buildId":"qtupq5eGEP_6zYnWcrvyt","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.