feat: add CRWSearchRM (fastCRW) retrieval module - #455
Open
us wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, mirroringTavilySearchRM(same constructor, sameforward()/get_more_inforeturn shape and usage accounting).tests/test_crw_rm.py: unit tests with mocked HTTP (no network).--retriever crwinto everyexamples/runner + their docstrings; one-line README note.Config
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.