Skip to content

feat: add CRWSearchRM (fastCRW) retrieval module - #455

Open
us wants to merge 1 commit into
stanford-oval:mainfrom
us:feat/add-fastcrw
Open

feat: add CRWSearchRM (fastCRW) retrieval module#455
us wants to merge 1 commit into
stanford-oval:mainfrom
us:feat/add-fastcrw

Conversation

@us

@us us commented Jun 13, 2026

Copy link
Copy Markdown

What

Adds CRWSearchRM, a new retrieval module backed by fastCRW, alongside the existing RMs (Tavily, Serper, Bing, DuckDuckGo, SearXNG, …). Selectable with --retriever crw.

Why

The README explicitly invites new-retriever PRs, so here's one.

What makes fastCRW worth adding (not "yet another Firecrawl")

1. The only self-hostable engine that actually works on protected/JS-heavy pages.
Firecrawl's OSS build gates its real anti-bot layer (fire-engine) behind a cloud-only flag — self-hosted Firecrawl falls back to plain fetch or vanilla Playwright and fails on Cloudflare-protected or heavily JS-rendered pages. fastCRW ships the complete stack in a single ~8 MB Rust binary: Cloudflare JS-challenge handling, UA rotation + BYO-proxy support, SPA rendering, and an HTTP→headless→proxy fallback ladder — all in the open core (AGPL), no cloud dependency, no closed components.

2. Faster and higher-recall on Firecrawl's own benchmark dataset.
On the public Firecrawl benchmark, fastCRW scores 63.74% truth-recall vs 56.04% for Firecrawl, with a faster median latency (p50 ~1.9 s vs ~2.3 s). Single binary, ~6 MB RSS — no Redis, no worker processes, no Playwright sidecar.

3. A managed upgrade path for the SearXNG RM.
On web search specifically: crw is not an alternative to SearXNG — it is built on top of it. SearXNG is the metasearch aggregator underneath; crw adds a quality layer above it: query expansion (multi-variant rewrite), content-aware reranking (re-scoring by fetched content rather than SearXNG's content-blind ordering), and category routing (research queries fan out to arXiv / Semantic Scholar / Google Scholar, code queries to GitHub). So you get SearXNG's breadth plus a measurable accuracy layer, all open-source (AGPL) and self-hostable — or just point at the managed endpoint without standing up your own instance.

The integration diff is small because fastCRW implements the Firecrawl API surface, making it a drop-in — but that compatibility is the reason the patch is tiny, not the reason to use fastCRW.

Changes (additive only — no existing RM touched)

  • knowledge_storm/rm.py: CRWSearchRM, mirroring TavilySearchRM (same constructor, same forward()/get_more_info return shape and usage accounting).
  • tests/test_crw_rm.py: unit tests with mocked HTTP (no network).
  • Wired --retriever crw into every examples/ runner + their docstrings; one-line README note.

Config

export CRW_API_KEY=...   # https://fastcrw.com/dashboard (free tier available)
# optional: point at a self-hosted server instead of the managed cloud

Happy to adjust anything to match your conventions. I maintain the integration and am glad to set the team up with free credits to evaluate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant