ragnar_retrieve_bm25: Retrieves chunks using the BM25 score

View source: R/retrieve.R

ragnar_retrieve_bm25R Documentation

Retrieves chunks using the BM25 score

Description

BM25 refers to Okapi Best Matching 25. See \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1561/1500000019")} for more information.

Usage

ragnar_retrieve_bm25(
  store,
  text,
  top_k = 3L,
  ...,
  k = 1.2,
  b = 0.75,
  conjunctive = FALSE,
  filter
)

Arguments

store

A RagnarStore object returned by ragnar_store_connect() or ragnar_store_create().

text

String, the text to search for.

top_k

Integer. Number of nearest entries to find per method.

...

Additional arguments passed to the lower-level retrieval functions.

k, b

k_1 and b parameters in the Okapi BM25 retrieval method.

conjunctive

Whether to make the query conjunctive i.e., all terms in the query string must be present in order for a chunk to be retrieved.

filter

Optional. A filter expression evaluated with dplyr::filter().

See Also

Other ragnar_retrieve: ragnar_retrieve(), ragnar_retrieve_vss(), ragnar_retrieve_vss_and_bm25()


ragnar documentation built on Aug. 8, 2025, 7:07 p.m.