agentskit.js

bm25Score

Auto-generated API reference for bm25Score.

Function: bm25Score()

bm25Score(query, documents, options?): RetrievedDocument[]

Defined in: packages/rag/src/rerank.ts:173

Score a set of documents against a query using classic BM25. Returns new document objects with a finite .score field, sorted descending. Input documents are never mutated.

#Parameters

#query

string

#documents

RetrievedDocument[]

#options?

BM25Options = \{\}

#Returns

RetrievedDocument[]

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page

Ask the docs
Ask anything about AgentsKit. Answers come from the docs corpus and cite their sources.