📝AI Struggles to Edit .docx Files Reliably
AI can't reliably edit Word docs yet
TL;DR
AI agents are having trouble editing complex .docx files reliably. Solutions like low-level SDKs, MCPs, and round-tripping face challenges. A new approach uses HTML as an intermediary, improving accuracy but not solving all issues.
AI agents are struggling to edit .docx files reliably, especially in complex scenarios. This affects industries like legal, finance, and healthcare where Word documents are crucial. Current solutions, such as low-level SDKs and round-tripping, work for simple cases but falter with complex documents. A new approach uses HTML as an intermediary, improving accuracy but not solving all issues. This method involves training a model to predict OOXML changes from HTML edits, evaluating the result, and patching it into the file. The solution is compared against five other methods on 279 DOCX editing tasks.

Key Points
AI agents struggle with .docx files due to complex XML structure, affecting legal, finance, and healthcare industries.
Low-level libraries like python-docx and Open XML SDK provide full expressiveness but are slow and expensive.
MCP servers like SuperDoc and Office CLI offer speed and cost efficiency but require learning a new DSL.
Round-tripping DOCX to Markdown/HTML is a good approach but faces limitations like lossy conversion.
A new solution uses HTML as an intermediary, training a model to predict OOXML changes from HTML edits.
Why It Matters
If you're editing complex .docx files in legal or finance, current AI solutions fall short. A new HTML-based approach shows promise but isn't a silver bullet yet. Companies like Harvey already face these issues.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.
Join 3,556 builders reading daily.