Instead of ChromaDB, for enterprise level product building i to want to use it with Azure mongodb(vector) or azure cognitive search.
I am unsure how to use the self query retriever, or other functions of langchain along with it
Hi, for Azure Cognitive Search you can use the new integration.
import osfrom langchain.retrievers import AzureCognitiveSearchRetriever
Set Service Name, Index Name and API key as environment variables (alternatively, you can pass them as arguments to AzureCognitiveSearchRetriever).
os.environ["AZURE_COGNITIVE_SEARCH_SERVICE_NAME"] = "<YOUR_ACS_SERVICE_NAME>"
os.environ["AZURE_COGNITIVE_SEARCH_INDEX_NAME"] = "<YOUR_ACS_INDEX_NAME>"
os.environ["AZURE_COGNITIVE_SEARCH_API_KEY"] = "<YOUR_API_KEY>"
Create the Retriever
retriever = AzureCognitiveSearchRetriever(content_key="content")
Now you can use retrieve documents from Azure Cognitive Search
retriever.get_relevant_documents("what is langchain")
Check out: Azure Cognitive Search Integration
how will i use MMR algorithm in this case ?
I dont understand what is MMR.
You are probably using your Azure Congnitive Search configuration. You can check out the code in the repo.