RCRAG Converter

RAG for Word documents: why .docx converts cleanly

A .docx file is a zip archive of XML, so the words are stored as text rather than pixels - which makes Word documents among the most reliable sources for a RAG corpus.

What is actually inside a .docx

Rename one to .zip and open it: you get a folder of XML. The prose lives in document.xml as ordinary text with formatting around it. Nothing needs to be recognised or guessed, which is why Word converts more reliably than PDF.

Headings survive, and they are worth keeping

Because the structure is explicit, a converter can tell a heading from a paragraph. That matters for chunking: splitting on section boundaries keeps each passage about one subject, which is precisely what makes a retrieved chunk answerable.

What does not come through

Images embedded in the document are still images, so any text inside a pasted screenshot or diagram needs OCR just as it would in a scanned PDF. Tracked changes, comments and footnotes may or may not be extracted depending on the tool - worth checking if your documents carry meaning in them.

Legacy .doc is a different format entirely

The old binary .doc format predates the XML one and needs a completely different parser. Most modern converters, including this one, do not read it. Re-saving as .docx in Word takes seconds and removes the problem.

More on converting for RAG

  • rusty_ragdocument ingest, chunking and retrieval
  • rusty_xmlWord, PowerPoint and Excel, without LibreOffice
  • rusty_jpeg / rusty_pngimage decode
  • rusty_flacaudio decode
  • rusty_zstdcompression
  • rusty_allocthe allocator, in wasm too
  • rusty_timeNTP timestamps on every chunk
  • spacedbthe storage seam, CRDT per entry
  • FFAIthe AI toolkit the three engines below come from
  • CarmentaOCR - reads scans and screenshots, in your browser
  • Mercuryspeech recognition - turns recordings into transcripts
  • Argusvision - describes images and video frames

MATA Corporate Holdings © 2026 — Made in Scottsdale, Arizona

Remade with Rust