Skip to main content
Markdown is a lightweight markup language created by John Gruber in 2004, with Aaron Swartz, for writing formatted text with readable symbols: # for headings, * or - for lists, ** for bold. It can be read as is or converted to HTML and other formats. There are several flavors; CommonMark is its strict specification, and GitHub Flavored Markdown adds tables, among other things.

Why it matters when generating documents with AI

  • Language models write Markdown fluently, because it is common in their training data.
  • It describes structure (headings, lists, tables) without the look, which can be applied later with styles.
  • It is a good intermediate format: an application can write the content in Markdown and turn it into a Word document or a PDF.
  • It also works the other way: converting a PDF or Word file to Markdown gives a model the content with its structure and fewer tokens.

With Doconda

You can create a document with content.markdown: it supports headings, paragraphs, lists, tables, bold and italics, links, page breaks and images, and the text is used as is (Create). The other way, POST /v1/extract turns Word, PowerPoint, Excel, PDF or images into Markdown, keeping headings, lists and tables (Read files).