class BM25Retriever(BaseRetriever):
BaseRetriever
using the BM25
model.
This class facilitates the retriever of relevant information using a
query-based approach, it ranks documents based on the occurrence and
frequency of the query terms.
Parameters:
def __init__(self):
def process(
self,
content_input_path: str,
chunk_type: str = 'chunk_by_title',
**kwargs: Any
):
Unstructured IO
,then stored internally. This method must be
called before executing queries with the retriever.
Parameters:
def query(self, query: str, top_k: int = DEFAULT_TOP_K_RESULTS):
DEFAULT_TOP_K_RESULTS
.