TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Robust LLM Extractor for HTML/Markdown in TypeScript

14 点作者 andrew_zhong11 天前
While working with LLMs for structured web data extraction, we saw issues with invalid JSON and broken links in the output. This led me to build a library focused on robust extraction and enrichment:<p>- Clean HTML conversion: transforms HTML into LLM-friendly markdown with an option to extract just the main content - LLM structured output: Uses Gemini 2.5 flash or GPT-4o mini to balance accuracy and cost. Can also also use custom prompt - JSON sanitization: If the LLM structured output fails or doesn&#x27;t fully match your schema, a sanitization process attempts to recover and fix the data, especially useful for deeply nested objects and arrays - URL validation: all extracted URLs are validated - handling relative URLs, removing invalid ones, and repairing markdown-escaped links<p>I&#x27;d love to hear if anyone else has experimented with LLMs for data extraction or if you have any questions about this approach!

暂无评论

暂无评论