How do I use it with Azure databases ? (Cognitive search, CosmosDB)

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).


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.