Databricks icon

Databricks

Interact with Databricks API

Vector Search → Query Index

AI-generated

Overview

This node performs a vector search query on a specified vector search index within Databricks. It supports querying by either text (which is automatically converted to vector embeddings) or by pre-computed vector embeddings. The node allows configuration of search mode (hybrid or approximate nearest neighbor), the number of results to return, columns to include in the results, and optional filtering and score thresholding. Additionally, it supports reranking of results using a reranker model for improved relevance.

Use Case Examples

  1. Searching a vector index for documents semantically similar to a text query like 'What is machine learning?'.
  2. Querying a vector index using pre-computed vector embeddings to find nearest neighbors.
  3. Using hybrid search mode to combine semantic and keyword search for better results.
  4. Applying a filter expression to restrict search results to a specific category or attribute.

Properties

Name Meaning
Index Name Name of the vector search index to query.
Query Type Type of query to perform, either text (converted to vectors) or vector (pre-computed embeddings).
Query Text Text to search for, used when Query Type is 'text'.
Query Vector Vector embeddings to search for similar vectors, used when Query Type is 'vector'.
Search Mode Search algorithm to use, either hybrid (semantic + keyword) or ANN (pure vector similarity).
Columns to Return Comma-separated list of column names to return in the search results.
Number of Results Maximum number of results to return.
Enable Reranking Whether to rerank results using a reranker model for improved relevance.
Reranker Model Name of the reranker model to use when reranking is enabled.
Columns to Rerank Comma-separated list of columns to use for reranking when reranking is enabled.
Options Additional options including filter expression and score threshold to refine search results.

Output

JSON

  • json - The JSON response from the vector search query containing the search results and metadata.

Dependencies

  • Databricks API with an API token for authentication

Troubleshooting

  • Ensure the index name is correct and exists in the Databricks environment.
  • Verify that the query vector is a valid array of numbers when using vector query type.
  • Check that the filter expression syntax is correct to avoid API errors.
  • If reranking is enabled, ensure the reranker model and columns to rerank are properly configured.
  • Handle API errors such as authentication failures or network issues by checking credentials and connectivity.

Links

Discussion