[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82665-en":3,"doc-seo-82665-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},82665,1649267921044,"Ava Thompson","https://us-avatar.wpscdn.com/avatar/1800007509477c92dfb?_k=1782875107921204101",6,"Technology","Guiding Human Validation of LLM Generated Code via Verifiable Literate Programming","Vibe coding uses natural-language interaction with large language models to generate software, yet generated code is trustworthy only when it matches the user’s intent—an alignment users struggle to validate, especially non-programmers. Prior approaches relying on LLM testing or partial artifacts face prompt ambiguity, model fallibility, and blind spots for corner cases and semantic deviations. Based on a bug study, the paper introduces verifiable literate programming (VLP), a human-in-the-loop workflow that uses NL documentation, fine-grained mismatch detection, and verification with model checking to enable end-to-end repair and improved pass@1 results with reasonable effort.","Guiding Human Validation of LLM-Generated Code via Verifiable Literate Programming  \nZiqi Yuan†, Wenhao Lu†, Hao Wu, Dunhong Jin, and Chuan Wu  \nThe University of Hong Kong  \nziqiyuanss@connect.hku.hk, whlu@connect.hku.hk, wuhao55@hku.hk, dhjin@hku.hk, cwu@cs.hku.hk  \n†Equal contribution  \narXiv :2607 .02333v 1 [ cs . SE] 2 Jul 2026  \nAbstract—Vibe coding democratizes software development by allowing users to generate code via natural-language (NL) interaction with large language models (LLMs). However, the code is reliable only when it faithfully implements the user’s intent, which is difficult and labor-intensive for users to validate, especially for non-programmers. Existing validation methods either rely on LLM-assisted automated testing, which suffers from prompt ambiguity and model fallibility, or involve users only in partial software artifacts such as prompts and test cases, which may overlook corner cases and program details. Motivated by a bug study of LLM-generated code, we find that detailed human feedback is essential, as the failures often stem from underspecified requirements or subtle semantic deviations, and thus cannot be resolved through automated or coarse-grained checking alone.  \nThis paper presents verifiable literate programming (VLP), a human-in-the-loop framework designed to make the review/validation process of LLM-generated code accessible to users at all programming levels. At its core, VLP proposes unambiguous NLbased documentation as a readable intermediate layer between prompts and code. The documentation demonstrates concrete program semantics and enables users to provide feedback on potential intent-code mismatches. It supports human-involved, end-to-end repair and validation via three techniques: (i) an NL-style literate language with unambiguous syntax and mostly deterministic code-to-documentation translation, (ii) LLM-based fine-grained mismatch detection that uses trace links between prompts and documentation to focus users’ review effort on suspicious documentation lines, and (iii) a verification module that leverages user-validated documentation to derive API-usage checks and formal properties, which are then verified against the generated code using model checking. Our evaluation shows that VLP improves code pass@1 from 28.7%–73.2% to 65.4%–93.5% with reasonable user effort.  \nI. INTRODUCTION  \nVibe coding democratizes software development by shifting much of programming from manual code writing to naturallanguage (NL) interaction with large language models (LLMs) . As a result, recent reports estimate that 63% of vibe-coding users are non-programmers [1], [2] . However, LLM-generated code is useful and trustworthy only when it faithfully implements the user’s intended behavior. Ensuring intent-code alignment is difficult because LLMs can hallucinate during generation, while users, especially non-programmers, often face many lines of generated code without knowing whether the program actually behaves as intended. This concern is reflected in recent developer surveys, which report that LLMgenerated code remains unreliable [3]–[5] and that 96% of  \ndevelopers do not fully trust the functional correctness of AIgenerated code [6] . Therefore, validating LLM-generated code has become an urgent problem for vibe coding.  \nThis need has motivated a large body of work on automated testing and verification for LLM-generated code. One line of work utilizes LLM reasoning to generate tests or formal properties from the original NL prompt, or to directly judge program correctness [7]–[19] . However, these methods suffer from the ambiguity of the original prompt and the fallibility of LLM-generated validation artifacts. Tests may miss important paths, formal properties tend to overlook key requirements, and LLM-based judges can misjudge correctness [20]–[23] . Thus, validation that depends solely on LLM reasoning cannot provide a fully reliable basis for LLM-generated code.  \nRecognizing these limits","cbCaiqXH3KPSBgzm","https://ap.wps.com/l/cbCaiqXH3KPSBgzm","pdf",1548077,1,12,"English","en",105,"# Introduction\n## Problem: intent-code misalignment\n## Limits of automated and partial user-in-the-loop validation\n## Key idea: verifiable literate programming (VLP)","[{\"question\":\"Why is human validation necessary for LLM-generated code in vibe coding?\",\"answer\":\"Because the code may hallucinate or deviate subtly from the user’s intended behavior, and non-programmers often cannot tell whether many generated lines implement the right semantics.\"},{\"question\":\"What shortcomings affect automated testing and LLM-based validation methods?\",\"answer\":\"Automated validation derived from prompts can suffer from prompt ambiguity and validation artifact fallibility, leading tests to miss important paths, formal properties to overlook key requirements, and LLM judges to misjudge correctness.\"},{\"question\":\"How does VLP make LLM code easier to review and repair?\",\"answer\":\"VLP introduces NL-based unambiguous documentation as an intermediate layer, uses trace-link-driven mismatch detection to focus reviewers on suspicious lines, and applies a verification module that converts validated documentation into API-usage checks and formal properties verified against the generated code.\"}]",1784182160,30,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"guiding-human-validation-of-llm-generated-code-via-verifiable-literate-programming","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/technology/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/guiding-human-validation-of-llm-generated-code-via-verifiable-literate-programming/82665/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"Why is human validation necessary for LLM-generated code in vibe coding?","Question",{"text":75,"@type":76},"Because the code may hallucinate or deviate subtly from the user’s intended behavior, and non-programmers often cannot tell whether many generated lines implement the right semantics.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What shortcomings affect automated testing and LLM-based validation methods?",{"text":80,"@type":76},"Automated validation derived from prompts can suffer from prompt ambiguity and validation artifact fallibility, leading tests to miss important paths, formal properties to overlook key requirements, and LLM judges to misjudge correctness.",{"name":82,"@type":73,"acceptedAnswer":83},"How does VLP make LLM code easier to review and repair?",{"text":84,"@type":76},"VLP introduces NL-based unambiguous documentation as an intermediate layer, uses trace-link-driven mismatch detection to focus reviewers on suspicious lines, and applies a verification module that converts validated documentation into API-usage checks and formal properties verified against the generated code.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,113,118,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":45,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":45,"category_name":120,"show_sort_weight":28,"slug":121},8,"Research & Report","research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]