Skip to main content

frontier_view

Function frontier_view 

Source
pub async fn frontier_view(
    query: &FrontierQuery,
    base: &Url,
    contact_email: &str,
    ctx: &FetchContext,
) -> Result<FrontierResults, FetchError>
Expand description

Surface the frontier neighbourhood of seed_doi: papers that cite the seed, ranked by age-normalized impact, ready for the agent to triage.

§Algorithm (Phase 1)

  1. Resolve the seed DOI to an OpenAlex Work ID via a direct DOI lookup (/works/https://doi.org/<doi>).
  2. Query /works?filter=cites:<seed_id> to fetch citing papers. Unlike free-text search, filter=cites: constrains the result set to papers that actually build on the seed, so sort=fwci:desc is safe here (no off-topic papers; the topicality concern from #290 does not apply). Phase 2 will add bibliographic-coupling candidates.
  3. Sort locally by fwci desc (nulls last) → year desc → cited_by_count desc.
  4. Apply min_year filter if provided.

Returns FrontierResults containing the ranked hits. The caller is responsible for excluding papers already in the local store (the core function is store-agnostic).