If you have
import ragamuffin as rg
documents = [...]
encode_pipeline = rg.Chunkify() | rg.Tokenize() | (rg.DenseDocumentEncoder() & rg.BM25())
db = encode_pipeline(documents)
query_pipeline = rg.Chunkify() | rg.Tokenize() | (rg.DenseQueryEncoder() & rg.BM25()) | db | TopK(10)
relevant_documents = query_pipeline("...")