Skip to content
The AI Agent Factory

0.3.1 Markdown going in

Approved by
Panaversity ·
12 min read

In everyday life. A recipe card has a title, a list of ingredients and numbered steps. A friend can cook from it without asking which line is an ingredient and which is a step. The shape does that work. But if the card says two cups of salt, your friend adds two cups of salt. The shape makes the mistake easy to see, and just as easy to follow.

What you will learn. What markdown is, when the AI writes it for you. Which shapes to give your notes, and why a neat page can still be wrong.

Why it matters. Notes with a clear shape get better answers, because the AI no longer guesses which line is which. Headings and lists organize information for the AI, and for you.

Marks the app turns into a page

What is markdown, if you never type it?

Markdown is plain text with a few marks that show a page's shape, such as # signs for a heading, a dash for a bullet point and stars for bold. A plain sentence is markdown too. It simply has no marks.

Both AI vendors' apps format their replies with these marks, and each app turns them into headings and lists. One AI vendor even names its setting for more headings, lists and tables "Use more markdown".1 To see the marks yourself, ask for the page in a code block. A code block is a box that shows text exactly as it is written, with the marks included.

One page, two views: the same page, twice. On the left, under the label "What you see in the chat", the finished page: a bold heading "Rules" with two bullet points under it, a bold heading "Remarks" with one bullet point, and a bold heading "Open questions" with one bullet point. On the right, under the label "What the model wrote", the same page as plain text in a gray code block: a line "## Rules", two lines that start with "- ", a line "## Remarks", one line that starts with "- ", a line "## Open questions" and one line that starts with "- ". An arrow runs from the code block to the drawn page, labeled "the app draws the marks". Under the code block, a note reads "Ask for it in one code block to see the marks." A banner reads: "The model writes the marks. The app draws them."

Figure 0.3.1. One page, two views. The app turns the marks into a neat page, and a code block shows them.

Why give the AI your notes in a clear shape?

Because a paragraph hides which line is which. It does not say which line is a rule and which is a remark, or which number goes with which. Where the shape is missing, the model guesses it, from training. Headings, lists or plain labels such as "Rules:" put the shape into the text, where the model reads it. The marks reach the model as text, as tokens like the words around them, as 0.1.2 showed.

The AI vendors' own guides say the same. One says that marking each part of a prompt helps the model read it with fewer mistakes.2 The other says that headings and lists mark a prompt's sections, and other marks show where a document starts and ends.3

The shapes you can ask for

Which shape fits your notes, and what does each one let you check?

Ask for the shape that fits your notes. Each one shows the model which line is which, and each one gives you something to check.

ShapeAsk for it whenWhat it lets you check
Headingsyour notes have parts, such as Rules and Remarksthat each line sits under the right heading
A listyou have several items, such as rules or stepsthat each item says one thing
A tablefacts go together, such as each invoice and its amountthat each value is in its own row and column
A quote, kept word for wordyou need a source's exact wordsthat the quote matches its source
A source after each rulea rule comes from a policythat each rule names its line, such as "(policy 4.1)"

Behind each shape is a mark, such as ## in front of a heading or - in front of a list item. A quote kept word for word sits in a code block, so the model can tell where the quote ends and your request starts.

Do you have to type the marks?

Rarely. Ask the AI to put your notes in markdown, under the headings you name, and it types the marks. Your part is to read the page and check it. Sometimes you need the marks themselves, to keep the page as a file or to give it to another AI. Then ask for the page in one code block. In 0.3.4, you will see how each AI vendor lets you copy it or save it.

Neat is not checked

Does a neat page make the answer right?

Only as right as its lines. The marks show the model which line is which, so it stops guessing the shape. They do not check the lines. A wrong rule in a neat bullet point is followed as surely as a right one. It also looks more like a rule than it did in a paragraph.

So the neat page is for you too. On it, you see what each line became: a rule, a remark or an open question. Check each rule against its source, and add the source's line to the rule, such as "(policy 4.1)". Put what nothing settles under "Open questions". Then the model sees the gap and can say that it is open, instead of filling it with a guess.

The marks put the shape in front of the model. Two rows of boxes run left to right. In the top row, "the notes, as one paragraph" goes into "the context window", drawn as a row of word tokens, then into "the model", labeled "shape guessed, from training", then out to "the answer". In the bottom row, "the notes, as a page", under the headings "Rules", "Remarks" and "Open questions", goes into "the context window", drawn as a row of tokens with the marks "##" and "-" among the words, then into "the model", labeled "shape read from the marks", then out to "the answer". One line under "Rules" looks as neat as the others but carries a red tag, "wrong: policy 5.1". Below the page, a person with a document labeled "AP policy, version 3" checks the page, with a dotted arrow labeled "checked against its source". No arrow runs back into the model. A banner reads: "The marks show which line is which. Only you can check the lines."

Figure 0.3.2. The marks put the shape in front of the model. Only you can check the lines.

Check yourself

Question 1 / 9

0 answered

You ask an AI app to tidy your notes, and it shows bold headings. What did the model actually write?

  1. Characteristics in ChatGPT, OpenAI Help Center.↑
  2. Prompting best practices, Claude Platform Docs.↑
  3. Prompt engineering, OpenAI API docs.↑
Owner
Panaversity