Breaking change for AzureSearch #21533
Replies: 2 comments 3 replies
-
The error you're encountering is due to To fix this issue, ensure that search_kwargs = {
"k": 4, # Adjust the number of documents to return
"score_threshold": 0.5, # Set a minimum relevance threshold
# Include any other necessary search parameters here
}
retriever = AzureSearchVectorStoreRetriever(vectorstore=your_vector_store_instance, search_type="hybrid", search_kwargs=search_kwargs) Replace For detailed guidance, consider reviewing the documentation or source code for the
|
Beta Was this translation helpful? Give feedback.
-
I am using |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Error:
File "/usr/src/app/app/llm_logic/rag_chain.py", line 71, in configure_chains
2024-05-10 16:43:25 vector_store.as_retriever(search_kwargs={"k": 2}).configurable_fields(
2024-05-10 16:43:25 File "/usr/local/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2069, in configurable_fields
2024-05-10 16:43:25 raise ValueError(
2024-05-10 16:43:25 ValueError: Configuration key search_kwargs not found in tags=['AzureSearch'] vectorstore=<langchain_community.vectorstores.azuresearch.AzureSearch object at 0x7fb14737b890>: available keys are dict_keys(['name', 'tags', 'metadata', 'vectorstore', 'search_type', 'k'])
Beta Was this translation helpful? Give feedback.
All reactions