diff --git a/packages/langchain/lib/src/documents/vector_stores/base.dart b/packages/langchain/lib/src/documents/vector_stores/base.dart index 5b90fe6d..52b054bc 100644 --- a/packages/langchain/lib/src/documents/vector_stores/base.dart +++ b/packages/langchain/lib/src/documents/vector_stores/base.dart @@ -89,8 +89,8 @@ abstract class VectorStore { final int k = 4, }) { return switch (searchType) { - VectorStoreSearchType.similarity => similaritySearch(query: query), - VectorStoreSearchType.mmr => maxMarginalRelevanceSearch(query: query), + VectorStoreSearchType.similarity => similaritySearch(query: query, k: k), + VectorStoreSearchType.mmr => maxMarginalRelevanceSearch(query: query, k: k), }; }