results=db.max_marginal_relevance_search("foo",filter=dict(page=1)) fordocinresults: print(f"Content:{doc.page_content}, Metadata:{doc.metadata}") Content: foo, Metadata: {'page': 1} Content: bar, Metadata: {'page': 1} Here is an example of how to setfetch_kparameter when calling...
if len(context) == max_sources: break docs = self._faiss_index.max_marginal_relevance_search( question, k=k, fetch_k=5 * k ) for doc in docs: c = ( doc.metadata["key"], doc.metadata["citation"], distill_chain.run(question=question, context_str=doc.page_content), ) if "Not ...