langchain/libs/community
Lage Ragnarsson a3c10fc6ce
community: Add support for specifying hybrid search for Databricks vector search (#23528)
**Description:**

Databricks Vector Search recently added support for hybrid
keyword-similarity search.
See [usage
examples](https://docs.databricks.com/en/generative-ai/create-query-vector-search.html#query-a-vector-search-endpoint)
from their documentation.

This PR updates the Langchain vectorstore interface for Databricks to
enable the user to pass the *query_type* parameter to
*similarity_search* to make use of this functionality.
By default, there will not be any changes for existing users of this
interface. To use the new hybrid search feature, it is now possible to
do

```python
# ...
dvs = DatabricksVectorSearch(index)
dvs.similarity_search("my search query", query_type="HYBRID")
```

Or using the retriever:

```python
retriever = dvs.as_retriever(
    search_kwargs={
        "query_type": "HYBRID",
    }
)
retriever.invoke("my search query")
```

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-07-15 22:14:08 +00:00
..
langchain_community community: Add support for specifying hybrid search for Databricks vector search (#23528) 2024-07-15 22:14:08 +00:00
scripts ci[patch]: Update community linter to provide a helpful error message (#24127) 2024-07-11 16:22:08 +00:00
tests community: Add support for specifying hybrid search for Databricks vector search (#23528) 2024-07-15 22:14:08 +00:00
extended_testing_deps.txt community(you): Integrate You.com conversational APIs (#23046) 2024-07-15 17:46:58 -04:00
Makefile ci[patch]: Update community linter to provide a helpful error message (#24127) 2024-07-11 16:22:08 +00:00
poetry.lock community: release 0.2.7 (prev was langchain) (#23997) 2024-07-08 23:43:32 +00:00
pyproject.toml community: release 0.2.7 (prev was langchain) (#23997) 2024-07-08 23:43:32 +00:00
README.md docs[patch]: Update diagrams (#23613) 2024-06-28 12:36:00 -07:00

🦜🧑‍🤝‍🧑 LangChain Community

Downloads License: MIT

Quick Install

pip install langchain-community

What is it?

LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.

For full documentation see the API reference.

Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.

📕 Releases & Versioning

langchain-community is currently on version 0.0.x

All changes will be accompanied by a patch version increase.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.