I fixed the 9 most common ways LLM output breaks markdown, feedback wanted

reddit SideProject · 原文链接 ↗ · 54 分

I kept hitting the same handful of markdown failures over and over while running an AI service, unclosed code fences, missing space after a heading hash, bullet markers switching mid list, tables missing a separator row. Once I looked around, these werent just my problem, theyre documented, recurring failures reported across developer communities and public issue trackers (a couple trace straight back to anthropics/claude-code's own issue tracker). So I built llm-markdown-sanitizer, one function that cleans up 9 of these patterns before you render or store the output. Python and Java, sam
五维评分
付费意愿30.0需求真实度55.0
个人可落地90.0竞争空间50.0
新鲜度65.0是否过审
AI 分析

痛点:LLM 生成的 markdown 在渲染或入库前经常出现未闭合代码围栏、标题井号后缺空格、列表符号中途切换、表格缺分隔行等 9 类结构性破损,开发者需要每次手动兜底修复。

目标用户:把 LLM 输出渲染成 markdown 的开发者与 AI 应用团队:聊天/编辑器前端、文档自动生成、代码代理与内容流水线。

证据:I kept hitting the same handful of markdown failures over and over while running an AI service, unclosed code fences, missing space after a heading hash, bullet markers switching mid list, tables missing a separator row. / these werent just my problem, theyre documented, recurring failures reported across developer communities and public issue trackers (a couple trace straight back to anthropics/claude-code's own issue tracker).

变现:开源核心库保持免费,另做托管清洗 API(按调用量计费)、团队版多语言 SDK + 批量清洗/监控面板,或作为 LLM 网关、RAG/文档流水线产品的附加模块收费。

MVP:两周内做一个极简 HTTP API + CLI:输入原始 LLM 输出,返回修复后 markdown 与逐条修复报告(哪条规则命中、改了什么),内置 9 条规则的公开测试集,提供 Docker 一键部署与 Python/JS 客户端。

竞品:markdownlint、Prettier / remark(unified)、json-repair、guardrails、instructor 等 LLM 输出修复库、各家 LLM 网关自带的输出后处理

摘要:一位开发者在 r/SideProject 发布 llm-markdown-sanitizer,用同一个函数修复 LLM 输出中 9 类常见 markdown 破损(未闭合代码围栏、标题缺空格、列表符号混用、表格缺分隔行等),同时提供 Python 和 Java 版本、零配置、同一套测试用例。作者称这些问题并非个例,在开发者社区和公开 issue tracker(包括 anthropics/claude-code 自己的仓库)中反复被报告。但帖子本身是免费开源项目发布,没有任何付费意愿或收入数据,需求更像是开发者通用痛点而非已验证的付费需求。