Method: Langchain::Vectorsearch::Milvus#similarity_search

Defined in:
lib/langchain/vectorsearch/milvus.rb

#similarity_search(query:, k: 4) ⇒ Object



118
119
120
121
122
123
124
125
# File 'lib/langchain/vectorsearch/milvus.rb', line 118

def similarity_search(query:, k: 4)
  embedding = llm.embed(text: query).embedding

  similarity_search_by_vector(
    embedding: embedding,
    k: k
  )
end