langchain.js
    Preparing search index...

    A retriever that uses the BM25 algorithm to rank documents based on their similarity to a query. It uses the "okapibm25" package for BM25 scoring. The k parameter determines the number of documents to return for each query.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • options: any

      Returns BM25Retriever

    Properties

    docs: Document[]
    includeScore: boolean = false
    k: number
    lc_namespace: string[] = ...

    Methods

    • Parameters

      • query: string

      Returns Promise<any[]>

    • Returns string