跳到正文
ReignSwords· 来源· @ReignSwords · X·· 49 分钟前AI 评分40
正文 · 原文

88,490 stars, and Crawl4AI's default output still feeds your LLM the nav bar.

I fed it a 177 KB Python docs page tonight. Raw markdown came back at 79,529 characters. The "fit" version with the default pruning filter: 72,452. Navigation links included. Your RAG pipeline pays tokens for that menu on every chunk.

The fix is one parameter nobody mentions:

pip install -U crawl4ai
crawl4ai-setup

Then in code: PruningContentFilter(threshold=0.9) instead of the default 0.48. Same page dropped to 46,311 chars and the nav finally died. BM25ContentFilter with a query ("asyncio create_task coroutine") got it to 13,766. That is the version I would actually embed.

Hacker News homepage: 32 KB of HTML, 18,489 chars raw, 12,694 fit. Better ratio, same lesson.

Honest cost: install took me about 11 minutes and over 2 GB on disk with the browsers it downloads. This is not a lightweight scraper. It is a headless Chrome with opinions.

But once it is in, any page becomes markdown your agent can read. No API key, runs on your box. For RAG ingestion, that is the whole game.

Are you feeding your embeddings raw markdown, or do you prune first? I know which one my token bill prefers.

If you build agents too, let's connect. I post what I actually run.
🔵 Fellow Premium members, let's connect! I post about AI & tech — follow for more 👥

来源:ReignSwords · x.com