<story><title>Show HN: Convert HTML DOM to semantic markdown for use in LLMs</title><url>https://github.com/romansky/dom-to-semantic-markdown</url></story><parent_chain></parent_chain><comment><author>mistercow</author><text>This is cool. When dealing with tables, you might want to explore departing from markdown. I’ve found that LLMs tend to struggle with tables that have large numbers of columns containing similar data types. Correlating a row is easy enough, because the data is all together, but connecting a cell back to its column becomes a counting task, which appears to be pretty rough.&lt;p&gt;A trick I’ve found seems to work well is leaving some kind of id or coordinate marker on each column, and adding that to each cell. You could probably do that while still having valid markdown if you put the metadata in HTML comments, although it’s hard to say how an LLM will do at understanding that format.</text></comment>
<story><title>Show HN: Convert HTML DOM to semantic markdown for use in LLMs</title><url>https://github.com/romansky/dom-to-semantic-markdown</url></story><parent_chain></parent_chain><comment><author>gmaster1440</author><text>&amp;gt; Semantic Clarity: Converts web content to a format more easily &amp;quot;understandable&amp;quot; for LLMs, enhancing their processing and reasoning capabilities.&lt;p&gt;Are there any data or benchmarks available that show what kind of text content LLMs understand best? Is it generally understood at this point that they &amp;quot;understand&amp;quot; markdown better than html?</text></comment>