Skip to content

feat(scholar): Firecrawl Research Index as a literature source - #170

Open
ChronodeAi wants to merge 1 commit into
jordan-gibbs:mainfrom
ChronodeAi:feat/firecrawl-research-source
Open

ChronodeAi wants to merge 1 commit into
jordan-gibbs:mainfrom
ChronodeAi:feat/firecrawl-research-source

Conversation

@ChronodeAi

Copy link
Copy Markdown

Adds a firecrawl provider to hpr scholar for the Firecrawl Research Index (GET /v2/search/research/papers). The index holds ~43M paper abstracts from PubMed, PMC, bioRxiv, medRxiv and arXiv, and is searched with a natural-language question. It is part of --scope papers, needs no key, and sends FIRECRAWL_API_KEY as a bearer token when one is set (keyed rate limits).

Why alongside OpenAlex rather than instead of it: no humanities, social science or books, and the search hits are thin (ids, title, abstract, score; no authors, year or venue). It goes after CORE in merge precedence, so the metadata sources win field conflicts and the thin hits fill in through the existing DOI merge.

Choices the code makes, each taken from live responses:

  • Two DOIs on one record. A record can carry both its bioRxiv/medRxiv preprint DOI (10.1101/…) and its published DOI, in either order. The merge never joins different DOIs, so the published DOI is used (it is the one OpenAlex and Crossref report) and the preprint DOI is kept in extra.preprint_doi.
  • Year. It comes from arXiv ids (YYMM.NNNNN and the pre-2007 archive/YYMMNNN form) and from dated 10.1101/YYYY.MM.DD.… DOIs. It is only taken from a preprint DOI when the record has no published DOI, so a published article never gets its preprint's year.
  • Landing URL. It prefers a free copy: arXiv abs (plus pdf_url), then PMC, then the DOI, then PubMed. The namespaced primaryId (arxiv:, pmid:, pmcid:, doi:) is kept as identifier, which is what the index's read and related-papers endpoints accept.

Tests. 12 offline tests, including one that merges a thin hit into an OpenAlex record by DOI. Full suite: 1731 passed. Live check: -s openalex -s firecrawl merged the same paper into one record (also_in: openalex,firecrawl, year and authors from OpenAlex, PMID from Firecrawl). For "Attention Is All You Need" it returned the 2017 original, which OpenAlex's top 3 missed.

README ("nine sources"), the agent-docs coverage list and the CHANGELOG are updated.

Adds the 'firecrawl' scholar provider over GET /v2/search/research/papers (~43M abstracts: PubMed, PMC, bioRxiv, medRxiv, arXiv). Keyless; FIRECRAWL_API_KEY is sent as a bearer token when set. Thin hits merge into OpenAlex/Crossref by DOI: the published DOI wins over the 10.1101 preprint DOI, years come from arXiv ids and dated bioRxiv/medRxiv DOIs, and the landing URL prefers arXiv, then PMC, then DOI, then PubMed. In --scope papers; merge precedence after CORE.

This branch has not been deployed

No deployments
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