{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/superwriter-reflection-driven-long-form","title":"SuperWriter: Reflection-Driven Long-Form Generation with Large Language Models","arxiv_id":"2506.04180","date":"2025-06-04","proceeding":null,"authors":["Yuhao Wu","Yushi Bai","Zhiqiang Hu","Juanzi Li","Roy Ka-Wei Lee"],"abstract":"Long-form text generation remains a significant challenge for large language models (LLMs), particularly in maintaining coherence, ensuring logical consistency, and preserving text quality as sequence length increases. To address these limitations, we propose SuperWriter-Agent, an agent-based framework designed to enhance the quality and consistency of long-form text generation. SuperWriter-Agent introduces explicit structured thinking-through planning and refinement stages into the generation pipeline, guiding the model to follow a more deliberate and cognitively grounded process akin to that of a professional writer. Based on this framework, we construct a supervised fine-tuning dataset to train a 7B SuperWriter-LM. We further develop a hierarchical Direct Preference Optimization (DPO) procedure that uses Monte Carlo Tree Search (MCTS) to propagate final quality assessments and optimize each generation step accordingly. Empirical results across diverse benchmarks demonstrate that SuperWriter-LM achieves state-of-the-art performance, surpassing even larger-scale baseline models in both automatic evaluation and human evaluation. Furthermore, comprehensive ablation studies demonstrate the effectiveness of hierarchical DPO and underscore the value of incorporating structured thinking steps to improve the quality of long-form text generation.","url_abs":"https://arxiv.org/abs/2506.04180v1","url_pdf":"https://arxiv.org/pdf/2506.04180v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"superwriter-reflection-driven-long-form","repo_url":"https://github.com/mozhu621/superwriter","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"form","task_name":"Form"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"dpo","method_name":"DPO"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.04180","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.04180"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mozhu621/superwriter","reach":null}],"summary":{"ran_honours":2,"ran_draft_wrong":4},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"f49911c474b899ec","entry":"better_len","repo":"mozhu621/superwriter","repo_kind":"official","path":"DPO/MCTS_inference.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/DPO/MCTS_inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f49911c474b899ec"}},{"code_sha256_prefix":"a4433f4eaa71a765","entry":"better_len","repo":"mozhu621/superwriter","repo_kind":"official","path":"Inference/superwrite_gen.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/Inference/superwrite_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4433f4eaa71a765"}},{"code_sha256_prefix":"af5438bff5c31194","entry":"extract_content","repo":"mozhu621/superwriter","repo_kind":"official","path":"Agent/Super_write_agent.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/Agent/Super_write_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af5438bff5c31194"}},{"code_sha256_prefix":"05ae45b3b7e836be","entry":"extract_info","repo":"mozhu621/superwriter","repo_kind":"official","path":"Agent/Super_write_agent.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/Agent/Super_write_agent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05ae45b3b7e836be"}},{"code_sha256_prefix":"fe3e8a34085bf9a8","entry":"extract_sections","repo":"mozhu621/superwriter","repo_kind":"official","path":"DPO/MCTS_inference.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/DPO/MCTS_inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fe3e8a34085bf9a8"}},{"code_sha256_prefix":"075e000703ad0fa9","entry":"extract_sections_think","repo":"mozhu621/superwriter","repo_kind":"official","path":"Inference/superwrite_gen.py","file_url":"https://github.com/mozhu621/superwriter/blob/HEAD/Inference/superwrite_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"075e000703ad0fa9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}