PlanCompiler: A Deterministic Compilation Architecture for Structured Multi-Step LLM Pipelines | 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 PlanCompiler: A Deterministic Compilation Architecture for Structured Multi-Step LLM Pipelines Pranav Harikumar This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9186427/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 Large language models (LLMs) are brittle in multi-step structured workflows, where errors compound across sequential transformations, validation stages, and stateful operations such as SQL persistence. We present PlanCompiler, a deterministic compilation architecture for structured LLM pipelines that separates planning from execution through typed node registries, static graph validation, and topological compilation. Rather than relying on autoregressive chaining at runtime, the system executes a prevalidated workflow graph with explicit parameter and schema constraints. We evaluate the approach on 300 tasks across six benchmark sets spanning increasing workflow depth, SQL roundtrip persistence, and schema-drift stress tests. On depth-stratified benchmarks, the compiled system achieves 100% accuracy on Sets A and B, 88% on Set C, and 96% on Set D, outperforming direct code-generation baselines from GPT-4.1 and Claude Sonnet. On schema-trap tasks, it achieves 44/50, compared with 20/50 for GPT-4.1 and 26/50 for Claude. Across the full suite, the compiler uses approximately $0.356 in total inference cost, versus $2.140 for GPT-4.1 and $18.391 for Claude. These results suggest that, in this benchmark setting, deterministic compilation improves first-pass reliability and cost efficiency for structured multi-step LLM pipelines, while shifting remaining failures toward the planner–semantics boundary rather than execution-time structural errors. Artificial Intelligence and Machine Learning Software Engineering LLM program synthesis workflow compilation reliability determinism structured generation 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-9186427","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":609900261,"identity":"8045a1e2-e3dd-414d-be5a-dd175f2f28ec","order_by":0,"name":"Pranav Harikumar","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAqUlEQVRIiWNgGAWjYLACxgYbENl4gBQtaWCSJC2HwTRxWsylzx6T5t1x3m5t+2GgLTU20QS1WPblpUnznrmdvO1MIlDLsbTcBkJaDM7wGBvObLudbHYAqAXoQqK1nEs2O/+QeC2GDz62HbAzu0GsLZY9YC3JCWY3gLYkEOMXcx4egwOJbXb2ZufTHz74UGNDhMOgdCJYZQIh5cha7IlRPApGwSgYBSMUAADIokZsiva/ngAAAABJRU5ErkJggg==","orcid":"","institution":"Independent Researcher","correspondingAuthor":true,"prefix":"","firstName":"Pranav","middleName":"","lastName":"Harikumar","suffix":""}],"badges":[],"createdAt":"2026-03-21 14:25:38","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-9186427/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9186427/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":105564066,"identity":"ac1c3bc4-8af9-45c5-8233-79e2aaddd02b","added_by":"auto","created_at":"2026-03-27 12:48:42","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":330019,"visible":true,"origin":"","legend":"","description":"","filename":"PlanCompiler.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9186427/v1_covered_7e709a87-b37d-4d60-a110-86df4b4cb270.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003ePlanCompiler: A Deterministic Compilation Architecture for Structured Multi-Step LLM Pipelines\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":true,"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":"LLM, program synthesis, workflow compilation, reliability, determinism, structured generation","lastPublishedDoi":"10.21203/rs.3.rs-9186427/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9186427/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eLarge language models (LLMs) are brittle in multi-step structured workflows, where errors compound across sequential transformations, validation stages, and stateful operations such as SQL persistence. We present PlanCompiler, a deterministic compilation architecture for structured LLM pipelines that separates planning from execution through typed node registries, static graph validation, and topological compilation. Rather than relying on autoregressive chaining at runtime, the system executes a prevalidated workflow graph with explicit parameter and schema constraints.\u003c/p\u003e\n\u003cp\u003eWe evaluate the approach on 300 tasks across six benchmark sets spanning increasing workflow depth, SQL roundtrip persistence, and schema-drift stress tests. On depth-stratified benchmarks, the compiled system achieves 100% accuracy on Sets A and B, 88% on Set C, and 96% on Set D, outperforming direct code-generation baselines from GPT-4.1 and Claude Sonnet. On schema-trap tasks, it achieves 44/50, compared with 20/50 for GPT-4.1 and 26/50 for Claude. Across the full suite, the compiler uses approximately $0.356 in total inference cost, versus $2.140 for GPT-4.1 and $18.391 for Claude.\u003c/p\u003e\n\u003cp\u003eThese results suggest that, in this benchmark setting, deterministic compilation improves first-pass reliability and cost efficiency for structured multi-step LLM pipelines, while shifting remaining failures toward the planner–semantics boundary rather than execution-time structural errors.\u003c/p\u003e","manuscriptTitle":"PlanCompiler: A Deterministic Compilation Architecture for Structured Multi-Step LLM Pipelines","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-24 06:34:21","doi":"10.21203/rs.3.rs-9186427/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":"80b45afd-6cb9-4a34-964c-bd085674cce1","owner":[],"postedDate":"March 24th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":64901640,"name":"Artificial Intelligence and Machine Learning"},{"id":64901641,"name":"Software Engineering"}],"tags":[],"updatedAt":"2026-03-24T06:34:21+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-24 06:34:21","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9186427","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9186427","identity":"rs-9186427","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.