问HN:有没有哪个大型语言模型可以一次性生成一个带自动缩进的Markdown查看器?

1作者: prmph大约 1 个月前原帖
这里有一个针对大型语言模型(LLM)信徒的测试: 我一直感到沮丧,因为大多数Markdown查看器并不自动缩进章节层级。这在扫描较大文档时能产生巨大的差异,使得我们更容易找到所需内容。下一步应该是允许章节折叠,但目前仅仅实现缩进就非常有用。 文字处理软件可以做到这一点,而在Markdown中实现起来似乎也相对简单,所以我不明白为什么大多数Markdown编辑器没有这个功能。 无论如何,我认为这是一个完美的LLM和AI代码助手的测试。这个问题和解决方案在概念上都很简单,我甚至不在乎实现它所使用的平台和架构。 这是我的提示: > 实现一个简单的Markdown查看器Web应用,可能使用文件API,允许用户打开本地的.MD文件,并根据章节层级自动缩进显示。使用TypeScript,在Node或Bun或类似环境中。我打算在MacOS上运行这个应用。 到目前为止(上次测试是在一两个月前),所有主要模型都未能满足要求。有些甚至给我提供了无法运行的代码;其余的也没有提供基本上能完成我所要求功能的代码。
查看原文
Here a test for the LLM believers:<p>I have been frustrated that most markdown viewers don&#x27;t do automatic indentation of section levels. It makes a world of difference in being able to scan larger documents and pick out what you want easily. The next step would be to allow section folding, but for now just indentation would be very useful.<p>Word processors do it, and it seems like a pretty simple to implement for markdown, so I don&#x27;t know why most MD editor don&#x27;t have it.<p>Anyway, I thought, this is a perfect test of LLMs and AI code assistants. The problem and solution is straightforward conceptually, and I don&#x27;t even care about the platform and architecture used to accomplish it.<p>Here&#x27;s my prompt:<p>&gt; Implement a simple markdown viewer web application, maybe using the file API, that allows one to open a local .MD file, and displays it with automatic indentation of sections based on their level. Use Typescript, on Node or Bun or similar. I intend to run the app on MacOS<p>So far (last tested a month or two ago) all the major models fall flat. Some even give me code that will not run; of the rest, none has provided code that basically does the thing I&#x27;ve asked for.