Skip to content

Conversation

@TamagoTorisugi
Copy link
Contributor

Description
This PR updates the as_retriever method in the AzureSearch to ensure that the search_type parameter defaults to 'similarity' when not explicitly provided.

Previously, if the search_type was omitted, it did not default to any specific value. So it was inherited from AzureSearchVectorStoreRetriever, which defaults to 'hybrid'.

This change ensures that the intended default behavior aligns with the expected usage.

Issue
No specific issue was found related to this change.

Dependencies
No new dependencies are introduced with this change.

prrao87 and others added 26 commits November 6, 2024 18:43
Adding Vector Store SQL DB
Adding SQLServer Vector Store to the Index Table
adding sqlserver vectore store matrix
@vercel
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 3:40am

@dosubot dosubot bot added size:XS labels Nov 27, 2024
Copy link
Contributor

@efriis efriis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the search_type must be a string, and it defaults to "hybrid", so I don't think this PR makes sense

@efriis
Copy link
Contributor

efriis commented Dec 9, 2024

@efriis efriis self-assigned this Dec 9, 2024
@TamagoTorisugi
Copy link
Contributor Author

Thank you for your comment, @efriis .

The intent of this PR is to align with the comment and documentation for search_type of as_retriever which states "Can be "similarity" (default), "hybrid", or "semantic_hybrid".
https://python.langchain.com/api_reference/community/vectorstores/langchain_community.vectorstores.azuresearch.AzureSearch.html#langchain_community.vectorstores.azuresearch.AzureSearch.as_retriever

As you've correctly pointed out, the default value of search_type is "hybrid". Therefore, I think we have two options: either merge this PR or update the comment and documentation.

@dosubot dosubot bot added size:S and removed size:XS labels Dec 10, 2024
@dosubot dosubot bot added the lgtm label Dec 10, 2024
@efriis efriis enabled auto-merge (squash) December 10, 2024 03:32
@efriis efriis disabled auto-merge December 10, 2024 03:32
@efriis efriis enabled auto-merge (squash) December 10, 2024 03:32
@efriis efriis merged commit 0f0df2d into langchain-ai:master Dec 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants