FormAct: Agentic Source Editing for Rich-Format Document Generation

Eugene J. Yu, Xingxing Zhang, Yuan Xia, Tao Ge, Xun Wang, Fnu Kartik, Vishwas Suryanarayanan, Cheng Yang, Amanda Jiang, Jiayu Ding, Xiangyu Wong, Tengchao Lv, Lei Cui, Si-Qing Chen, Furu Wei, Sujian Li
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:151701-151718, 2026.

Abstract

Rich-format documents are essential for everyday operations yet costly to author, motivating the need for automated generation to enhance productivity. To this end, we present FormAct, an agentic system that generates professional rich-format documents from scratch. FormAct operates on an HTML source representation and performs iterative source refinement with an editing agent that invokes a suite of tools, including a syntax-aware source editor and a template retriever, and a review agent that critiques rendered pages to guide refinement. Additionally, we incorporate edit-triggered context compression to maintain a bounded working context and keep multi-round editing efficient. To support development and evaluation, we introduce RichDocBench for end-to-end generation, and RichDocFuzz to evaluate formatting-error recognition for reviewer agents. Through extensive automated evaluation and blind human-preference studies, we show that FormAct consistently outperforms strong baselines, including Codex-CLI, with particularly strong improvements in generating error-free, professional rich-format documents.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-yu26bt, title = {{F}orm{A}ct: Agentic Source Editing for Rich-Format Document Generation}, author = {Yu, Eugene J. and Zhang, Xingxing and Xia, Yuan and Ge, Tao and Wang, Xun and Kartik, Fnu and Suryanarayanan, Vishwas and Yang, Cheng and Jiang, Amanda and Ding, Jiayu and Wong, Xiangyu and Lv, Tengchao and Cui, Lei and Chen, Si-Qing and Wei, Furu and Li, Sujian}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {151701--151718}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/yu26bt/yu26bt.pdf}, url = {https://proceedings.mlr.press/v306/yu26bt.html}, abstract = {Rich-format documents are essential for everyday operations yet costly to author, motivating the need for automated generation to enhance productivity. To this end, we present FormAct, an agentic system that generates professional rich-format documents from scratch. FormAct operates on an HTML source representation and performs iterative source refinement with an editing agent that invokes a suite of tools, including a syntax-aware source editor and a template retriever, and a review agent that critiques rendered pages to guide refinement. Additionally, we incorporate edit-triggered context compression to maintain a bounded working context and keep multi-round editing efficient. To support development and evaluation, we introduce RichDocBench for end-to-end generation, and RichDocFuzz to evaluate formatting-error recognition for reviewer agents. Through extensive automated evaluation and blind human-preference studies, we show that FormAct consistently outperforms strong baselines, including Codex-CLI, with particularly strong improvements in generating error-free, professional rich-format documents.} }
Endnote
%0 Conference Paper %T FormAct: Agentic Source Editing for Rich-Format Document Generation %A Eugene J. Yu %A Xingxing Zhang %A Yuan Xia %A Tao Ge %A Xun Wang %A Fnu Kartik %A Vishwas Suryanarayanan %A Cheng Yang %A Amanda Jiang %A Jiayu Ding %A Xiangyu Wong %A Tengchao Lv %A Lei Cui %A Si-Qing Chen %A Furu Wei %A Sujian Li %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-yu26bt %I PMLR %P 151701--151718 %U https://proceedings.mlr.press/v306/yu26bt.html %V 306 %X Rich-format documents are essential for everyday operations yet costly to author, motivating the need for automated generation to enhance productivity. To this end, we present FormAct, an agentic system that generates professional rich-format documents from scratch. FormAct operates on an HTML source representation and performs iterative source refinement with an editing agent that invokes a suite of tools, including a syntax-aware source editor and a template retriever, and a review agent that critiques rendered pages to guide refinement. Additionally, we incorporate edit-triggered context compression to maintain a bounded working context and keep multi-round editing efficient. To support development and evaluation, we introduce RichDocBench for end-to-end generation, and RichDocFuzz to evaluate formatting-error recognition for reviewer agents. Through extensive automated evaluation and blind human-preference studies, we show that FormAct consistently outperforms strong baselines, including Codex-CLI, with particularly strong improvements in generating error-free, professional rich-format documents.
APA
Yu, E.J., Zhang, X., Xia, Y., Ge, T., Wang, X., Kartik, F., Suryanarayanan, V., Yang, C., Jiang, A., Ding, J., Wong, X., Lv, T., Cui, L., Chen, S., Wei, F. & Li, S.. (2026). FormAct: Agentic Source Editing for Rich-Format Document Generation. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:151701-151718 Available from https://proceedings.mlr.press/v306/yu26bt.html.

Related Material