TeXFix-Bench Evaluates LLM Document Repair Capabilities

Prajwal S. Venkateshmurthy· August 11, 2026 View original

Key takeaways

  • TeXFix-Bench provides an empirically grounded benchmark for LLM document source repair.
  • LLMs struggle with real-world document errors more than with synthetically injected faults.
  • Compile success alone is an insufficient metric for repair quality, as LLMs often alter content.
  • Typst documents are significantly harder for LLMs to repair than LaTeX or Markdown.

Who benefits

PublishingSoftware DevelopmentAcademiaTechnical WritingLegalTech

Summary

Researchers introduce TeXFix-Bench, a new multi-format benchmark for evaluating LLM-based document source repair, grounded in an empirically mined fault taxonomy. It reveals that LLMs struggle with real-world document errors and that compile success alone overstates repair quality, as many compiling repairs alter document text.

Scientific and technical writing heavily relies on markup languages like LaTeX, Typst, and Markdown, which must compile correctly. However, documents often fail to compile due to various errors such as missing delimiters, mismatched environments, or broken imports. Existing evaluations for LLM-based document repair typically use ad-hoc fault injection methods that lack a realistic error model, failing to capture the complexity of real-world compilation failures. To address this, TeXFix-Bench was developed as a multi-format benchmark for LLM-based full-source document repair. It is grounded in an empirically mined fault taxonomy derived from a Grounded-Theory study of real LaTeX hard-crash faults from sources like TeX Stack Exchange and GitHub. This taxonomy, instantiated as DocMut, includes 48 AST-aware operators across LaTeX, Typst, and Markdown. The benchmark contains over 10,000 instances from 743 open-licensed seeds. Evaluations of seven LLMs under a zero-shot protocol revealed that DocMut faults are significantly harder to repair than pattern-based mutations. A case study with 88 mined human crashes showed a 67% repair success rate. Crucially, a restoration oracle over 28,000 compiling repairs found that 13.6-18.5% materially altered the document text, indicating that compile success alone overstates repair quality. Typst documents were also found to be markedly harder to repair than LaTeX and Markdown.

Why it matters

For professionals in technical publishing, software development, and AI engineering, this research highlights the current limitations of LLMs in reliably repairing complex document source errors. It provides a robust benchmark and critical insights into the true quality of LLM-generated fixes, beyond mere compilation.

How to implement this in your domain

  1. 1Utilize benchmarks like TeXFix-Bench to rigorously evaluate the document repair capabilities of LLMs before integrating them into critical workflows.
  2. 2Implement post-repair verification steps, beyond just compilation, to ensure that LLM-generated fixes do not materially alter the document's intended content.
  3. 3Develop fine-tuning strategies for LLMs specifically on empirically grounded fault taxonomies to improve their real-world repair performance.
  4. 4Consider the inherent difficulty of different markup languages (e.g., Typst vs. LaTeX) when planning LLM-based repair solutions.
  5. 5Contribute to or leverage open-source fault taxonomies and benchmarks to advance the field of automated document repair.

Original post by Prajwal S. Venkateshmurthy

"arXiv:2608.07617v1 Announce Type: new Abstract: Scientific and technical writing depends on markup sources that must compile: LaTeX, Typst, and Markdown pipelines fail on missing delimiters, mismatched environments, broken imports, or package conflicts. Existing document-repair e…"

View on X

Originally posted by Prajwal S. Venkateshmurthy on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses