PulseAugur
EN
LIVE 13:36:35

LLM markdown formatting adds significant cost to short API responses

A recent analysis reveals that markdown formatting, commonly used by LLMs, can significantly increase costs for API users, especially for short responses. While markdown syntax tokens are a small fraction of long outputs, they constitute a substantial portion of short answers, with table separators being particularly costly. The study suggests that explicitly instructing models via the system prompt to reply in plain text when markdown is not rendered can lead to cost savings, as the input tokens for this instruction are cheaper than the output tokens saved. AI

IMPACT Users can reduce API costs by instructing LLMs to output plain text for non-rendering interfaces.

RANK_REASON Analysis of LLM output formatting costs, not a direct release or industry-shaping event.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

LLM markdown formatting adds significant cost to short API responses

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Altrouter ·

    Markdown is 3% of a long LLM answer and 22% of a short one

    <p>Ask a chat model a simple question through the API and you often get back a small document: a heading, a bold "Short answer", a numbered list, a tip in a quote block. If your app renders markdown, that looks nice. If it shows the reply as plain text, or reads it aloud, or stor…