SimilaritySearchStrategy

class SimilaritySearchStrategy(val topK: Int = 10, val similarityThreshold: Double = 0.0, val filterExpression: String? = null) : SearchStrategy(source)

Similarity search mode using vector embeddings for semantic search.

This mode converts the query to a vector embedding and finds records with similar embeddings in the vector database.

Constructors

Link copied to clipboard
constructor(topK: Int = 10, similarityThreshold: Double = 0.0, filterExpression: String? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard

Optional metadata filter expression for pre-filtering

Link copied to clipboard

Minimum similarity score (0.0 to 1.0)

Link copied to clipboard
val topK: Int

Maximum number of results to return

Functions

Link copied to clipboard
open override fun create(query: String): SearchRequest

Maps a query string into a SearchRequest for the storage.