RAG for Markdown and plain text: the easiest and most overlooked
Markdown and plain text convert perfectly for RAG, and Markdown's headings give a chunker ready-made boundaries - which makes documentation the best corpus to start with.
Nothing has to be recovered
There is no layout to reconstruct, no encoding to guess and no images to read. The bytes are the text. This is the only format where you can be confident that what you see is exactly what gets indexed.
Headings are the chunk boundaries you would have chosen anyway
A well-written Markdown document is already divided by subject. Splitting on heading levels gives passages that are each about one thing, which is the property that makes retrieval work. Very few formats hand you that for free.
Code blocks deserve a decision
Embedding a code block along with its surrounding prose usually retrieves better than embedding it alone, because the prose contains the words people search for. Splitting a long code block across chunks, on the other hand, produces fragments that match nothing.
Start here when evaluating a converter
Because Markdown extraction is unambiguous, it isolates the chunking. If your retrieval is poor on a Markdown corpus, the problem is the chunking or the embedding model - not the parser - which is a much faster thing to diagnose.