API key.Your API key can be either Admin or Query key, but as we only read data it is recommended to use a Query key.Using the Azure Cognitive Search Retriever‚Äãimport osfrom langchain.retrievers import AzureCognitiveSearchRetrieverSet 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 Retrieverretriever = AzureCognitiveSearchRetriever(content_key="content", top_k=10)Now you can use retrieve documents from Azure Cognitive Searchretriever.get_relevant_documents("what is langchain")You can change the number of results returned with the top_k parameter. The default value is None, which returns all results.PreviousArxivNextBM25Set up Azure Cognitive SearchUsing the Azure Cognitive Search RetrieverCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Azure Cognitive Search (formerly known as Azure Search) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.
Azure Cognitive Search (formerly known as Azure Search) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications. ->: API key.Your API key can be either Admin or Query key, but as we only read data it is recommended to use a Query key.Using the Azure Cognitive Search Retriever‚Äãimport osfrom langchain.retrievers import AzureCognitiveSearchRetrieverSet 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 Retrieverretriever = AzureCognitiveSearchRetriever(content_key="content", top_k=10)Now you can use retrieve documents from Azure Cognitive Searchretriever.get_relevant_documents("what is langchain")You can change the number of results returned with the top_k parameter. The default value is None, which returns all results.PreviousArxivNextBM25Set up Azure Cognitive SearchUsing the Azure Cognitive Search RetrieverCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.