SpecLLM: LLM-Based Spectroscopy Interpretation | 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 Article SpecLLM: LLM-Based Spectroscopy Interpretation Michał Romaszewski, Anna Strzoda, Marzena Halama, Przemysław Głomb, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8901256/v1 This work is licensed under a CC BY 4.0 License Status: Under Revision Version 1 posted 10 You are reading this latest preprint version Abstract We present a method for improving large language models' (LLMs) understanding of spectroscopic data. Instead of providing raw numerical data or structured encodings such as extensible markup language (XML), the proposed approach extracts spectral features and expresses them in a natural language that reflects expert interpretation. We validate this representation through a classification task on an open hyperspectral blood dataset, where models classify substances based on textual descriptions of their spectral properties. Results demonstrate that text-based representations achieve higher classification accuracy than XML-based inputs and produce more consistent, robust model outputs with fewer formatting errors and hallucinations. Additionally, the textual descriptions substantially reduce token count, improving inference efficiency. Physical sciences/Mathematics and computing Physical sciences/Optics and photonics Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Revision Version 1 posted Editorial decision: Revision requested 08 May, 2026 Reviews received at journal 06 May, 2026 Reviews received at journal 21 Apr, 2026 Reviewers agreed at journal 28 Feb, 2026 Reviewers agreed at journal 26 Feb, 2026 Reviewers invited by journal 26 Feb, 2026 Editor assigned by journal 26 Feb, 2026 Editor invited by journal 23 Feb, 2026 Submission checks completed at journal 20 Feb, 2026 First submitted to journal 20 Feb, 2026 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-8901256","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":599131583,"identity":"e9d43050-9e34-40e5-b807-6bd0215f870c","order_by":0,"name":"Michał Romaszewski","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA3ElEQVRIiWNgGAWjYHADNoYDHwwkgBQQPCBWy8EZBhISYC0JxGph5mFgkGAgpEV39uGjG378qZMzOH8s8bBNgUUdH/8Btgf4tJidS0u72dvGZmxwI+3A4RyQwyQS2A3wajnDY3aDt4EncdsN9gaoFgagLgJabv75I1G/7fzxhsMWIC1AhxHUcpuHzSDB7ADQYQzgEEsgpIUt7bZsW4Lh/htpCQd7DCQk2yQS2wn4hfnYzTd/6uQl+48ZfwAGHb98/+FjDz7g0YINMLaRqIGBAZJmRsEoGAWjYBTAAACBPUspqxDW2AAAAABJRU5ErkJggg==","orcid":"","institution":"Institute of Theoretical and Applied Informatics","correspondingAuthor":true,"prefix":"","firstName":"Michał","middleName":"","lastName":"Romaszewski","suffix":""},{"id":599131584,"identity":"28090288-ec0c-4bd9-8d61-42056d84e1e6","order_by":1,"name":"Anna Strzoda","email":"","orcid":"","institution":"Institute of Theoretical and Applied Informatics","correspondingAuthor":false,"prefix":"","firstName":"Anna","middleName":"","lastName":"Strzoda","suffix":""},{"id":599131585,"identity":"1cbb19e9-2975-48a0-b498-ef77a40afb30","order_by":2,"name":"Marzena Halama","email":"","orcid":"","institution":"Institute of Theoretical and Applied Informatics","correspondingAuthor":false,"prefix":"","firstName":"Marzena","middleName":"","lastName":"Halama","suffix":""},{"id":599131586,"identity":"acc180f4-5344-4845-acd8-7ac8933acf28","order_by":3,"name":"Przemysław Głomb","email":"","orcid":"","institution":"Institute of Theoretical and Applied Informatics","correspondingAuthor":false,"prefix":"","firstName":"Przemysław","middleName":"","lastName":"Głomb","suffix":""},{"id":599131587,"identity":"adf3384c-c3cd-4006-9483-3923e6812607","order_by":4,"name":"Piotr Masłowski","email":"","orcid":"","institution":"Institute of Physics, Faculty of Physics, Astronomy and Informatics, Nicolaus Copernicus University in Toruń","correspondingAuthor":false,"prefix":"","firstName":"Piotr","middleName":"","lastName":"Masłowski","suffix":""}],"badges":[],"createdAt":"2026-02-17 12:53:12","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8901256/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8901256/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":104401388,"identity":"9eb48ada-c1c6-4dce-b303-3e30c65a2ab0","added_by":"auto","created_at":"2026-03-11 12:12:34","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1112949,"visible":true,"origin":"","legend":"","description":"","filename":"SpecLLM.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8901256/v1_covered_e606d02c-1933-4290-9c67-02c2f868496a.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"SpecLLM: LLM-Based Spectroscopy Interpretation","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"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":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-8901256/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8901256/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"We present a method for improving large language models' (LLMs) understanding of spectroscopic data. Instead of providing raw numerical data or structured encodings such as extensible markup language (XML), the proposed approach extracts spectral features and expresses them in a natural language that reflects expert interpretation. We validate this representation through a classification task on an open hyperspectral blood dataset, where models classify substances based on textual descriptions of their spectral properties. Results demonstrate that text-based representations achieve higher classification accuracy than XML-based inputs and produce more consistent, robust model outputs with fewer formatting errors and hallucinations. Additionally, the textual descriptions substantially reduce token count, improving inference efficiency.","manuscriptTitle":"SpecLLM: LLM-Based Spectroscopy Interpretation","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-03 18:11:44","doi":"10.21203/rs.3.rs-8901256/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-05-08T06:21:25+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-06T07:21:43+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-21T12:51:18+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"129469373439416229245709800746299395504","date":"2026-02-28T14:49:43+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"216709814187759183407864253936953906912","date":"2026-02-26T16:58:00+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-02-26T13:30:56+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-02-26T13:28:22+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2026-02-24T03:16:36+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-02-20T09:07:01+00:00","index":"","fulltext":""},{"type":"submitted","content":"Scientific Reports","date":"2026-02-20T09:04:15+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"d37f271b-19d2-44c4-90e8-f626f1b119d7","owner":[],"postedDate":"March 3rd, 2026","published":true,"recentEditorialEvents":[{"type":"decision","content":"Revision requested","date":"2026-05-08T06:21:25+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-06T07:21:43+00:00","index":80,"fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"in-revision","subjectAreas":[{"id":63751841,"name":"Physical sciences/Mathematics and computing"},{"id":63751842,"name":"Physical sciences/Optics and photonics"}],"tags":[],"updatedAt":"2026-05-08T06:25:59+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-03 18:11:44","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8901256","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8901256","identity":"rs-8901256","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.