Cleaning AI Output

By the Syncfusion DevTutorials team · Last updated

Fix the Markdown that AI tools write. Clean an answer buried in bold, headings, nested bullets and emoji, repair broken tables, adapt text for email and chat apps, and write style rules that agents follow.

The Answer That Was All Formatting

Ravi asks an AI assistant a simple question: "How long do customers have to ask for a refund?" He wants to paste the answer into a reply to a customer. This is what he gets:

An answer buried in formatting

# 📦 Refund Window Overview

## ✅ Summary

Customers have **30 days** from **delivery** to request a **refund**.

## 🔍 Key Details

- **Timeframe**
  - Standard orders
    - **30 days** from delivery
- **After 30 days**
  - A voucher is offered instead

## 💡 Final Thoughts

I hope this helps! Let me know if you have **any other questions**.

The answer is one sentence: customers have 30 days from delivery. The rest is decoration. Open the Checks tab:

  • STY001: three bold phrases in one line. When everything is bold, nothing stands out.
  • STY002: four headings in an answer of about 60 words. A short answer needs no headings.
  • STY003: bullets three levels deep, to say one thing.
  • STY004: emoji in headings, which search tools and screen readers stumble over.

And the bold stars, # signs and nested bullets will show as raw characters in the customer's email.

AI tools write in Markdown all the time. In this lesson, you will learn to spot the common problems in Markdown that models write, fix them, and write style rules so agents stop producing them.

In simple words: formatting should help the reader find the answer. When it gets in the way, take it out.

TL;DR

  • Models often over-format: too much bold, too many headings, bullets inside bullets, emoji everywhere.
  • A short answer needs no headings. Write it as one or two plain paragraphs.
  • Bold only the one or two things a reader must not miss.
  • Turn bullet soup (short fragments in nested bullets) back into sentences.
  • Check every table a model writes: a missing divider row or an extra cell breaks it.
  • Know where the text is going. Email and many chat apps do not show Markdown, or use their own format.
  • Put your style rules in a file the agent reads, so you do not fix the same thing every time.

A Real-World Example

Think about using a highlighter while studying. Highlighting a few important sentences makes them easy to find later. However, if every sentence is highlighted, nothing stands out.

Formatting works in the same way. Headings, bold text, and bullet points should help readers find important information and understand the structure of the content. Using them too often makes the page cluttered and reduces their value.

AI models may add more formatting than the content needs. Review the output and remove unnecessary headings, bold text, and bullet points.

What You Will Learn

In this lesson, you will learn:

  1. The four most common problems in Markdown that models write.
  2. How to clean an over-formatted answer without losing anything.
  3. How to fix the tables models break.
  4. Why the place you paste to changes what formatting is safe.
  5. How to write style rules an agent will follow.

Cheat Sheet

The same answer, cleaned

Customers can ask for a refund within **30 days of delivery**. After 30 days, we offer a voucher instead.

Two sentences. One bold phrase, for the one fact that matters. Open the Checks tab: nothing fires. Nothing from the original answer is lost, except the decoration.

The Four Common Problems

Too Much Bold

Bold works by contrast. One bold phrase in a paragraph jumps out. Five bold phrases cancel each other out, and the paragraph becomes harder to read.

Bold everywhere, then bold once

Refunds over **₹5,000** need **manager approval**, and **damaged items** need a **photo**.

Refunds over ₹5,000 need a manager's approval. Damaged items need a photo first.

**Important:** refunds over ₹5,000 need a manager's approval.

The first line bolds four things, so nothing stands out. The second uses no bold at all, and reads fine. The third bolds one label, so the reader sees at once that this line matters.

Header Inflation

Header inflation means headings on text too short to need them. Headings help a reader find their way through a long document. In a 60-word answer, there is nothing to find. The headings just push the answer further down.

A useful rule: if an answer fits on a phone screen, it needs no headings. If it is long enough to need them, use ## for sections, never # titles in the middle of a chat.

Bullet Soup

Bullet soup is text broken into many short, nested bullet points, often with no full sentences. It looks organised, but the reader has to rebuild the sentences themselves.

Bullets, then a sentence

- Refund window
  - Standard: 30 days
  - Damaged: 60 days
    - Photo needed

A standard refund is allowed within 30 days of delivery. For a damaged item, it is 60 days, and the customer must send a photo.

The sentences say the same thing, and say how the facts connect. Bullets are right for real lists: steps in order, or separate items. They are wrong for one idea split into pieces.

A quick test for bullet soup: read the bullets out loud. If you have to add words like "is", "and" or "for" to make sense of them, they want to be a sentence.

Emoji and Decoration

Emoji in headings and lists look friendly in a chat window. Elsewhere they cause problems: screen readers read each one out ("package, refund window overview"), search tools match on them, and they look out of place in a customer email or a code review. Remove them from anything that will be published or reused.

Broken Tables

Models often write tables, and often break them. The two most common breaks are a missing divider row, and a row with a different number of cells.

A table a model broke

| Plan | Reply time |
| Basic | 2 days |
| Pro | 4 hours | email and phone |

The Rendered tab shows no table at all, just lines of text with pipes. The divider row |---|---| is missing, so there is no table. And even with a divider, the Pro row has a third cell that would be dropped without a word.

The same table, fixed

| Plan | Reply time | Contact |
|---|---|---|
| Basic | 2 days | email |
| Pro | 4 hours | email and phone |

The fix: add the divider row, and give every row the same number of cells. If the extra detail does not fit the table, add a column for it, or move it into a sentence below the table.

Know Where It Is Going

Markdown is only formatting where something renders it. Before you clean an answer, ask where it will be pasted.

DestinationWhat happens to MarkdownWhat to do
GitHub, docs sites, notes appsrenderedkeep light Markdown
A customer emailusually shown as raw ** and #remove all Markdown marks
Slackuses its own format, where single stars *like this* make bold; headings and tables are not shownrewrite bold, drop headings and tables
Microsoft Teamssupports some Markdown, not allkeep it simple: bold, lists, links
A ticket or form fieldoften plain textremove all marks
Another AI tool's promptread as raw textlight Markdown is fine; structure helps

Never paste a Markdown answer straight into a customer email. Raw **30 days** and ## Summary look like a broken message. Either remove the marks or paste into an editor that renders them first.

Style Rules for Agents

Fixing the same habits in every answer wastes time. Write the rules down once, where the agent reads them: AGENTS.md, a skill, or a team style file linked from them.

Writing rules an agent can follow

# Writing style for answers and docs

## Answers in chat

- Answer in plain paragraphs. Use no headings in an answer under 150 words.
- Bold at most one phrase per answer: the fact the reader must not miss.
- Use a list only for steps in order or for separate items. Never nest lists more than one level.
- Use no emoji.

## Replies to customers

- Write plain text with no Markdown marks at all. The reply is sent as an email.
- Keep it under 120 words.

## Tables

- Use a table only to compare items on the same points.
- Every row has the same number of cells as the header.

These rules work because each one is specific and checkable: "no headings under 150 words", "at most one bold phrase". A rule like "keep answers clean" is filler, as you saw in the AGENTS.md lesson.

The STY checks in this course measure the same habits these rules describe. They are this course's rules, not part of markdownlint. Use them as a quick test of an answer before you publish it.

Where This Is Used

  • Support teams: cleaning AI-drafted replies before they go to customers.
  • Docs teams: reviewing AI-written pages before they are published.
  • Developers: reading AI-written pull request descriptions and code comments.
  • Agent setup: style rules in AGENTS.md, a skill or a linked style file.

Common mistakes

SymptomCauseFix
The answer is hard to find in the replyHeadings and decoration around a short answerRemove the headings; lead with the answer
Nothing stands outToo many bold phrasesKeep one bold phrase, or none
The reader has to rebuild the meaningBullet soupRewrite the fragments as sentences
A table shows as lines of pipesThe divider row is missingAdd |---|---| under the header
A cell's text vanished from a tableThat row has more cells than the headerAdd a column, or move the extra text out
A customer email shows ** and ##Markdown pasted into a plain-text emailRemove the marks before sending
The agent keeps over-formattingNo written style rulesAdd specific rules to AGENTS.md or a style file

Quick Check

Exercises

What to Remember

  • Models over-format: too much bold, headings on short answers, nested bullet fragments, emoji.
  • A short answer is one or two plain paragraphs, with at most one bold phrase.
  • Use bullets for real lists only. Rewrite bullet soup as sentences.
  • Check every table: a divider row, and the same number of cells in every row.
  • Know the destination. Remove Markdown marks before an email; adapt for chat apps.
  • Write specific style rules where the agent reads them, so you fix each habit once.

Further Reading

Next: Capstone Project, where you build a full Markdown kit for your own repo — README, AGENTS.md, a skill, a spec, llms.txt and lint settings — and download it.